DELETE FROM fsck_log
Mark Smith
smitty at gmail.com
Sun Oct 14 03:38:20 UTC 2007
>
> But, uh. This is bizarre enough that I'd like to run it by anyone else
> on the list before committing. Any reason _not_ to prefer 'TRUNCATE
> TABLE fsck_log' here? Postgres?
The only reason I'd toss out here is that TRUNCATE TABLE's functionality
varies depending on your storage engine, version of MySQL, etc. Unless you
build in rules about when to use it or restrict MogileFS to MySQL 5.0+ on
InnoDB it doesn't seem worth the potential gain for this very specific
situation.
The fsck_log tables I've been having in "production" are always over a
> few million rows :)
>
I'd expect it to be a big hit to just say good-bye to millions of rows
regardless of which you use? Maybe TRUNCATE TABLE is fast enough with MySQL
5.0+, but DELETE is definitely not. I've always done lazy deletes, deleting
some number of rows every $time_period.
If you wanted you could have a tunable that says "enable_truncate_table",
but that seems a bit too micro-management-y. It's not going to hurt you
much to have those fsck_log rows hang out for a bit while you neuter them a
thousand rows at a time, IMHO.
--
Mark Smith / xb95
smitty at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/mogilefs/attachments/20071014/8d50b37c/attachment.htm
More information about the mogilefs
mailing list