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
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
Great, thanks for the quick reply! We did that and don't see any problems.