Notifications
Clear all

Indexing a table?

3 Posts
2 Users
0 Reactions
692 Views
(@gecko64)
Posts: 82
Estimable Member
Topic starter
 

We're troubleshooting some connection failures. As part of the analysis, we have noticed queries in the MySQL query log such as "SELECT * FROM CB_Mail WHERE (IdSender = XXXXX) ORDER BY SendDate DESC LIMIT 10;" are taking anywhere from 1-2 minutes to execute. Our server dev said that the CB_Mail table has over 1 million rows in it. We don't want to delete rows from the table, but are wondering if we turn on indexing on the IdSender column if it would have any unforeseen impact to Combu. Would there be any negative impact to indexing that column? Are there any other suggestions that you have to improve this query's performance?

thanks

Dave

 
Posted : 13/10/2016 5:48 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Theoretically you should already have an index there, but you could try to add another index for only IdSender ASC and SendDate DESC. Remember to make a backup before executing any time-process-critical query 🙂

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 13/10/2016 11:12 am
(@gecko64)
Posts: 82
Estimable Member
Topic starter
 

Great, thanks for the quick reply! We did that and don't see any problems. 

 
Posted : 13/10/2016 5:08 pm
Share: