While using Cassandra dialect, because of preparing query statement multiple times, there are warnings like that
Quote:
Re-preparing already prepared query ... Please note that preparing the same query more than once is generally an anti-pattern and will likely affect performance. Consider preparing the statement only once.
As far as I seen from the code in the `Cassandra Dialect`, statement is prepared two times:
- While loading from cache loader into prepared statement cache
https://github.com/hibernate/hibernate-ogm/blob/master/cassandra/src/main/java/org/hibernate/ogm/datastore/cassandra/CassandraDialect.java#L108- After retrieving from cache
https://github.com/hibernate/hibernate-ogm/blob/master/cassandra/src/main/java/org/hibernate/ogm/datastore/cassandra/CassandraDialect.java#L126I think, the second one (preparing query statement after retrieving from cache) is redundant, isn't it?
Regards.