cql3 - Datastax: Re-preparing already prepared query warning -
cql3 - Datastax: Re-preparing already prepared query warning -
i have code
uuid notuuid = uuids.timebased(); preparedstatement pstmt = cqlsession.prepare("insert mytable(userid, notifid, notification, time, read, deleted) values(?, ?, ?, ?, ?, ?)"); boundstatement boundstatement = new boundstatement(pstmt); cqlsession.execute(boundstatement.bind(userid, notuuid, notfmsg, system.currenttimemillis(), migificconstants.unread, "false"));
when run code, in log shows
re-preparing prepared query insert mytable(userid, notifid, notification, time, read, deleted) values(?, ?, ?, ?, ?, ?). please note preparing same query more 1 time anti-pattern , impact performance. consider preparing statement once.
is code part of method called multiple times?
statements need prepared 1 time per cluster instance, should in initialization part of application.
cql3 datastax-java-driver
Comments
Post a Comment