June 19, 2013

Post: When EXPLAIN estimates can go wrong!

index On 5.5: mysql [localhost] {msandbox} (foo2) > explain select count(*) from test_estimate where type=6 \G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: test_estimate typepage. Then it assumes all pages

Comment: Database problems in MySQL/PHP Applications

PHP application: > SELECT * FROM articles WHERE user_id IN(23,545,654,34) > instead of: > SELECT * FROM articles WHERE user_id IN (SELECTEXPLAIN or optimizing your queries remember > we’re here to help. Partial agreement: “Use Indexes smartly.” Indexing

Post: Database problems in MySQL/PHP Applications

SELECT id FROM users WHERE featured=1) Some day this should be fixed however but do not expect it soon. Use IndexesPHP applications use test database with reasonable amount of data in it. And do run EXPLAIN