List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 2 1999 8:30am
Subject:Re: How exactly does INSERT DELAYED work?
View as plain text  
>>>>> "Jules" == Jules Bean <jmlb2@stripped> writes:

Jules> Michael Widenius wrote:
>> 
Jules> I.e. suppose delayed_insert_limit is 100.  I insert 346 rows in rapid
Jules> succession.  When the handler checks at 100, 200 and 300, there are
Jules> selects still pending.  Then I don't insert any more rows for (say) 20
Jules> minutes.  Do my 346 stay unflushed for this time?  Or is there also a
Jules> timeout?
>> 
>> They stay unflushed for this time if you have running selects the
>> whole time.  Note that if you issue an INSERT without DELAYED, or do a
>> UPDATE or DELETE, then new selects will wait and the INSERT DELAYED
>> will eventually be scheduled

Jules> Assuming SELECTs eventually stop running, how does the delayed handler
Jules> notice?  Does it check regularly?  Or is it signalled by the terminating
Jules> select thread?

As soon as the READ LOCK for the last select is released the INSERT
DELAYED thread will get the lock.

(The lock manager schedules locks according to priority.   INSERT
DELAYED simply has a lower priority than SELECT)

Regards,
Monty
Thread
How exactly does INSERT DELAYED work?Jules Bean1 Sep
  • How exactly does INSERT DELAYED work?Michael Widenius2 Sep
  • Re: How exactly does INSERT DELAYED work?Jules Bean2 Sep
    • Re: How exactly does INSERT DELAYED work?Michael Widenius2 Sep
  • Re: How exactly does INSERT DELAYED work?Jules Bean2 Sep
    • Re: How exactly does INSERT DELAYED work?Michael Widenius2 Sep