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


Subject
Views
Written By
Posted
165
March 23, 2017 10:39PM
Re: Horrible MySql performance?
103
March 24, 2017 01:18AM


Sorry, only registered users may post in this forum.

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.