[Buildbot-devel] Several scalability questions

Kristian Nielsen knielsen at knielsen-hq.org
Fri Jan 21 12:33:42 UTC 2011


"Dustin J. Mitchell" <dustin at v.igoro.us> writes:

> Note that MySQL doesn't delete rows, so running 'DELETE FROM ..' will
> actually make your tables *slower*, as MySQL will scan all of the
> deleted rows.  You need to analyze (vacuum?) the table to reclaim that
> space.

Well, it depends ... if using InnoDB (which I'd recommend), then it will
shrink the table eventually as rows are deleted, though some fragmentation
will occur (eg. 50% holes could be expected). Deleting a large continuous
range of primary key values will free the underlying pages for example.
Not 100% sure about MyISAM, I think you're right that it will keep the holes
(until a new insert fills something in).

To de-fragment the table, analyze will not work (and there is no vacuum in
mysql). But something like ALTER TABLE xxx ENGINE=<your favorite> will
re-build the table, eliminating any fragmentation.

Hope this helps,

 - Kristian

(who is just now taking some time to get into Buildbot again after long time
of hard MariaDB work, and very happy to see all the activity that has happened
the last year or so).




More information about the devel mailing list