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

optimizer trace should show the index name in the block chosen_access_method

    XMLWordPrintable

    Details

      Description

      explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b;

                          "best_access_path": {
                            "considered_access_paths": [
                              {
                                "access_type": "ref",
                                "index": "a",
                                "used_range_estimates": false,
                                "cause": "not available",
                                "rows": 1,
                                "cost": 200,
                                "chosen": true
                              },
                              {
                                "access_type": "scan",
                                "resulting_rows": 100,
                                "cost": 2.3174,
                                "chosen": false
                              }
                            ],
                            "chosen_access_method": {
                              "type": "ref",
                              "records": 1,
                              "cost": 200,
                              "uses_join_buffering": false,
                              "filter_used": false
                            }
      

      As we see for table t2 ref access is used but the index name is not shown in chosen_access_method

        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: