Re: Still struggling witn like 'CTV%' over varchar.... I simple cannot understand..

2012-11-28 Thread Johan De Meersman

- Original Message -
 From: Andrés Tello mr.crip...@gmail.com

 showed the usage of the index, then, some time later, it show, for
 the same query, the usage of no index...

Look at the rows field. It's obvious that this table is live and rather on 
the active side; and the data has changed in such a way that on the second 
explain, the optimizer estimates that there would be little benefit from using 
that key - most likely due to cardinality.

Make a copy of the table so your data is static, and you'll get the same 
explain every time. That will, however, apparently not simulate the real world 
for you.

If this is a MyISAM table you may need to run ANALYZE TABLE to update the 
statistics; or you may just have to accept that the same query on different 
data may benefit from a different execution plan - just as a different query on 
the same data would.


-- 
Linux Bier Wanderung 2012, now also available in Belgium!
August, 12 to 19, Diksmuide, Belgium - http://lbw2012.tuxera.be

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: sync_binlog=0 affects MySQL performance but sync_binlog=1 works well

2012-11-28 Thread Reindl Harald


Am 29.11.2012 03:29, schrieb Dehua Yang:
 Finally , when  the sync_binlog=0 ,  the commit statement disappear in the
 slow.log 

in the subject you say exactly the opposite and if something
disappears in the slow.log it is good - so how should we help?



signature.asc
Description: OpenPGP digital signature