June 19, 2013

Post: Tools and Techniques for Index Design Webinar Questions Followup

MySQL can use indexes, such as: Index merge improvements.  But I expect that defining the right compound index will still be superior. Index…a query, by counting how many lookups to index entries or table…select-list. The difference is that QUBE helps you to predict quantitatively how much a new index

Post: Recovery deleted ibdata1

… INSERT BUFFER AND ADAPTIVE HASH INDEX ————————————- Ibuf: size 1, free …mysql# And restart MySQL: root@localhost:/var/lib/mysql# /etc/init.d/mysql restart After the restart all InnoDB tables are reachable: mysql> select count(*) from sbtest; +———-+ | count

Post: MySQL 5.6 vs MySQL 5.5 and the Star Schema Benchmark

… in pages afterwards: mysql> select sq.*, pages / (@@innodb_buffer_pool_size / 16384) * 100 pct_buffer_pool from ( select table_name, index_name, count(*) pages, sum… (0.00 sec) mysql> select sq.*, pages / ((@@innodb_buffer_pool_size / 16384)) * 100 pct_buffer_pool from ( select table_name, index_name, count(*) pages, sum…

Comment: COUNT(*) vs COUNT(col)

… | wp_comments | index | NULL | rajidx | 9 | NULL | 424672 | Using index | +—-+————-+————-+——-+—————+——–+———+——+——–+————-+ 1 row in set (0.00 sec) mysql> select count(*) from wp_comments; +———-+ | count(*) | +———-+ | 230120…, so its not actually counting the values but the pointers from this index: mysql> select count( distinct (comment_approved) ) from wp_comments; +————————————–+ | count( distinct (comment_approved…

Post: Indexes in MySQL

…) d1, (SELECT count(*) cnt2 FROM t2 WHERE ID1=1) d2; 0.9492 = 94.92% Explain still claims MySQL will use index. Execution time: SELECT COUNT(SUBNAME) FROM t2 WHERE ID1=1 – 1200 ms SELECT COUNT(SUBNAME) FROM t2 IGNORE INDEX (ID1) WHERE…

Post: When EXPLAIN estimates can go wrong!

…: Using index On 5.5: mysql [localhost] {msandbox} (foo2) > explain select count(*) from test_estimate where type=6 \G *************************** 1. row *************************** id: 1 select_type… rows: 339184 Extra: Using where; Using index On 5.5: mysql [localhost] {msandbox} (foo2) > explain select count(*) from test_estimate where type between 3…

Post: InnoDB Full-text Search in MySQL 5.6 (part 1)

indexes, it’s entirely possible to DROP multiple FT indexesmysql> set global innodb_ft_aux_table=’test/dir_test_innodb’; mysql> set global innodb_optimize_fulltext_only=1; mysql> select… | | last_optimized_word | | | deleted_doc_count | 0 | | total_word_count | | | optimize_start_time | | | optimize_…

Post: Performance Schema tables stats

mysql> select OBJECT_NAME,COUNT_STAR from table_io_waits_summary_by_table order by COUNT_STAR DESC LIMIT 5; +————-+————+ | OBJECT_NAME | COUNT…. There is table with statistic per index: mysql> select * from table_io_waits_summary_by_index_usage where OBJECT_NAME=’sbtest55′G …

Post: ANALYZE: MyISAM vs Innodb

mysql> select count(distinct c) from antest; +——————-+ | count(distinct c) | +——————-+ | 101 | +——————-+ 1 row in set (0.36 sec) mysql> select count(distinct i) from antest; +——————-+ | count

Post: Ultimate MySQL variable and status reference list

… referring to the amazing MySQL manual, especially the option and variable reference table….privblogpercona.commanual Select_full_joinblogpercona.commanual Select_full_range_joinblogpercona.commanual Select_rangeblogpercona.commanual Select_range_checkblogpercona.commanual Select_scanblogpercona….