Created
May 1, 2020 10:25
-
-
Save yoku0825/aaca884794a6dbb79485a44e22174865 to your computer and use it in GitHub Desktop.
オプティマイザさん的には `select count(0)` らしい
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql80 110> EXPLAIN SELECT COUNT(*); | |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------+ | |
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | | |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------+ | |
| 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used | | |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------+ | |
1 row in set, 1 warning (0.00 sec) | |
mysql80 110> SHOW WARNINGS; | |
+-------+------+----------------------------------------------+ | |
| Level | Code | Message | | |
+-------+------+----------------------------------------------+ | |
| Note | 1003 | /* select#1 */ select count(0) AS `COUNT(*)` | | |
+-------+------+----------------------------------------------+ | |
1 row in set (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment