This question is not about caching.
I need this in-memory table for many small updates and complicated queries.
I must have it on a server shared between several nodes.
MySQL have MEMORY (HEAP) Storage Engine which is exactly what I need.
Can I tell Hibernate to create such a table, when defining a <class> or a ‘` in the XML?
Is there another solution?
Thanks!
No, you cannot generate those tables via Hibernate. Hibernate chooses storage engine based to dialect, and for MySQL 5 available dialects are MySQL5InnoDBDialect and MySQL5Dialect.
If it is really important to generate database structure via Hibernate, then you can of course go and create dialect yourself. As you see from the source of MySQL5InnoDBDialect, it boils down to “ENGINE = MEMORY”.