Slow UPDATE in MySQL


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
49 views
Feature request:
UPDATE
settings
SET
vals = ABS(vals) + 1
WHERE
name = 'somename'

where name is varchar(30) latin1_bin, vals — int(10).
The Table Is InnoDB.
Hosting 1Gb VDS-1024 CentOS.
In the table to 30 entries.
The query is from 0.003 to 10 seconds.
With the admin already broke all the legs, tried all sorts of tests, recommending a config with the best settings, etc.
The question is — where to look?
On the local machines such as brakes never happens.
by | 49 views

6 Answers

0 like 0 dislike
1. MySQL server loaded? On an empty MySQL server history repeats itself?
Maybe muscle the end of the cache, it get your 30 records from a drive that is overloaded.
2. Triggers that are invoked on the request, doing something?
by
0 like 0 dislike
Talk with the hoster, maybe they have on the host system, something with cache.
by
0 like 0 dislike
It is quite typical for the VPS.
Instead of wasting time on random fluctuations, collect statistics for the day and look for the most inhibitory queries program mysqlsla.
\r
Of course, 10 seconds is a bit much, but the hosters my opinion.
by
0 like 0 dislike
On a 1gb IMHO it is possible on a VPS to use an external MySQL server hosting. It works quickly, I recommend to use it.
by
0 like 0 dislike
On a 1gb IMHO it is possible on a VPS to use an external MySQL server hosting. It works quickly, I recommend to use it.
Tried, the situation is sometimes also repeated.
\r

And maybe then, not in MySQL server. You wrote that on the local machine no problem.
You query from the MySQL console or using some library (libmysql, pdo)?
by
0 like 0 dislike
For up to 30 records to brake, well, nothing.
Send the table and the query in a personal check on your hosting.
by

Related questions

0 like 0 dislike
7 answers
0 like 0 dislike
2 answers
asked May 21, 2019 by litvinov-an
0 like 0 dislike
4 answers
asked Mar 21, 2019 by EnChikiben
0 like 0 dislike
1 answer
asked May 20, 2019 by UNy
110,608 questions
257,186 answers
0 comments
28,140 users