incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Kjellman <mkjell...@barracuda.com>
Subject Re: should you reuse PreparedStatements?
Date Sun, 04 Aug 2013 00:37:34 GMT
Absolutely you should reuse prepared statements where possible in your
client code.

On 8/3/13, 5:34 PM, "Michael Cohen" <mcohen01@gmail.com> wrote:

>More specifically, is it "best practice" to reuse PreparedStatements,
>rather than creating a new one  via session.prepare() on each database
>access? Is there any performance benefit to this? I've glanced at the java
>driver code and it does appear that if I were doing something like:
>
>public List fetchSomething() {
>    return this.session.execute(
>this.session.prepare("some cql")


Mime
View raw message