List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 8 1999 11:49pm
Subject:Re: INSERT DELAYED question
View as plain text  
>>>>> "Jules" == Jules Bean <jmlb2@stripped> writes:

Jules> Jeff Schwartz wrote:
>> 
>> I just added DELAYED to some of my inserts and noticed that the processlist
>> shows
>> 
>> 1      Sleep   62
>> 3      Sleep   212
>> 4      Sleep   2
>> 5      Sleep   71
>> 6      Sleep   45
>> 7      Sleep   193
>> 8      Sleep   25
>> 9      Sleep   16
>> 10      Sleep   24
>> 11      Sleep   30
>> 177         Delayed_insert   112   Waiting on cond   log
>> 178         Delayed_insert   112   Waiting on cond   event_users
>> 268     mysql   Query   0      SHOW PROCESSLIST
>> 
>> Yet all other processes are sleeping. Does this mean the delayed inserts are
>> still waiting even though nothing else is going on?

Jules> You can find out if there are any inserts pending with show status -
Jules> look for 'not_flushed_delayed_rows' (or something like that, I may have
Jules> the name slightly wrong).  If that's zero, as I suspect it will be,
Jules> you're fine.

Jules> I interpet 'Waiting on cond' (in my database) to mean that the delayed
Jules> thread is hanging around in case some new inserts are coming along, but
Jules> is otherwise idle.  I'm not quite sure what it's supposed to mean ;-)

Exactly!

(The delayed insert threads are waiting on a posix thread
'condition' variable for a signal for more insert/delayed inserts.
The thread will die if there is no new insert delayed inserts within
a given time limit (delayed_insert_timeout, default 5 minutes)

Regards,
Monty
Thread
INSERT DELAYED questionJeff Schwartz8 Sep
  • Re: INSERT DELAYED questionJules Bean9 Sep
    • Re: INSERT DELAYED questionMichael Widenius9 Sep
  • Re: INSERT DELAYED questionsinisa9 Sep