db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcin Skladaniec <mar...@ish.com.au>
Subject Re: query length
Date Mon, 11 Dec 2006 08:50:32 GMT

On 11/12/2006, at 3:54 AM, Rajesh Kartha wrote:

> Marcin Skladaniec wrote:
>
>>
>> Hi !
>> I asked a question about the maximum query length on the user  
>> mailing  list, but no one answered.
>> Does someone from the dev list know the answer to my question ?
>> Regards
>> Marcin
>>
>> Begin forwarded message:
>>
>>> From: Marcin Skladaniec <marcin@ish.com.au>
>>> Date: 6 December 2006 6:20:32 PM
>>> To: derby-user@db.apache.org
>>> Subject: query length
>>> Reply-To: "Derby Discussion" <derby-user@db.apache.org>
>>>
>>> hello !
>>> Is there a limit to the query length ?
>>> When I execute long query (more than about 1000 characters, but   
>>> less than 64000) i get weird exceptions.
>>>
>>> Squirrel-sql reports StackOverflowError, but some exceptions  
>>> seems  to be munched internally and never pop up, cause when not  
>>> using  squirrel-sql I'm getting class  
>>> org.apache.derby.client.net.NetSqlca  in response.
>>>
>>> Marcin
>>
>>
>>
>>
> Hi Marcin,
>
> Some questions:
>
> What version of Derby are you using and what is the nature of the  
> query you are executing ?  ~1000 characters does not
> seem that long for a query, I have seen queries > 2000 characters  
> working in Derby
> (for example http://issues.apache.org/jira/browse/DERBY-1315)
>
> Not sure if it is Squirrel that is causing the error,  did  you try  
> running your query  using the Derby command line tool - ij ?
> Is it possible to post the stack trace and a reproduction of the  
> issue.
>
> -Rajesh
>

Thank you for answering !
I'm using derby 10.2.1.6.
I tried putting my query (about 42000 characters) to ij, as the  
result I got an answer :
ERROR 42ZA0: Statement too complex. Try rewriting the query to remove  
complexity. Eliminating many duplicate expressions or breaking up the  
query and storing interim results in a temporary table can often help  
resolve this error. SQLSTATE: XBCM4: Java class file format limit(s)  
exceeded: method:e1 code_length (135615 > 65535) in generated class  
org.apache.derby.exe.ac888c4022x010fx70a9x5790xffff8e6417d30.

I did simplified the query using 'SELECT * from table where field in  
(option1, option2 ...)' so now the query is much shorter, but I still  
do expect to have my query be over 10000 characters long. would that  
be supported ?

Marcin

Mime
View raw message