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
RGuillermoProject ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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
0
theGhost_k8Database ConsultantCommented:
Hi,

Try to debug that when this repeats & collect following information from mysql:
show engine innodb status\G
show full processlist;

Also, if this is specific query, check with explain plan and share it with us along with table definition(s), if you can.

see if there's some external process holding your queries; most commonly backups.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vitor MontalvãoMSSQL Senior EngineerCommented:
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?
0
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

RGuillermoProject ManagerAuthor Commented:
Thanks to all Experts, it took us a while test all posibilites
0
theGhost_k8Database ConsultantCommented:
It'd be better if you can post your findings for people who come surfing here.
0
RGuillermoProject ManagerAuthor Commented:
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
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.