R
R
Rodion Gashé2011-01-10 10:07:12
MySQL
Rodion Gashé, 2011-01-10 10:07:12

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

6 answer(s)
Q
Q2W, 2011-01-10
@Q2W

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?

T
tampere, 2011-01-10
@tampere

Talk to the hoster, maybe they have something with a cache on the host system.

P
pwlnw, 2011-01-10
@pwlnw

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.

B
BasilioCat, 2011-01-10
@BasilioCat

On 1gb, IMHO, you can use an external MySQL hosting server on a VPS. It works quickly, I recommend using it.

Z
zizop, 2011-01-10
@zizop

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.

Or maybe it's not the MySQL server. You wrote that there are no problems on the local machine.
Are you running queries from the MySQL console or are you using some library (libmysql, pdo)?

P
Puma Thailand, 2011-01-10
@opium

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 question

Ask a Question

731 491 924 answers to any question