MySQL Forums
Forum List  »  InnoDB

Re: Select count very slow
Posted by: soufiane wahi
Date: May 23, 2017 04:05PM

After some investigations, I found that difference between the 1st and 2nd machine is that 1st is mysql 5.7.17 and second is 5.7.18. and there is a fix between them on count(*) performance.

So I knew that my tests on count(*) was wrong, to found a way a solution of my very slow query which uses 'select * ...'.

The table has already a primary key on id, so I added this :
create index treated_record on record (treated);

And my 'select * ...' works very quickly.

My questions now, is :
- do indexes pose risks on performances?
- could it be fatal if not uses correctly?
- how could I know If I do wrong or not on my index add choice?
- should I add more indexes depending on other queries I do in record table?
- how do you find my record table structure and volume of data? is it normal? should I do it on another way ?

Options: ReplyQuote

Written By
May 22, 2017 09:32AM
May 22, 2017 11:24AM
May 22, 2017 11:38AM
May 23, 2017 10:43AM
May 23, 2017 11:10AM
May 23, 2017 02:24PM
Re: Select count very slow
May 23, 2017 04:05PM
May 23, 2017 08:04PM

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.