Link to home
Create AccountLog in
Avatar of RGuillermo
RGuillermoFlag for United States of America

asked on

MYSQL why is it sometimes too slow ?

Hello experts,
we have a small database in mysql,
its usually performs really fast
but  sometimes when requesting a very simple query
 it will take too long to respond... like 30 secs o more... and its a very simple query.
and the table is too small....
I have noticed that maybe there are other connections still open and i think not operating.
Could this be the cause and if so what tools do i have to control this ?
Regards
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

you may try to debug via the execution plan to see if there's any abnormalities?

7.4 Visual Explain Plan
https://dev.mysql.com/doc/workbench/en/wb-performance-explain.html
ASKER CERTIFIED SOLUTION
Avatar of theGhost_k8
theGhost_k8
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
I would say that when having multiple connections accessing the table at same time, you will face this poor query performance.
Do you have any index created in that table?
Avatar of RGuillermo

ASKER

Thanks to all Experts, it took us a while test all posibilites
It'd be better if you can post your findings for people who come surfing here.
Two findings.
1. We improved the design of our database... normalizing and eliminating reduce where possible.
2. having adequate indexes and not too many
3. when executing queries be careful with search criteria......
4. If all the above are met very likely you get a fine performance or at least acceptable.
All these come from our programmers...
Regards