Big big architecture better MySQL query performance

There is a very strange problem between the query on my server and the MySql InnoDB architecture.

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 ..

Database existence and hard disk fragmentation Similar storage issues. After a large number of inserts and deletes, the data is stored in a sub-optimal format. If you clone from a backup, only use optimized internal storage to create a new database in a batch operation. In this case, mysqldump will return The same information.

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

Leave a Comment

Your email address will not be published.