0

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!

1 Answer 1

1

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".

Sign up to request clarification or add additional context in comments.

1 Comment

Nice idea, I like it a lot and might go for it. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.