Bug #64361 | SHOW TABLES FROM ... increments Select_scan Status | ||
---|---|---|---|
Submitted: | 17 Feb 2012 11:12 | Modified: | 17 Feb 2012 14:36 |
Reporter: | Henrik Brinkmann | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Information schema | Severity: | S3 (Non-critical) |
Version: | 5.5.18-log, 5.5.20 | OS: | Linux (x86_64 debian5.0 ) |
Assigned to: | CPU Architecture: | Any | |
Tags: | Select_scan, show tables |
[17 Feb 2012 11:12]
Henrik Brinkmann
[17 Feb 2012 14:36]
Valeriy Kravchuk
Yes, this is easy to verify: mysql> show status like '%scan%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | Select_scan | 5 | | Sort_scan | 0 | +---------------+-------+ 2 rows in set (0.01 sec) mysql> show tables from mydb; +----------------+ | Tables_in_mydb | +----------------+ | table1 | | table2 | +----------------+ 2 rows in set (0.01 sec) mysql> show status like '%scan%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | Select_scan | 6 | | Sort_scan | 0 | +---------------+-------+ 2 rows in set (0.00 sec) and it clearly contradicts explanation of this status variable from the manual, http://dev.mysql.com/doc/refman/5.5/en/server-status-variables.html#statvar_Select_scan. The reason is obvious - temporary table in memory is created, but still this hardly should be considered a full table scan worth reporting, comparing to explicit select * from big_table.