On Jul 28, 2006, at 7:39 AM, Gerhard Killesreiter wrote:

147.989 1.08 137 cache_get DELETE FROM cache WHERE expire != D


I ran tests deleting from a cache of CivicSpaceLabs.org with 10, 000 rows in the cache.

delete from cache where expire != D
1.57 second 10K rows

delete quick from cache where expire != 1154158000;
Query OK, 10170 rows affected (0.96 sec)

optimize table cache;
1 row in set (0.21 sec)

Drupal's cache has around 80, 000 rows, 3500 pages, so I think it might be worthwhile to use delete.

Cheers,
Kieran