You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Shalom Sagges <sh...@liveperson.com> on 2017/08/28 07:43:04 UTC

Working With Prepared Statements

Hi Everyone,

I want to start working with Prepared Statements.

I've read
https://docs.datastax.com/en/developer/java-driver/3.1/manual/statements/prepared/
and
just wanted to know if there are any other considerations I need to take
into account when deciding to use Prepared Statements.

Thanks!


Shalom Sagges
DBA
<http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
<http://www.facebook.com/LivePersonInc> We Create Meaningful Connections

-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.

Re: Working With Prepared Statements

Posted by Shalom Sagges <sh...@liveperson.com>.
Thanks guys for all the info!




Shalom Sagges
DBA
T: +972-74-700-4035
<http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
<http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
<https://liveperson.docsend.com/view/8iiswfp>


On Wed, Aug 30, 2017 at 10:54 AM, Oleksandr Shulgin <
oleksandr.shulgin@zalando.de> wrote:

> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <sh...@liveperson.com>
> wrote:
>
>> Insights, anyone?
>>
>
> There were reports of Cassandra failing to start due to trying to load the
> prepared statements from a cached table.  This can only affect you if you
> have a lot (tens of thousands, IIRC) of prepared statements.  A fix seems
> to have made it into 3.11.1:
>
> https://issues.apache.org/jira/browse/CASSANDRA-13641
>
> Search the the users list for "prepared statement preload" and you'll find
> some recent threads.
>
> Cheers,
> --
> Alex
>
>

-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.

Re: Working With Prepared Statements

Posted by Oleksandr Shulgin <ol...@zalando.de>.
On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <sh...@liveperson.com>
wrote:

> Insights, anyone?
>

There were reports of Cassandra failing to start due to trying to load the
prepared statements from a cached table.  This can only affect you if you
have a lot (tens of thousands, IIRC) of prepared statements.  A fix seems
to have made it into 3.11.1:

https://issues.apache.org/jira/browse/CASSANDRA-13641

Search the the users list for "prepared statement preload" and you'll find
some recent threads.

Cheers,
--
Alex

Re: Working With Prepared Statements

Posted by kurt greaves <ku...@instaclustr.com>.
From memory prepared statements that are idempotent will not be set as
idempotent, so if you are using prepared statements that you know are
idempotent you should make sure to set idempotent on them. For java driver
see https://github.com/datastax/java-driver/tree/3.x/manual/idempotence​

Re: Working With Prepared Statements

Posted by Shalom Sagges <sh...@liveperson.com>.
Thanks a lot!
I'll make sure it'll be prepared once.


Shalom Sagges
DBA
T: +972-74-700-4035
<http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
<http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
<https://liveperson.docsend.com/view/8iiswfp>


On Tue, Aug 29, 2017 at 6:10 PM, I PVP <ip...@hotmail.com> wrote:

