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

Add filesort summary to the optimizer trace

    XMLWordPrintable

    Details

      Description

      MySQL prints information about filesort in the optimizer trace too

      For a query SELECT * FROM t1 ORDER BY a desc, in the optimizer trace we see:

       
                {
                  "filesort_information": [
                    {
                      "direction": "desc",
                      "table": "`t1`",
                      "field": "a"
                    }
                  ],
                  "filesort_priority_queue_optimization": {
                    "usable": false,
                    "cause": "not applicable (no LIMIT)"
                  },
                  "filesort_execution": [
                  ],
                  "filesort_summary": {
                    "rows": 100,
                    "examined_rows": 100,
                    "number_of_tmp_files": 0,
                    "sort_buffer_size": 32456,
                    "sort_mode": "<sort_key, packed_additional_fields>"
                  }
                }
      
      

      So it would be good to have the filesort summary also in the optimizer trace of MariaDB

        Attachments

          Activity

            People

            Assignee:
            varun Varun Gupta
            Reporter:
            varun Varun Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: