good point. Its just a series of INSERTs (8000 or so), but the table
has a fulltext index, so its pretty slow (10 records/sec).
It sounds like I should split up the batch script, then load a few,
pause, load a few, pause, etc.
Any ideas?
Eric
On Wed, Jan 18, 2012 at 12:20 PM, Alex Dean <
alex@crackpot.org> wrote:
> On Jan 18, 2012, at 11:58 AM, Eric Cope wrote:
>
>> Hello all,
>> I have a nightly script that executes a mysql batch file that takes
>> approximately 8 minutes to run. Unfortunately it makes my web server
>> unresponsive for all 8 minutes. I've tried ionice and nice to lower
>> the priority, but it still seems to consume all resources. The weird
>> thing is "top" and "iostat" look like nothing is running. Any ideas?
>>
>> Its mysql 5.1.x
>
> What process are you nice-ing? If your script just fires off a bunch of SQL queries, it's the MySQL server which is going to end up eating all your resources. Nicing the script which is issuing the queries probably won't help much.
>
> Try using EXPLAIN to see if you can make your queries more efficient. After that, look into setting up MySQL replication. You can run your reporting queries against a slave database, and keep that load off the master.
>
> alex
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss