select - Mysql alter query plan type -


hi have query

      select (select csn apps b           a.key1=b.key1 , a.key2 = b.key2  , b.seq=max(b.seq) limit 0,1) csn,          a.key1 apps  group key1, key2  

now when use explain type range , extras 'using index group-by'. plan takes 10 seconds complete on 350 000 row table. starts take 4 seconds, , execution plan type: index , extra: using where

so question why happening once plan first , once second, , can alter plan somehow?

okey figured out. innodb statistics off. called analyze table update statistics , got lower number.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -