sql - MySQL: extremely inconsistent Rows_examined number between similar queries -


we have complex query have optimized carefully. works well, except time time, takes more time usual. not seem cpu or ram related.

we have been able isolate seems problem: slow instances of query show high rows_examined number in slow_query.log:

 - normal execution time: rows_examined: 140003  - slow execution time: rows_examined: 2265473 

yet, query pretty same: adjust condition , variation can't explain such change in number of rows (we checked manually). besides:

 - slowness occurs randomly.  - when "explain" queries, output same 

the query looks this:

select a2.stuff, b.stuff, c.stuff     (select a.stuff ... order ... limit ...) a2 straight_join b straight_join c ... 

i apologise: open question. hoping knows behaviour , point me in right direction.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -