…tables to InnoDB. (But then again, it might not be.) Or maybe the client is doing queries like “… WHERE client IN (SELECT id FROM…the top 10 most expensive queries, in total execution time. By the way, the slow query logs in the stock MySQL…
Post: High-Performance Click Analysis with MySQL
…the clicks column record the total, and the blue_clicks column record only blue clicks; to find out non-blue clicks you subtract one from the…tables is hard work for the database server. If you do it on the master with INSERT..SELECT queries, it will propagate to the…
Post: MySQL Slow query log in the table
…the top of the list rather than in the end. If you want to get new queries in the end you can do SELECT * FROM (SELECT * FROM…records by physical position quickly without need to have indexes would be quite handy I also should tell log table implementation in MySQL…
Post: Shard-Query adds parallelism to queries
… records. This table is partitioned by month which means that MySQL can use partition pruning to reduce the…;text-indent:0px;padding-left:3px;border-top:1px solid #CCC;border-right:1px solid … BY c DESC LIMIT 10; Q4 – SELECT carrier, count(*) FROM ontime WHERE DepDelay>10 AND FlightDate between ’2007-…
Post: Using GROUP BY WITH ROLLUP for Reporting Performance Optimization
…10 and just fetch all groups and sum values on the application side. Which is the second way. mysql> select grp, count(*) cnt from…from our goal of real time reporting on 10.000.000+ recorded…table as ordinary GROUP BY: mysql> explain select grp, count(*) cnt from…
Post: Faster Point In Time Recovery with LVM2 Snaphots and Binary Logs
…mysql-bin.000022 | mysql mysql> select count(*) from salaries where emp_no = 10001; +———-+ | count(*) | +———-+ | 0 | +———-+ 1 row in set (0.00 sec) mysql> show tables; +———————+ | Tables…
Post: ORDER BY ... LIMIT Performance Optimization
…top tags, recently registered users etc – which would often require ORDER BY with LIMIT in the…records…mysql> explain select * from test order by k limit 5; +—-+————-+——-+——-+—————+——+———+——+———+——-+ | id | select_type | table…
Comment: Innodb vs MySQL index counts
…the mysqld.err. (this was on vanilla MySQL 5.5) Let’s see if the ALTER TABLE trick works: > alter table test ENGINE=Innodb; Query OK, 5 rows affected (0.01 sec) Records: 5 Duplicates: 0 Warnings: 0 > select * from…