> Hi Shalom,
>
> If that helps..
> From the documentation : "You should prepare only once, and cache the
> PreparedStatement in your application (it is thread-safe). If you call
> prepare multiple times with the same query string, the driver will log a
> warning”
>
>
> On August 29, 2017 at 12:04:34 PM, Shalom Sagges (shaloms@liveperson.com)
> wrote:
>
> That's a good to know post.
>
> Thanks for the info Nicolas!
>
>
> Shalom Sagges
> DBA
> T: +972-74-700-4035 <+972%2074-700-4035>
> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
> <https://liveperson.docsend.com/view/8iiswfp>
>
>
> On Tue, Aug 29, 2017 at 3:04 PM, Nicolas Guyomar <
> nicolas.guyomar@gmail.com> wrote:
>
>> I would suggest to read this post by the last pickle:
>> http://thelastpickle.com/blog/2016/09/15/Null-bindin
>> gs-on-prepared-statements-and-undesired-tombstone-creation.html  and
>> make sure you are not concerned by the mentioned behavior, because some
>> people still choose to use C* v2.X because of some bugs in v3 branch
>>
>> Have fun !
>>
>> On 29 August 2017 at 13:43, Shalom Sagges <sh...@liveperson.com> wrote:
>>
>>> Sounds great then.
>>>
>>> Thanks a lot guys! 🙂
>>>
>>>
>>> Shalom Sagges
>>> DBA
>>> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>>>
>>>
>>>
>>> On Tue, Aug 29, 2017 at 2:41 PM, Nicolas Guyomar <
>>> nicolas.guyomar@gmail.com> wrote:
>>>
>>>> Hi Shalom,
>>>>
>>>> AFAIK, you are completely safe with prepared statement, there are no
>>>> caveats using them, and you will have better performance.
>>>>
>>>> Make sure to only prepare them once ;)
>>>>
>>>> On 29 August 2017 at 13:41, Matija Gobec <ma...@gmail.com> wrote:
>>>>
>>>>> I don't see any disadvantages or warning signs. You will see a
>>>>> performance increase on moderate request rate frequency.
>>>>>
>>>>> On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges <shaloms@liveperson.com
>>>>> > wrote:
>>>>>
>>>>>> Hi Matija,
>>>>>>
>>>>>> I just wish to know if there are any disadvantages when using
>>>>>> prepared statement or any warning signs I should look for. Queries will run
>>>>>> multiple times so it fits the use case.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>>
>>>>>> Shalom Sagges
>>>>>> DBA
>>>>>> <http://www.linkedin.com/company/164748>
>>>>>> <http://twitter.com/liveperson>
>>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>>> Connections
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec <ma...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Do you have any concrete questions re prepared statements?
>>>>>>>
>>>>>>> They are faster to execute since the statement is already parsed and
>>>>>>> in C* and you just pass the parameters. No additional statement processing
>>>>>>> is needed.
>>>>>>>
>>>>>>> Matija
>>>>>>>
>>>>>>> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <
>>>>>>> shaloms@liveperson.com> wrote:
>>>>>>>
>>>>>>>> Insights, anyone?
>>>>>>>>
>>>>>>>>
>>>>>>>> Shalom Sagges
>>>>>>>> DBA
>>>>>>>> <http://www.linkedin.com/company/164748>
>>>>>>>> <http://twitter.com/liveperson>
>>>>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>>>>> Connections
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <
>>>>>>>> shaloms@liveperson.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Everyone,
>>>>>>>>>
>>>>>>>>> I want to start working with Prepared Statements.
>>>>>>>>>
>>>>>>>>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>>>>>>>>> manual/statements/prepared/ and just wanted to know if there are
>>>>>>>>> any other considerations I need to take into account when deciding to use
>>>>>>>>> Prepared Statements.
>>>>>>>>>
>>>>>>>>> Thanks!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Shalom Sagges
>>>>>>>>> DBA
>>>>>>>>> <http://www.linkedin.com/company/164748>
>>>>>>>>> <http://twitter.com/liveperson>
>>>>>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>>>>>> Connections
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> This message may contain confidential and/or privileged
>>>>>>>> information.
>>>>>>>> If you are not the addressee or authorized to receive this on
>>>>>>>> behalf of the addressee you must not use, copy, disclose or take action
>>>>>>>> based on this message or any information herein.
>>>>>>>> If you have received this message in error, please advise the
>>>>>>>> sender immediately by reply email and delete this message. Thank you.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> This message may contain confidential and/or privileged information.
>>>>>> If you are not the addressee or authorized to receive this on behalf
>>>>>> of the addressee you must not use, copy, disclose or take action based on
>>>>>> this message or any information herein.
>>>>>> If you have received this message in error, please advise the sender
>>>>>> immediately by reply email and delete this message. Thank you.
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>> This message may contain confidential and/or privileged information.
>>> If you are not the addressee or authorized to receive this on behalf of
>>> the addressee you must not use, copy, disclose or take action based on this
>>> message or any information herein.
>>> If you have received this message in error, please advise the sender
>>> immediately by reply email and delete this message. Thank you.
>>>
>>
>>
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of
> the addressee you must not use, copy, disclose or take action based on this
> message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>
>

-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.

Re: Working With Prepared Statements

Posted by I PVP <ip...@hotmail.com>.
Hi Shalom,

If that helps..
From the documentation : "You should prepare only once, and cache the PreparedStatement in your application (it is thread-safe). If you call prepare multiple times with the same query string, the driver will log a warning”



On August 29, 2017 at 12:04:34 PM, Shalom Sagges (shaloms@liveperson.com<ma...@liveperson.com>) wrote:

That's a good to know post.

Thanks for the info Nicolas!


[https://signature.s3.amazonaws.com/2015/lp_logo.png]
Shalom Sagges
DBA
T: +972-74-700-4035
[https://signature.s3.amazonaws.com/2015/LinkedIn.png]<http://www.linkedin.com/company/164748>  [https://signature.s3.amazonaws.com/2015/Twitter.png] <http://twitter.com/liveperson>   [https://signature.s3.amazonaws.com/2015/Facebook.png] <http://www.facebook.com/LivePersonInc>
        We Create Meaningful Connections

[https://signature.s3.amazonaws.com/2016/banners/V1_3_email_signature.png]<https://liveperson.docsend.com/view/8iiswfp>


On Tue, Aug 29, 2017 at 3:04 PM, Nicolas Guyomar <ni...@gmail.com>> wrote:
I would suggest to read this post by the last pickle: http://thelastpickle.com/blog/2016/09/15/Null-bindings-on-prepared-statements-and-undesired-tombstone-creation.html  and make sure you are not concerned by the mentioned behavior, because some people still choose to use C* v2.X because of some bugs in v3 branch

Have fun !

On 29 August 2017 at 13:43, Shalom Sagges <sh...@liveperson.com>> wrote:
Sounds great then.

Thanks a lot guys! 🙂


[https://signature.s3.amazonaws.com/2015/lp_logo.png]
Shalom Sagges
DBA

[https://signature.s3.amazonaws.com/2015/LinkedIn.png]<http://www.linkedin.com/company/164748>  [https://signature.s3.amazonaws.com/2015/Twitter.png] <http://twitter.com/liveperson>   [https://signature.s3.amazonaws.com/2015/Facebook.png] <http://www.facebook.com/LivePersonInc>
        We Create Meaningful Connections





On Tue, Aug 29, 2017 at 2:41 PM, Nicolas Guyomar <ni...@gmail.com>> wrote:
Hi Shalom,

AFAIK, you are completely safe with prepared statement, there are no caveats using them, and you will have better performance.

Make sure to only prepare them once ;)

On 29 August 2017 at 13:41, Matija Gobec <ma...@gmail.com>> wrote:
I don't see any disadvantages or warning signs. You will see a performance increase on moderate request rate frequency.

On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges <sh...@liveperson.com>> wrote:
Hi Matija,

I just wish to know if there are any disadvantages when using prepared statement or any warning signs I should look for. Queries will run multiple times so it fits the use case.

Thanks!


[https://signature.s3.amazonaws.com/2015/lp_logo.png]
Shalom Sagges
DBA

[https://signature.s3.amazonaws.com/2015/LinkedIn.png]<http://www.linkedin.com/company/164748>  [https://signature.s3.amazonaws.com/2015/Twitter.png] <http://twitter.com/liveperson>   [https://signature.s3.amazonaws.com/2015/Facebook.png] <http://www.facebook.com/LivePersonInc>
        We Create Meaningful Connections





On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec <ma...@gmail.com>> wrote:
Do you have any concrete questions re prepared statements?

They are faster to execute since the statement is already parsed and in C* and you just pass the parameters. No additional statement processing is needed.

Matija

On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <sh...@liveperson.com>> wrote:
Insights, anyone?


[https://signature.s3.amazonaws.com/2015/lp_logo.png]
Shalom Sagges
DBA

[https://signature.s3.amazonaws.com/2015/LinkedIn.png]<http://www.linkedin.com/company/164748>  [https://signature.s3.amazonaws.com/2015/Twitter.png] <http://twitter.com/liveperson>   [https://signature.s3.amazonaws.com/2015/Facebook.png] <http://www.facebook.com/LivePersonInc>
        We Create Meaningful Connections





On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <sh...@liveperson.com>> wrote:
Hi Everyone,

I want to start working with Prepared Statements.

I've read https://docs.datastax.com/en/developer/java-driver/3.1/manual/statements/prepared/ and just wanted to know if there are any other considerations I need to take into account when deciding to use Prepared Statements.

Thanks!


[https://signature.s3.amazonaws.com/2015/lp_logo.png]
Shalom Sagges
DBA

[https://signature.s3.amazonaws.com/2015/LinkedIn.png]<http://www.linkedin.com/company/164748>  [https://signature.s3.amazonaws.com/2015/Twitter.png] <http://twitter.com/liveperson>   [https://signature.s3.amazonaws.com/2015/Facebook.png] <http://www.facebook.com/LivePersonInc>
        We Create Meaningful Connections






This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this on behalf of the addressee you must not use, copy, disclose or take action based on this message or any information herein.
If you have received this message in error, please advise the sender immediately by reply email and delete this message. Thank you.



This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this on behalf of the addressee you must not use, copy, disclose or take action based on this message or any information herein.
If you have received this message in error, please advise the sender immediately by reply email and delete this message. Thank you.




This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this on behalf of the addressee you must not use, copy, disclose or take action based on this message or any information herein.
If you have received this message in error, please advise the sender immediately by reply email and delete this message. Thank you.



This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this on behalf of the addressee you must not use, copy, disclose or take action based on this message or any information herein.
If you have received this message in error, please advise the sender immediately by reply email and delete this message. Thank you.

Re: Working With Prepared Statements

Posted by Shalom Sagges <sh...@liveperson.com>.
That's a good to know post.

Thanks for the info Nicolas!


Shalom Sagges
DBA
T: +972-74-700-4035
<http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
<http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
<https://liveperson.docsend.com/view/8iiswfp>


On Tue, Aug 29, 2017 at 3:04 PM, Nicolas Guyomar <ni...@gmail.com>
wrote:

> I would suggest to read this post by the last pickle:
> http://thelastpickle.com/blog/2016/09/15/Null-bindings-on-prepared-
> statements-and-undesired-tombstone-creation.html  and make sure you are
> not concerned by the mentioned behavior, because some people still choose
> to use C* v2.X because of some bugs in v3 branch
>
> Have fun !
>
> On 29 August 2017 at 13:43, Shalom Sagges <sh...@liveperson.com> wrote:
>
>> Sounds great then.
>>
>> Thanks a lot guys! 🙂
>>
>>
>> Shalom Sagges
>> DBA
>> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
>> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>>
>>
>>
>> On Tue, Aug 29, 2017 at 2:41 PM, Nicolas Guyomar <
>> nicolas.guyomar@gmail.com> wrote:
>>
>>> Hi Shalom,
>>>
>>> AFAIK, you are completely safe with prepared statement, there are no
>>> caveats using them, and you will have better performance.
>>>
>>> Make sure to only prepare them once ;)
>>>
>>> On 29 August 2017 at 13:41, Matija Gobec <ma...@gmail.com> wrote:
>>>
>>>> I don't see any disadvantages or warning signs. You will see a
>>>> performance increase on moderate request rate frequency.
>>>>
>>>> On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges <sh...@liveperson.com>
>>>> wrote:
>>>>
>>>>> Hi Matija,
>>>>>
>>>>> I just wish to know if there are any disadvantages when using prepared
>>>>> statement or any warning signs I should look for. Queries will run multiple
>>>>> times so it fits the use case.
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>> Shalom Sagges
>>>>> DBA
>>>>> <http://www.linkedin.com/company/164748>
>>>>> <http://twitter.com/liveperson>
>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>> Connections
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec <ma...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Do you have any concrete questions re prepared statements?
>>>>>>
>>>>>> They are faster to execute since the statement is already parsed and
>>>>>> in C* and you just pass the parameters. No additional statement processing
>>>>>> is needed.
>>>>>>
>>>>>> Matija
>>>>>>
>>>>>> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <
>>>>>> shaloms@liveperson.com> wrote:
>>>>>>
>>>>>>> Insights, anyone?
>>>>>>>
>>>>>>>
>>>>>>> Shalom Sagges
>>>>>>> DBA
>>>>>>> <http://www.linkedin.com/company/164748>
>>>>>>> <http://twitter.com/liveperson>
>>>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>>>> Connections
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <
>>>>>>> shaloms@liveperson.com> wrote:
>>>>>>>
>>>>>>>> Hi Everyone,
>>>>>>>>
>>>>>>>> I want to start working with Prepared Statements.
>>>>>>>>
>>>>>>>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>>>>>>>> manual/statements/prepared/ and just wanted to know if there are
>>>>>>>> any other considerations I need to take into account when deciding to use
>>>>>>>> Prepared Statements.
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>>
>>>>>>>>
>>>>>>>> Shalom Sagges
>>>>>>>> DBA
>>>>>>>> <http://www.linkedin.com/company/164748>
>>>>>>>> <http://twitter.com/liveperson>
>>>>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>>>>> Connections
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> This message may contain confidential and/or privileged information.
>>>>>>> If you are not the addressee or authorized to receive this on behalf
>>>>>>> of the addressee you must not use, copy, disclose or take action based on
>>>>>>> this message or any information herein.
>>>>>>> If you have received this message in error, please advise the sender
>>>>>>> immediately by reply email and delete this message. Thank you.
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> This message may contain confidential and/or privileged information.
>>>>> If you are not the addressee or authorized to receive this on behalf
>>>>> of the addressee you must not use, copy, disclose or take action based on
>>>>> this message or any information herein.
>>>>> If you have received this message in error, please advise the sender
>>>>> immediately by reply email and delete this message. Thank you.
>>>>>
>>>>
>>>>
>>>
>>
>> This message may contain confidential and/or privileged information.
>> If you are not the addressee or authorized to receive this on behalf of
>> the addressee you must not use, copy, disclose or take action based on this
>> message or any information herein.
>> If you have received this message in error, please advise the sender
>> immediately by reply email and delete this message. Thank you.
>>
>
>

-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.

Re: Working With Prepared Statements

Posted by Nicolas Guyomar <ni...@gmail.com>.
I would suggest to read this post by the last pickle:
http://thelastpickle.com/blog/2016/09/15/Null-bindings-on-prepared-statements-and-undesired-tombstone-creation.html
 and make sure you are not concerned by the mentioned behavior, because
some people still choose to use C* v2.X because of some bugs in v3 branch

Have fun !

On 29 August 2017 at 13:43, Shalom Sagges <sh...@liveperson.com> wrote:

> Sounds great then.
>
> Thanks a lot guys! 🙂
>
>
> Shalom Sagges
> DBA
> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>
>
>
> On Tue, Aug 29, 2017 at 2:41 PM, Nicolas Guyomar <
> nicolas.guyomar@gmail.com> wrote:
>
>> Hi Shalom,
>>
>> AFAIK, you are completely safe with prepared statement, there are no
>> caveats using them, and you will have better performance.
>>
>> Make sure to only prepare them once ;)
>>
>> On 29 August 2017 at 13:41, Matija Gobec <ma...@gmail.com> wrote:
>>
>>> I don't see any disadvantages or warning signs. You will see a
>>> performance increase on moderate request rate frequency.
>>>
>>> On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges <sh...@liveperson.com>
>>> wrote:
>>>
>>>> Hi Matija,
>>>>
>>>> I just wish to know if there are any disadvantages when using prepared
>>>> statement or any warning signs I should look for. Queries will run multiple
>>>> times so it fits the use case.
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> Shalom Sagges
>>>> DBA
>>>> <http://www.linkedin.com/company/164748>
>>>> <http://twitter.com/liveperson> <http://www.facebook.com/LivePersonInc> We
>>>> Create Meaningful Connections
>>>>
>>>>
>>>>
>>>> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec <ma...@gmail.com>
>>>> wrote:
>>>>
>>>>> Do you have any concrete questions re prepared statements?
>>>>>
>>>>> They are faster to execute since the statement is already parsed and
>>>>> in C* and you just pass the parameters. No additional statement processing
>>>>> is needed.
>>>>>
>>>>> Matija
>>>>>
>>>>> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <
>>>>> shaloms@liveperson.com> wrote:
>>>>>
>>>>>> Insights, anyone?
>>>>>>
>>>>>>
>>>>>> Shalom Sagges
>>>>>> DBA
>>>>>> <http://www.linkedin.com/company/164748>
>>>>>> <http://twitter.com/liveperson>
>>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>>> Connections
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <
>>>>>> shaloms@liveperson.com> wrote:
>>>>>>
>>>>>>> Hi Everyone,
>>>>>>>
>>>>>>> I want to start working with Prepared Statements.
>>>>>>>
>>>>>>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>>>>>>> manual/statements/prepared/ and just wanted to know if there are
>>>>>>> any other considerations I need to take into account when deciding to use
>>>>>>> Prepared Statements.
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>>
>>>>>>> Shalom Sagges
>>>>>>> DBA
>>>>>>> <http://www.linkedin.com/company/164748>
>>>>>>> <http://twitter.com/liveperson>
>>>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>>>> Connections
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> This message may contain confidential and/or privileged information.
>>>>>> If you are not the addressee or authorized to receive this on behalf
>>>>>> of the addressee you must not use, copy, disclose or take action based on
>>>>>> this message or any information herein.
>>>>>> If you have received this message in error, please advise the sender
>>>>>> immediately by reply email and delete this message. Thank you.
>>>>>>
>>>>>
>>>>>
>>>>
>>>> This message may contain confidential and/or privileged information.
>>>> If you are not the addressee or authorized to receive this on behalf of
>>>> the addressee you must not use, copy, disclose or take action based on this
>>>> message or any information herein.
>>>> If you have received this message in error, please advise the sender
>>>> immediately by reply email and delete this message. Thank you.
>>>>
>>>
>>>
>>
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of
> the addressee you must not use, copy, disclose or take action based on this
> message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>

Re: Working With Prepared Statements

Posted by Shalom Sagges <sh...@liveperson.com>.
Sounds great then.

Thanks a lot guys! 🙂


Shalom Sagges
DBA
<http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
<http://www.facebook.com/LivePersonInc> We Create Meaningful Connections



On Tue, Aug 29, 2017 at 2:41 PM, Nicolas Guyomar <ni...@gmail.com>
wrote:

> Hi Shalom,
>
> AFAIK, you are completely safe with prepared statement, there are no
> caveats using them, and you will have better performance.
>
> Make sure to only prepare them once ;)
>
> On 29 August 2017 at 13:41, Matija Gobec <ma...@gmail.com> wrote:
>
>> I don't see any disadvantages or warning signs. You will see a
>> performance increase on moderate request rate frequency.
>>
>> On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges <sh...@liveperson.com>
>> wrote:
>>
>>> Hi Matija,
>>>
>>> I just wish to know if there are any disadvantages when using prepared
>>> statement or any warning signs I should look for. Queries will run multiple
>>> times so it fits the use case.
>>>
>>> Thanks!
>>>
>>>
>>> Shalom Sagges
>>> DBA
>>> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>>>
>>>
>>>
>>> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec <ma...@gmail.com>
>>> wrote:
>>>
>>>> Do you have any concrete questions re prepared statements?
>>>>
>>>> They are faster to execute since the statement is already parsed and in
>>>> C* and you just pass the parameters. No additional statement processing is
>>>> needed.
>>>>
>>>> Matija
>>>>
>>>> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <shaloms@liveperson.com
>>>> > wrote:
>>>>
>>>>> Insights, anyone?
>>>>>
>>>>>
>>>>> Shalom Sagges
>>>>> DBA
>>>>> <http://www.linkedin.com/company/164748>
>>>>> <http://twitter.com/liveperson>
>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>> Connections
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <
>>>>> shaloms@liveperson.com> wrote:
>>>>>
>>>>>> Hi Everyone,
>>>>>>
>>>>>> I want to start working with Prepared Statements.
>>>>>>
>>>>>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>>>>>> manual/statements/prepared/ and just wanted to know if there are any
>>>>>> other considerations I need to take into account when deciding to use
>>>>>> Prepared Statements.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>>
>>>>>> Shalom Sagges
>>>>>> DBA
>>>>>> <http://www.linkedin.com/company/164748>
>>>>>> <http://twitter.com/liveperson>
>>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>>> Connections
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> This message may contain confidential and/or privileged information.
>>>>> If you are not the addressee or authorized to receive this on behalf
>>>>> of the addressee you must not use, copy, disclose or take action based on
>>>>> this message or any information herein.
>>>>> If you have received this message in error, please advise the sender
>>>>> immediately by reply email and delete this message. Thank you.
>>>>>
>>>>
>>>>
>>>
>>> This message may contain confidential and/or privileged information.
>>> If you are not the addressee or authorized to receive this on behalf of
>>> the addressee you must not use, copy, disclose or take action based on this
>>> message or any information herein.
>>> If you have received this message in error, please advise the sender
>>> immediately by reply email and delete this message. Thank you.
>>>
>>
>>
>

-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.

Re: Working With Prepared Statements

Posted by Nicolas Guyomar <ni...@gmail.com>.
Hi Shalom,

AFAIK, you are completely safe with prepared statement, there are no
caveats using them, and you will have better performance.

Make sure to only prepare them once ;)

On 29 August 2017 at 13:41, Matija Gobec <ma...@gmail.com> wrote:

> I don't see any disadvantages or warning signs. You will see a performance
> increase on moderate request rate frequency.
>
> On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges <sh...@liveperson.com>
> wrote:
>
>> Hi Matija,
>>
>> I just wish to know if there are any disadvantages when using prepared
>> statement or any warning signs I should look for. Queries will run multiple
>> times so it fits the use case.
>>
>> Thanks!
>>
>>
>> Shalom Sagges
>> DBA
>> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
>> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>>
>>
>>
>> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec <ma...@gmail.com>
>> wrote:
>>
>>> Do you have any concrete questions re prepared statements?
>>>
>>> They are faster to execute since the statement is already parsed and in
>>> C* and you just pass the parameters. No additional statement processing is
>>> needed.
>>>
>>> Matija
>>>
>>> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <sh...@liveperson.com>
>>> wrote:
>>>
>>>> Insights, anyone?
>>>>
>>>>
>>>> Shalom Sagges
>>>> DBA
>>>> <http://www.linkedin.com/company/164748>
>>>> <http://twitter.com/liveperson> <http://www.facebook.com/LivePersonInc> We
>>>> Create Meaningful Connections
>>>>
>>>>
>>>>
>>>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <shaloms@liveperson.com
>>>> > wrote:
>>>>
>>>>> Hi Everyone,
>>>>>
>>>>> I want to start working with Prepared Statements.
>>>>>
>>>>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>>>>> manual/statements/prepared/ and just wanted to know if there are any
>>>>> other considerations I need to take into account when deciding to use
>>>>> Prepared Statements.
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>> Shalom Sagges
>>>>> DBA
>>>>> <http://www.linkedin.com/company/164748>
>>>>> <http://twitter.com/liveperson>
>>>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful
>>>>> Connections
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> This message may contain confidential and/or privileged information.
>>>> If you are not the addressee or authorized to receive this on behalf of
>>>> the addressee you must not use, copy, disclose or take action based on this
>>>> message or any information herein.
>>>> If you have received this message in error, please advise the sender
>>>> immediately by reply email and delete this message. Thank you.
>>>>
>>>
>>>
>>
>> This message may contain confidential and/or privileged information.
>> If you are not the addressee or authorized to receive this on behalf of
>> the addressee you must not use, copy, disclose or take action based on this
>> message or any information herein.
>> If you have received this message in error, please advise the sender
>> immediately by reply email and delete this message. Thank you.
>>
>
>

Re: Working With Prepared Statements

Posted by Matija Gobec <ma...@gmail.com>.
I don't see any disadvantages or warning signs. You will see a performance
increase on moderate request rate frequency.

On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges <sh...@liveperson.com>
wrote:

> Hi Matija,
>
> I just wish to know if there are any disadvantages when using prepared
> statement or any warning signs I should look for. Queries will run multiple
> times so it fits the use case.
>
> Thanks!
>
>
> Shalom Sagges
> DBA
> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>
>
>
> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec <ma...@gmail.com>
> wrote:
>
>> Do you have any concrete questions re prepared statements?
>>
>> They are faster to execute since the statement is already parsed and in
>> C* and you just pass the parameters. No additional statement processing is
>> needed.
>>
>> Matija
>>
>> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <sh...@liveperson.com>
>> wrote:
>>
>>> Insights, anyone?
>>>
>>>
>>> Shalom Sagges
>>> DBA
>>> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>>>
>>>
>>>
>>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <sh...@liveperson.com>
>>> wrote:
>>>
>>>> Hi Everyone,
>>>>
>>>> I want to start working with Prepared Statements.
>>>>
>>>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>>>> manual/statements/prepared/ and just wanted to know if there are any
>>>> other considerations I need to take into account when deciding to use
>>>> Prepared Statements.
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> Shalom Sagges
>>>> DBA
>>>> <http://www.linkedin.com/company/164748>
>>>> <http://twitter.com/liveperson> <http://www.facebook.com/LivePersonInc> We
>>>> Create Meaningful Connections
>>>>
>>>>
>>>>
>>>
>>>
>>> This message may contain confidential and/or privileged information.
>>> If you are not the addressee or authorized to receive this on behalf of
>>> the addressee you must not use, copy, disclose or take action based on this
>>> message or any information herein.
>>> If you have received this message in error, please advise the sender
>>> immediately by reply email and delete this message. Thank you.
>>>
>>
>>
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of
> the addressee you must not use, copy, disclose or take action based on this
> message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>

Re: Working With Prepared Statements

Posted by Shalom Sagges <sh...@liveperson.com>.
Hi Matija,

I just wish to know if there are any disadvantages when using prepared
statement or any warning signs I should look for. Queries will run multiple
times so it fits the use case.

Thanks!


Shalom Sagges
DBA
<http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
<http://www.facebook.com/LivePersonInc> We Create Meaningful Connections



On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec <ma...@gmail.com> wrote:

> Do you have any concrete questions re prepared statements?
>
> They are faster to execute since the statement is already parsed and in C*
> and you just pass the parameters. No additional statement processing is
> needed.
>
> Matija
>
> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <sh...@liveperson.com>
> wrote:
>
>> Insights, anyone?
>>
>>
>> Shalom Sagges
>> DBA
>> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
>> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>>
>>
>>
>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <sh...@liveperson.com>
>> wrote:
>>
>>> Hi Everyone,
>>>
>>> I want to start working with Prepared Statements.
>>>
>>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>>> manual/statements/prepared/ and just wanted to know if there are any
>>> other considerations I need to take into account when deciding to use
>>> Prepared Statements.
>>>
>>> Thanks!
>>>
>>>
>>> Shalom Sagges
>>> DBA
>>> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
>>> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>>>
>>>
>>>
>>
>>
>> This message may contain confidential and/or privileged information.
>> If you are not the addressee or authorized to receive this on behalf of
>> the addressee you must not use, copy, disclose or take action based on this
>> message or any information herein.
>> If you have received this message in error, please advise the sender
>> immediately by reply email and delete this message. Thank you.
>>
>
>

-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.

Re: Working With Prepared Statements

Posted by Matija Gobec <ma...@gmail.com>.
Do you have any concrete questions re prepared statements?

They are faster to execute since the statement is already parsed and in C*
and you just pass the parameters. No additional statement processing is
needed.

Matija

On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <sh...@liveperson.com>
wrote:

> Insights, anyone?
>
>
> Shalom Sagges
> DBA
> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>
>
>
> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <sh...@liveperson.com>
> wrote:
>
>> Hi Everyone,
>>
>> I want to start working with Prepared Statements.
>>
>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>> manual/statements/prepared/ and just wanted to know if there are any
>> other considerations I need to take into account when deciding to use
>> Prepared Statements.
>>
>> Thanks!
>>
>>
>> Shalom Sagges
>> DBA
>> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
>> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>>
>>
>>
>
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of
> the addressee you must not use, copy, disclose or take action based on this
> message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>

Re: Working With Prepared Statements

Posted by Shalom Sagges <sh...@liveperson.com>.
Insights, anyone?


Shalom Sagges
DBA
<http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
<http://www.facebook.com/LivePersonInc> We Create Meaningful Connections



On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <sh...@liveperson.com>
wrote:

> Hi Everyone,
>
> I want to start working with Prepared Statements.
>
> I've read https://docs.datastax.com/en/developer/java-driver/
> 3.1/manual/statements/prepared/ and just wanted to know if there are any
> other considerations I need to take into account when deciding to use
> Prepared Statements.
>
> Thanks!
>
>
> Shalom Sagges
> DBA
> <http://www.linkedin.com/company/164748> <http://twitter.com/liveperson>
> <http://www.facebook.com/LivePersonInc> We Create Meaningful Connections
>
>
>

-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.