Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log warnings - "Re-preparing already prepared query UPDATE" #15

Closed
Rastusik opened this issue Jun 11, 2014 · 2 comments
Closed

Log warnings - "Re-preparing already prepared query UPDATE" #15

Rastusik opened this issue Jun 11, 2014 · 2 comments
Assignees
Labels

Comments

@Rastusik
Copy link

I'm using spring and with every call to mappingSession.append(), following warnings are being written to the log:

2014-06-10 23:53:53.994  WARN   --- [Driver worker-7] com.datastax.driver.core.Cluster         : Re-preparing already prepared query UPDATE test_db.test SET days=days+{16098} WHERE id=?;. 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.

I think that fixing this issue would bring a little performance gain at least, but the main thing is to get rid of the warning from the log.

Thanks for fixing this.

@valchkou valchkou added the bug label Jun 12, 2014
@valchkou valchkou self-assigned this Jun 12, 2014
@valchkou
Copy link
Owner

Done. PreparedStatements now are cached and reused. Refresh from maven central

@Rastusik
Copy link
Author

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants