Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28531

update on out of range criteria should be Impossible Where

    XMLWordPrintable

Details

    Description

      Optimizer dont fully understand key usage.
      Reproduce:
      create table with 10 Mio. entries with primary key and dummy column.
      do update on key which is not in Table, but enclose the value in '.

      Example with direct SQL Console:
      update customer set c_name = "ttt" where c_indx ='2387657687258'
      It takes over 25 sec. to realize that key is not possible

      update customer set c_name = "ttt" where c_indx =2387657687258
      Takes under 0.1 sec.

      update customer set c_name = "ttt" where c_indx ='2387657687258' *1
      Takes under 0.1 sec.

      With Prepare and execute
      update customer set c_name = "ttt" where c_indx =:c_indx
      Over 25 sec.

      Select is always under 0.1sec.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              Balen Michael
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.