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

different random pages pulled for each index when updating stats

    Details

      Description

      storage/xtradb/dict/dict0dict.c:dict_update_statistics iterates over all indexes of a table to update the statistics.

      Inside this loop the call to btr_estimate_number_of_different_key_vals fetches a different set of random pages for updating each index.

      Since the pages are at random, taking the largest n_sample_pages of pages based on index size and using the same set of pages to calculating the statistics for all indexes will result in less pages retrieved and more accurate statistics (for indexes per table > 1).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  jplindst Jan Lindström
                  Reporter:
                  danblack Daniel Black
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: