June 19, 2013

Post: Shard-Query EC2 images available

…latin1 COMMENT=’Contains all avaialble data from 1988 to 2010′; mysql> use ontime1; Database changed mysql> show table status like ‘ontime_…format: Compact Rows: 6697533 Avg_row_length: 241 Data_length: 1616904192 Max_data_length: 0 Index_length: 539279360 Data_free: 4194304 Auto_increment: NULL …

Post: MySQL Indexing Best Practices: Webinar Questions Followup

… it is string length at which it makes sense is collation specific. Q: ORDER By optimization issues: select * from table where A… performance impact of extending index is when you increase its length dramatically, for example adding long varchar column. In such cases… MySQL can avoid temporary table or filesort for group by by this column. This works because by scanning data in index order MySQL gets data

Post: Solving INFORMATION_SCHEMA slowness

… test box: mysql> select count(*),sum(data_length) from information_schema.tables; +———-+——————+ | count(*) | sum(data_length) | +———-+——————+ | 130 | 2856365892 | +———-+——————+ 1 row in set (1.08 sec) mysql> set…, 0 rows affected (0.00 sec) mysql> select count(*),sum(data_length) from information_schema.tables; +———-+——————+ | count(*) | sum(data_length) | +———-+——————+ | 130 | 2856365892 | +———-+——————+ 1 row in set…

Post: Moving Subtrees in Closure Table Hierarchies

…SQL and still run efficient queries against the data. I’ll be presenting a webinar for …solutions. CREATE TABLE TreePaths ( ancestor CHAR(1) NOT NULL, descendant CHAR(1) NOT NULL, length INT NOT NULL…from the same table in a single query in MySQL. But we can use MySQL‘s multi-table DELETE syntax,…

Post: How fast can MySQL Process Data

table: CREATE TABLE `m4` ( `c` char(128) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 mysql> show table status like “m4″ \G *************************** 1. row *************************** Name: m4 Engine: MEMORY Version: 10 Row_format: Fixed Rows: 5000000 Avg_row_length: 129 Data_length

Post: Ultimate MySQL variable and status reference list

MySQL manual, especially the option and variable reference tabletable_sizeblogpercona.commanual max_insert_delayed_threadsblogpercona.commanual max_join_sizeblogpercona.commanual max_length

Post: Data compression in InnoDB for text and blob fields

… became the default after MySQL 5.0.3 and has a more compact representation for nulls and variable-length fields than REDUNDANT. Using InnoDB’s new Barracuda file format (available since InnoDB plugin 1.1 or MySQL 5… format tables you will need to create them new and migrate data, or affect existing tables with an ALTER TABLE statement. As table compression is table

Post: InnoDB Full-text Search in MySQL 5.6: Part 2, The Queries!

… ft_min_word_length. First, MyISAM, with MySQL 5.5, on the SEO data set: mysql: SELECT id, … easy enough: mysql: SHOW CREATE TABLE innodb_myisam_stopword\G *************************** 1. row *************************** Table: innodb_myisam_stopword Create Table: CREATE TABLE `innodb_myisam_stopword…

Post: Dynamic row format for MEMORY tables

… the fact that variable-length records were not supported by the engine. This is true for all MySQL versions, including the latest… was not included in MySQL in 2008): The key columns must come before any non-key variable-length columns. For performance reasons… request it explicitly and how to set the data block size at CREATE TABLE time, are in the documentation. What of course…

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

… is that each MV could have drifted by a different length of time. A view which has drifted out of sync… the list of tables used by the above view, as stored in the data dictionary: mysql> select * from flexviews.mview_table where mview_id= flexviews.get_id(‘demo’,'dashboard_customer_sales’)\G *************************** 1. row *************************** mview_table