June 18, 2013

Post: Fun with the MySQL pager command

result is possible with pager: mysql> pager cat > /dev/null PAGER set to ‘cat > /dev/null’ # Trying an execution plan mysqlmysql> SELECT COMMAND,COUNT(*) TOTAL FROM INFORMATION_SCHEMA.PROCESSLIST GROUP BY COMMAND ORDER BY TOTAL DESC; +————-+——-+ | COMMAND | TOTAL | …

Post: Flexviews - part 3 - improving query performance using materialized views

results mysql> select sum(total_lines) from dashboard_customer_sales ; +——————+ | sum(total_lines) | +——————+ | 155186550 | +——————+ 1 row in set (0.64 sec) mysql> select sum(total

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

…The second part will compare query results between MyISAM FTS and InnoDB …mysql mysql 98304 Feb 20 16:09 FTS_00000000000000ad_STOPWORDS.ibd -rw-rw—-. 1 mysql mysql… | 1028261 | | last_optimized_word | | | deleted_doc_count | 0 | | total_word_count | | | optimize_start_time | | | optimize_end_time | …

Post: Ultimate MySQL variable and status reference list

…am constantly referring to the amazing MySQL manual, especially the option and variable reference table. But …_not_cachedblogpercona.commanual Qcache_queries_in_cacheblogpercona.commanual Qcache_total_blocksblogpercona.commanual Queriesblogpercona.commanual query_alloc_block_sizeblogpercona.commanual…

Post: Advanced index analysis with mk-index-usage

… the remote server, and store the results in my MySQL sandbox instance. The new option is –save-results-database. The full mk-index…,D=index_usage \ –create-save-results-database After that finishes, the ‘index_usage’ database contains several tables: mysql> show tables; +———————–+ | Tables_in…, tbl, SUM(cnt) AS total_cnt, COUNT(*) AS variations FROM index_usage GROUP BY query_id, db, tbl HAVING COUNT(*) > 1 ) AS qv…

Post: How to convert MySQL's SHOW PROFILES into a real profile

mysql> SET profiling=1; mysql> pager cat > /dev/null mysqlCOUNT(*) AS “R/Call” FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID = @query_id GROUP BY STATE ORDER BY Total_R DESC; +———————-+———-+——-+——-+————–+ | STATE | Total…0061593333 | | Sorting result | 0.011090…

Post: Troubleshooting MySQL Memory Usage

… to look at Prepared_stmt_count to see how many prepared… confusing as “Total Memory Allocated” is really not the total any more…to global memory allocation and will result in increased memory allocation until …where your MySQL Support contract can be handy. Conclusion Understanding where MySQL can…

Post: Testing MySQL column stores

… part of my analysis focused on testing a total of 29 queries on the large data set…the queries. ICE supports almost all of the MySQL aggregation functions. Notably, GROUP_CONCAT is not supported…get accurate results for all of the queries on InfiniDB. In particular the query “select count(*) from …

Post: MySQL Indexing Best Practices: Webinar Questions Followup

… be evaluated as math expression and the result will be IN(-2) which is …I also would note there are some MySQL optimizer restrictions in how well it … and can range from 5% of total size or less to almost 100%. … doing a SELECT competition_id, COUNT(user_id) AS user_count FROM user_competition_entry …

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

…. I got some strange results, however, which showed MySQL 5.6.10 to be much slower than MySQL 5.5.30 even with…_pool from ( select table_name, index_name, count(*) pages, sum(is_old=’YES’) old, count(*) – sum(is_old=’YES’) hot, sum(number…_TOTAL: 0 UNCOMPRESS_CURRENT: 0 UNCOMPRESS_CURRENT: 0 As promised, here are the results from joining the tables in the other direction mysql