The query has a high query time (about 1, 6 – 2 seconds), and my database is almost empty.
In order to verify the performance of a larger data set, I have cloned my database and filled it with thousands of rows. Very strange The query takes less time than before (0,5 seconds).
Using the explain command on two queries will get the same result.
I don’t know, so where Can you see any indicators or differences between db?
Edit:
I tried to dump the DDL of two modes: mysqldump -u user -ppwd -h ***** -d mySchema> mySchemaDDL.sql
Then I ran the diff command about 2 dumps, and the result was: no difference..
This is an example of my results:
Edit 2:
Screen shot of the result of EXPPLAIN EXTENDED. The result is equal to two DBs ..
You can:
>Use the mysql OPTIMIZE TABLE command
>Check the fragmentation issues in the hard disk>Truncate the table (not just delete) and Insert all values again
The query on my server and the MySql InnoDB architecture have a very strange problem.
The query has a relatively High query time (about 1,6-2 seconds), and my database is almost empty.
In order to verify the performance of a larger data set, I have cloned my database and populated it Thousands of rows. It’s very strange that the query takes less time (0,5 seconds) than before.
Using the explain command on both queries will get the same results.
I don’t know, so where can I see any metrics or differences between db?
Edit:
I tried to dump the DDL of two modes: mysqldump -u user -ppwd -h ***** -d mySchema> mySchemaDDL.sql
Then I ran the diff command about 2 dumps, and the result was: no difference..
This is an example of my results:
Edit 2:
Screen shot of the result of EXPLAIN EXTENDED. The result is equal to two DBs..
The database has storage problems similar to hard disk fragmentation. After a large number of insertions and deletions, The data is stored in a suboptimal format. If cloned from a backup, only optimized internal storage is used to create a new database in one batch operation. In this case, mysqldump will return the same information.
< p>You can:
>Use the mysql OPTIMIZE TABLE command
>Check the fragmentation issues in the hard disk>Truncate the table (not just delete) and insert all values again