Answer the question
In order to leave comments, you need to log in
Slow UPDATE in MySQL
There is a request:
where name is varchar(30) latin1_bin, vals is int(10).
InnoDB table.
Hosting 1Gb VDS-1024 CentOS .
The table has up to 30 entries.
The request runs from 0.003 to 10 seconds.
With the admin, we have already broken all our legs, tried all kinds of tests that recommend configs with the best settings, etc.
The question is where to look?
On local machines, such brakes never happen.
UPDATE
settings
SET
vals = ABS(vals) + 1
WHERE
name = 'somename'
Answer the question
In order to leave comments, you need to log in
1. Muscle server loaded? Is history repeating itself on an empty muscle server?
Maybe the muscle is running out of cache, it is getting your 30 records from a disk that is already overloaded.
2. Do the triggers that are called on this request do something?
Talk to the hoster, maybe they have something with a cache on the host system.
Quite typical for VPS.
Instead of wasting time on random fluctuations, collect statistics for the day and look for the most slow queries with mysqlsla.
Of course, 10 seconds is too much, but hosters have their own opinion.
On 1gb, IMHO, you can use an external MySQL hosting server on a VPS. It works quickly, I recommend using it.
On 1gb, IMHO, you can use an external MySQL hosting server on a VPS. It works quickly, I recommend using it.
Tried, the situation sometimes also repeats.
On up to 30 records, this cannot slow down, well, in any way.
Send the table and I will check the request in a personal on my hosting.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question