June 19, 2013

Post: PHP Large result sets and summary tables.

… tables which was done by executing some huge group by query, doing some stuff with results and then populating tables. This all… by default mysql_query uses mysql_store_result C library call and buffers all result set in the process memory. Not good if…_limit PHP config variable because that only controls memory which passes via PHP memory management which does not apply to MySQL result set. OK…

Comment: Using delayed JOIN to optimize count(*) and LIMIT queries

… it yourself is the way. Recently I had a huge search query (in Postgres) which was horrendously slow. …value computed above will not appear in the final result set since the first query from the active table already…joins from the temp table (no freaky IN() from php) It went from a few minutes to a …