Last active
December 28, 2015 06:19
-
-
Save toddsampson/7456649 to your computer and use it in GitHub Desktop.
Fast MySQL InnoDB count. Really fast blog post: http://www.cloudspace.com/blog/2009/08/06/fast-mysql-innodb-count-really-fast/
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
show table status; |
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
select count(*) from messages; |
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
mysql> select count(*) from messages use index (index_messages_on_remote_created_at); | |
+----------+ | |
| count(*) | | |
+----------+ | |
| 1276831 | | |
+----------+ | |
1 row in set (3.19 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment