May 26, 2012

Post: SHOW INNODB STATUS walk through

InnoDB 442 mysql tables in use 1, locked 0 MySQL thread id 8079, query id 728899 localhost root Sending data select sql_calc_found_rowsInnoDB 166 mysql tables in use 1, locked 0 MySQL thread id 8078, query id 728898 localhost root Sending data select sql_calc_found_rowsInnoDB 114 mysql tables in use 1, locked 0 MySQL thread id 8077, query id 728897 localhost root Sending data select sql_calc_found_rows

Post: Bug fix of InnoDB scalability problem

… (without bugfix): select sql_calc_found_rows * from b limit 5; executes for 20 sec (table b contains ~2 mil rows) the same query but… thread executes 1.4 times slower. So I’d want InnoDB team continue to work on performance improvement. Anyway I think…

Comment: To SQL_CALC_FOUND_ROWS or not to SQL_CALC_FOUND_ROWS?

… simply much more work which needs to be done if sql_calc_found_rows is used. And it is frequently so. In some cases… query instead of 2 (select found_rows() does not touch data) may affect things ie if innodb had to spend a lot of…

Comment: To SQL_CALC_FOUND_ROWS or not to SQL_CALC_FOUND_ROWS?

… while back (2 years ago using INNODB of course) under concurrency the trend of using SQL_CALC_FOUND_ROWS was a bit faster, but then again this finding may have been tainted by the INNODB scalability bug you found.

Post: Are you designing IO bound or CPU bound application ?

…. For example if you have the query which analyzes 10000 rows it often would take fraction of the second with fully… select count(*) from messages where user_id=134 or use SQL_CALC_FOUND_ROWS flag for your main select query. If you’re having… bound applications Clustering (data locality) also becomes very important – if Innodb tables are used having simply auto_increment id on messages…

Comment: To SQL_CALC_FOUND_ROWS or not to SQL_CALC_FOUND_ROWS?

… two very different things – using index to restict amount of rows examined and using index ONLY to get all data query… – filesort and full table scan are mentioned examples. use of Innodb primary key is another case worth to mention – it effectively… columns so touching data does not add much. Belive me SQL_CALC_FOUND_ROWS can make things slower in many cases – if this is…