sql - Strange better mysql query perfomance on bigger schema -
i have strange problem query , mysql innodb schema on server..
that query has high query time (about 1,6 - 2 seconds), , db empty.
in order verify performance on bigger data set have cloned db, , populated thousand more rows. strange thing query take less time before (0,5 seconds).
using explain
command on both query gives same results.
i have no idea, can see metric or difference between db??
edit:
i try dump ddl
of both schema: mysqldump -u user -ppwd -h ***** -d myschema > myschemaddl.sql
then have ran diff
command 2 dump , result: there no difference..
this example of result:
edit 2: screenshot of explain extended
result. results equals both db..
databases have storage issues similiar hard drive fragmentation. after lot of inserts , deletes data stored in suboptimal format. if clone backup new database created in 1 batch operation optimized internal storage. in case mysqldump return same information.
you may:
- use mysql optimize table command
- check fragmentation issues in hard disk
- truncate table (not delete) , insert again values
Comments
Post a Comment