June 20, 2013

Post: To UUID or not to UUID ?

…is however completely separate problem which can be fixed in MySQL 5.1 Data Clustering This again applies to Innodb …could be used to have values generated at same point in time physically local in BTREE index. This is actually the reason…proposes in the same post – hashes if it is SHA1, MD5 or CRC32.

Post: Long PRIMARY KEY for Innodb tables

… pay for number of benefits – caching data and index in memory -so cached lookups are very fast, … – checking/repairing large MyISAM tables in case of MySQL/System crash is painful and great to be avoided… in practice value distribution is not as bad in this case as if I would decide to use md5(url…

Post: To SQL_CALC_FOUND_ROWS or not to SQL_CALC_FOUND_ROWS?

…=MD5($i)”); } First of all, let’s try to perform some query on this table using indexed column b in where clause: mysql… with SQL_CALC_FOUND_ROWS are following: for each b value it takes 20-100 sec to execute uncached and 2… | 5479 | Using index | +—-+————-+————+——+—————+——+———+——-+——+————-+ 1 row in set (0.00 sec) Here is why our count was much faster – MySQL accessed our table…

Post: How much memory Innodb locks really take ?

… KEY (`i`), KEY `j` (`j`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 mysql> show table status like “sample” \G; *************************** 1. row *************************** Name: sample…_row_length: 61 Data_length: 100253696 Max_data_length: 0 Index_length: 128974848 Data_free: 0 Auto_increment: 1638401 Create_time… (column j was populated by md5(rand()) values) : mysql> begin; Query OK, 0 rows affected (0.00 sec) mysql> select count(*) from sample where…