May 25, 2012

Post: Troubleshooting MySQL Memory Usage

mysql> select sum(data_length+index_length) from information_schema.tables where engine=’memory’; +——————————-+ | sum(data_length+index_length) | +——————————-+ | 126984 | +——————————-+ 1 row in set

Post: InnoDB's gap locks

is normal and expected that query results can change during a transaction, so there is no need to create locks to prevent that fromis a good source of information: http://dev.mysql.com/doc/refman/5.1/en/innodb-locks-set.html. Conclusion MySQL

Post: Distributed Set Processing with Shard-Query

result set is treated as a materialized view over a union of all the already joined and aggregated data fromMySQL storage nodes are supported. Amdahl’s law applies to the distributed processing. The results fromresult set merge optimization enabled: ON DUPLICATE KEY UPDATE

Post: PHP Large result sets and summary tables.

mysql_use_result API call which does not store all result set in memory but instead streams it fromno more works If you use buffered query you can use same connection to run other queries, ie INSERTs and UPDATEs while you traverse with data. Not with unbuffered query because connection is

Post: Upgrading MySQL

is change of TIMESTAMP output format in MySQL 4.1 or changing JOIN evaluation in 5.0 (which could both cause different result setMySQL functionality which is unlikely to be affected. If you’re something like SELECT name FROMdata is the same. It is possible some update

Post: Troubleshooting MySQL Upgrade Performance Regressions

RESULT/SMALL_RESULT. Check whatever stats are the same (run SHOW INDEXES FROMfrom optimizer standpoint and updating stats may cause old MySQLis possible for stats to be different for the same data because it uses random sampling to update

Post: Preprocessing Data

results fromsetis a form of batch processing. Examples could be reporting, updating caches (preventing cache stampedes) and counter tables. Prefetching If there isresult. Examples could be pagination. On Request If there is no good way to preprocess the data then you just have to send the result

Post: MySQL Query Cache

data sets. For example I’m using Query Cache on server which runs this blog. Updates are rather rare so per-table granularity is… derived from this table are invalidated at once. Most of them quite likely would not have change their result set but MySQL has no way to identify which one of them would so it gets rid of all of them. This is

Post: MySQL-Memcached or NOSQL Tokyo Tyrant - part 1

… into using a database like MySQL with no thought into whether if …Is the database even the best place for this data? I decided to walk through settingUpdate data from that row and replace the stored contents on disk C.) Use the data from… up the result via that key. It then uses data from that random…

Post: Using Flexviews - part one, introduction to materialized views

is lower because incremental refresh is faster than recomputing the contents from scratch. The contents of the result set are updatedno outer join), no non-deterministic functions, etc. There is overhead for change-data capture. Some extra storage is