dreamwidth/dw-free — pull request #246 by xb95 (2013-02-01 03:11:28+00:00)
Title: Improve Sphinx performance

This change does two major things: we reorganize the posts_raw table
slightly so that the AUTO_INCREMENT column is no longer the PRIMARY KEY,
and then uses MySQL's COMPRESS/UNCOMPRESS to save disk space.

The first change is motivated by performance issues we've seen with the
old schema. Loading one users's posts would involve potentially seeking
to many locations on the disk because InnoDB organizes rows on disk by
the primary key which was, in essence, random here.

IMPORTANT: This change is backwards-incompatible with search
installations. If you deploy this code, you will need to update
your database schema and delete the table and reimport (to get the
compression).