Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are the MySQL Partitions visible in the EXPLAIN plan of a SELECT....?

Tags:

mysql

I would like to know whether we have a chance to see what are the partitioned being scanned during the execution plan of the query.

Is this information in visible in the EXPLAIN/EXPLAIN EXTENDED of the respective SELECT...?

like image 353
Uday Avatar asked Jan 02 '12 12:01

Uday


People also ask

How do I see partitions in MySQL?

Using the SHOW TABLE STATUS statement to determine whether a table is partitioned. Querying the INFORMATION_SCHEMA. PARTITIONS table. Using the statement EXPLAIN SELECT to see which partitions are used by a given SELECT .

How can I see the partitions in SQL?

If you need to find out if a table has been partitioned in SQL Server, you can run a join against the sys. tables , sys. indexes , and sys. partition_schemes views.

What is explain plan in MySQL?

When EXPLAIN is used with an explainable statement, MySQL displays information from the optimizer about the statement execution plan. That is, MySQL explains how it would process the statement, including information about how tables are joined and in which order.


1 Answers

Use: EXPLAIN PARTITIONS SELECT

like image 78
Sudhir Bastakoti Avatar answered Dec 18 '22 21:12

Sudhir Bastakoti