Using MySQL 5.0.x, we have a process to generate benchmarks for our business that consolidates a bunch of data, then pull out data based on certain criteria. This process used to take 18 hours, it's been creeping up to over 24 hours, meaning it's now intruding on the business day.
The problem with this is that these queries substantially slow down the database. Both the INSERT ... SELECT
queries and, even moreso, ANALYZE
.
Is there some way to make a single query not slow down the entire system? Can MySQL throttle it to not bog down the whole dbms? If these could continue running during the business day I'd be very happy, but without that, ... I don't know because I've made this as streamlined as I can with our current system. We're testing moving to MySQL 5.5, and the improvements it gives (like InnoDB) but it would be nice to know if throttling was possible, or if there's some setting I'm missing that's causing a single query to drag down the system.
SHOW CREATE TABLE
) on theINSERT..SELECT
queries? Have you noted in theSHOW FULL PROCESSLIST
what state the queries take the most time?INSERT INTO ... SELECT * FROM [table] WHERE group IN (list of 50 groups)
) noticeably slows down the entire database system, so that other queries take several times longer than usual. The database it's selecting from is 4.5GB, with 60 columns and 35 indexes. As for what state, I don't recall, I killed it this morning without taking note.ALTER TABLE
on a table that big and it will slow the system down too. The hardware is pretty good, 16 cores, 16GB of memory... I don't have the exact specs but, again, under most utilization everything flies by. It's just that certain queries slow the whole thing down, to the point that I can't even add an index to some tables during work hours, because the entire site slows down. Is this normal behavior?