<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Jul 28, 2006, at 8:49 AM, Larry Garfield wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">- Flushing the cache is non-cheap.<SPAN class="Apple-converted-space">  </SPAN>I recall a while back someone</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">mentioning MySQL's "deferred" functionality, which could be useful here.<SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">(If it takes an extra half-second for a cache-flush to commit, that's</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">probably not a problem for the business logic.)</FONT></P> </BLOCKQUOTE></DIV><BR><DIV>Right.  The key here is that we do not use auto-increment in this table.  MySQL inserts and deletes assume auto-increments and there are some optimizations that can be done with the LOW-PRIORITY or QUICK for the DELETE command.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">147.989<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>1.08<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>137<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>cache_get<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>DELETE FROM cache WHERE expire != D</DIV></BLOCKQUOTE><BR><DIV>Could be:</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>delete quick from cache where expire!=D; </DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>optimize cache;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>It's been suggested that Drupal can support conditional non-ANSI SQL statements that at DB specific.  Not sure how to check for MySQL version and if that should be done only once so we can run MySQL specific queries.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cheers,</DIV><DIV>Kieran</DIV></BODY></HTML>