Search code examples
performancepropelmysql

Best MySQL setup for rapidly changing big text fields?


I am trying to optimize a MySQL database for a table with the following characteristics.

Any idea? (storage engine, etc.)

The table:

  • ca. 10,000 rows

  • each row contains one big text field, sized:

    ca. 200 kByte on average.

    ca. 1000 kByte maximally.

  • up to several times per second:

    rows are deleted and inserted.

    data is appended to the text fields.

    the text fields are read.

The type of the text field is currently LONGTEXT, as imposed by Propel ORM's CLOB.


Solution

  • As a starting point I'd advocate Innodb over MyISAM.

    • Row level locking vs table level locking for updates
    • Crash/corruption resistant
    • If you have enough RAM, your dataset can reside in memory (in the innodb buffer pool)

    If you're using a newer version of MySQL with the Innodb plugin, there are some great speed and compression benchmarks for the Barracuda file format. A good blog post on that note (which talks about a situation similar to yours on the surface):

    http://www.mysqlperformanceblog.com/2008/04/23/real-life-use-case-for-barracuda-innodb-file-format/