You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Jon Strayer <js...@proofpoint.com> on 2019/08/09 22:39:48 UTC

Maximum sql string length

We’ve been querying one table and then creating a query against another table using a prepared statement with a very large number of parameters in a IN clause.  A code review brought up a very good question, is there a limit to the size of the IN clause?  Or, is there a limit to the size of the SQL use to create a prepared statement.

I assume there is some limit, but is it “well, how much memory do you have?” Or, “we have a 64k buffer”?



Re: Maximum sql string length

Posted by Jon Strayer <js...@proofpoint.com>.
Yes.  It was unexpectedly fast (under a second).

From: Geoffrey Jacoby <gj...@salesforce.com>
Reply-To: "user@phoenix.apache.org" <us...@phoenix.apache.org>
Date: Wednesday, August 14, 2019 at 12:37 PM
To: "user@phoenix.apache.org" <us...@phoenix.apache.org>
Subject: Re: Maximum sql string length

Out of curiosity, was the perf acceptable with that many parameters? (assuming of course a reasonable query against the row key or an index)

Geoffrey

On Wed, Aug 14, 2019 at 9:24 AM Jon Strayer <js...@proofpoint.com>> wrote:
It turns out that you can have more than 80,000 parameters in a prepared statement.

From: Jon Strayer <js...@proofpoint.com>>
Reply-To: "user@phoenix.apache.org<ma...@phoenix.apache.org>" <us...@phoenix.apache.org>>
Date: Friday, August 9, 2019 at 6:40 PM
To: "user@phoenix.apache.org<ma...@phoenix.apache.org>" <us...@phoenix.apache.org>>
Subject: Maximum sql string length

We’ve been querying one table and then creating a query against another table using a prepared statement with a very large number of parameters in a IN clause.  A code review brought up a very good question, is there a limit to the size of the IN clause?  Or, is there a limit to the size of the SQL use to create a prepared statement.

I assume there is some limit, but is it “well, how much memory do you have?” Or, “we have a 64k buffer”?



Re: Maximum sql string length

Posted by Geoffrey Jacoby <gj...@salesforce.com>.
Out of curiosity, was the perf acceptable with that many parameters?
(assuming of course a reasonable query against the row key or an index)

Geoffrey

On Wed, Aug 14, 2019 at 9:24 AM Jon Strayer <js...@proofpoint.com> wrote:

> It turns out that you can have more than 80,000 parameters in a prepared
> statement.
>
>
>
> *From: *Jon Strayer <js...@proofpoint.com>
> *Reply-To: *"user@phoenix.apache.org" <us...@phoenix.apache.org>
> *Date: *Friday, August 9, 2019 at 6:40 PM
> *To: *"user@phoenix.apache.org" <us...@phoenix.apache.org>
> *Subject: *Maximum sql string length
>
>
>
> We’ve been querying one table and then creating a query against another
> table using a prepared statement with a very large number of parameters in
> a IN clause.  A code review brought up a very good question, is there a
> limit to the size of the IN clause?  Or, is there a limit to the size of
> the SQL use to create a prepared statement.
>
>
>
> I assume there is some limit, but is it “well, how much memory do you
> have?” Or, “we have a 64k buffer”?
>
>
>
>
>

Re: Maximum sql string length

Posted by Jon Strayer <js...@proofpoint.com>.
It turns out that you can have more than 80,000 parameters in a prepared statement.

From: Jon Strayer <js...@proofpoint.com>
Reply-To: "user@phoenix.apache.org" <us...@phoenix.apache.org>
Date: Friday, August 9, 2019 at 6:40 PM
To: "user@phoenix.apache.org" <us...@phoenix.apache.org>
Subject: Maximum sql string length

We’ve been querying one table and then creating a query against another table using a prepared statement with a very large number of parameters in a IN clause.  A code review brought up a very good question, is there a limit to the size of the IN clause?  Or, is there a limit to the size of the SQL use to create a prepared statement.

I assume there is some limit, but is it “well, how much memory do you have?” Or, “we have a 64k buffer”?