XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Server
    • None

    Description

      My goal there will be to add an hidden index to get last availabe value.

      We have a table with few values, but an history of 1 000 000 of lines.

      select * from mysql_server;
      ...
      23 rows in set (16,225 sec)
      

      if specifiy all id from the PK

      MariaDB [pmacontrol]> select id from mysql_server;
      +----+
      | id |
      +----+
      |  1 |
      |  2 |
      |  3 |
      |  4 |
      | 24 |
      |  5 |
      |  6 |
      |  7 |
      |  8 |
      |  9 |
      | 10 |
      | 11 |
      | 12 |
      | 13 |
      | 14 |
      | 15 |
      | 16 |
      | 18 |
      | 19 |
      | 20 |
      | 21 |
      | 22 |
      | 23 |
      +----+
      23 rows in set (1,070 sec)
      

      => a bit long but better

      then select all and specify the ids :

       select * from mysql_server where id in(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24);
      ....
      23 rows in set (0,001 sec)
      
      

      it's really fast, so I believe there is a way to improve the optimizer with response time

      Attachments

        Activity

          People

            Unassigned Unassigned
            Aurelien_LEQUOY Aurélien LEQUOY
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.