[Zope-DB] Statement in cursor.execute (DCOracle2)
Gilberto Pereira
gil@peopleware.pt
Thu, 07 Nov 2002 20:38:16 +0000
Matthew T. Kromer wrote:
> Gilberto Pereira wrote:
>
>> Hi,
>>
>> I would like to know if there's a limit in size for the statement
>> used in cursor.execute ?
>>
>> Iīm planning to use it in a possible large select statement, where
>> i'm probably going to enumerate perhaps hundreds or thousands foreign
>> keys in where clauses... So i would like to know if i'm going to face
>> some problems in the future with this and decide to use a diferent
>> approach, while i still can :)
>>
>> Thanks, Gil
>
>
>
> The SQL statement processor in Oracle can handle up to about a 2K
> statement, I think. If you were planning on doing a huge "where x is
> A or x is B or x is C ..." I would re-think that logic.
>
> One way to handle it is to use a PL/SQL TABLE OF type, where you are
> essentially able to pass in up to 32K elements in a column to a stored
> procedure. The procedure could then use that "table" to do a join.
>
>
Thanks for the speedy answer Matt... and you were right, thatīs exactly
what i was planning to do...
It seems i'm going to do it in another way...
Gil