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


Subject
Views
Written By
Posted
143
May 22, 2017 09:32AM
73
May 22, 2017 11:24AM
62
May 22, 2017 11:38AM
67
May 23, 2017 10:43AM
109
May 23, 2017 11:10AM
57
May 23, 2017 02:24PM
Re: Select count very slow
69
May 23, 2017 04:05PM
66
May 23, 2017 08:04PM


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.