MySQL Forums
Forum List  »  Performance

Re: Horrible MySql performance?
Posted by: Øystein Grøvlen
Date: March 24, 2017 01:18AM

Counting 6 million rows in 16 minutes sound very slow.
I just tried this on a MySQL 5.7 database and it took 3 seconds even when all the data had to be read from disk. (This will depend on the size of your rows and the speed of the disk, but none of your columns seem large, so I would consider anything above 30 seconds to be extremely slow.)

Some questions:
- Which version are you using?
- Do you have concurrent updates to the table?
- Could there be uncommitted transactions in your system?
- How big is your InnoDB Buffer Pool?
- Could the issue be the speed of your disks?

You will automatically get an index on what you declare as the primary key, so it seems the index you created is redundant.

Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote

Written By
March 23, 2017 10:39PM
March 24, 2017 12:52AM
Re: Horrible MySql performance?
March 24, 2017 01:18AM
March 24, 2017 09:18AM
March 24, 2017 09:21AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.