On 8/8/07, Lars Aronsson lars@aronsson.se wrote:
Isn't it possible to distribute MySQL tables as binary files?
Probably not, for InnoDB, or at any rate it would be a serious pain in the neck. "Table space" is shared among all tables and all databases on the server, in the same files. You can have per-table table spaces, but not completely: necessary metadata is still stored in the main table space file. Table space kind of sucks in other ways, too, like it generally doesn't shrink even if you drop tables/databases (without doing some extra trickery).
And of course the binary files are worthless to you if you're importing into MyISAM, PostgreSQL, Oracle (experimental though support may be), a different version of InnoDB, or any other database you might want to write support for, or for that matter a significantly different version of MediaWiki. That's why XML files are preferred, and failing that SQL files, which will at least work for any supported version of MySQL and any storage engine in it.
So with all that said, it shouldn't be surprising that grabbing a bit of data directly from the files would be a lot faster than actually importing them and then grabbing the data. Not that this is much of an API queston anymore.