Subject Re: Too many parameters in a prepared statement
Author Roman Rokytskyy
> I have a query with an 'in' clause that takes about 1500 parameters,
> and I get the following error:
> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544343.
> invalid request BLR at offset 10403
> Implementation limit exceeded
> block size exceeds implementation restriction
> I suppose there is no other work around than performing the query
> more times splitting the 'in' parameters in smaller groups and
> rebuilding the result manually, right?

Most likely yes. But I would say this is bad design anyway. If you
have to check if values are in set of other values, better way would
be to save that values temporarily in some table and then do a join.
Most likely it will be also faster.

> Is it a limitation of the 'in' clause or of the 'whole query' (I
> mean, is there a maximum number of parameters I can bind to a
> query?).

If I'm not wrong, that's limitation of IN clause, but whole query has
also limitations, at least in its size. Ask in Firebird-Support group.

Best regards,
Roman Rokytskyy