The default MySQL in-memory engine only supports table-locks. This is killing our performance on our session table (using Joomla on the front-end).

Is there a (third-party) engine of an in-memory table that supports row-based locking?

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

ndb's memory engine does row-level locking: http://dev.mysql.com/doc/refman/5.5/en/memory-storage-engine.html I'm not aware of any other plugin that does.

Have you considered using tmpfs or ramfs for storage?

link|improve this answer
feedback

I would recommend two things:

  1. InnoDB (row-level locking)
  2. A very large innodb buffer pool

This would provide the necessary row-level locking, ACID complaint transactions per SQL statement, automatica flushing of data to disk (up to 10MB per sec (default)) plus data recovery in the event of a crash.

Notwithstanding, @sreimer's answer is provocative and yet very good because NDB is supposed to be ACID compliant (supports transactions). Since you are recording session data and there is only a simple primary key lookup for that session data, @sreimer's answer is more than likely the answer you want. He get's a +1 from me anyway, but I would still recommend InnoDB.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.