Subject Re: [firebird-support] Firebird Query Problem
Author Helen Borrie
At 05:41 AM 8/02/2005 +0000, you wrote:



>Hi fellows,
>
>can anyone please tell me what the error below means and how I can get
>rid of it? (Firebird 1.1)
>
>"Invalid token.
>invalid request BLR at offset 140.
>Implementation limit exceeded.
>block size exceeds implementation restriction."
>
>I am getting this error after trying this query:
>-------
>SELECT
>IL.GROUP_ID,IL.TEXT_1,IL.TEXT_2,IL.TEXT_3,IL.TEXT_4,IL.TEXT_5,
>IL.TEXT_6,IL.TEXT_7,IL.TEXT_8,IL.NAME,IL.FILE_1,IL.PRICE_AUD_INC,
>IL.PRICE_SPECIAL_AUD_INC,IL.FEATURED,IL.SOLD,
>GL.NAME,GL.TEXT_1,GL.KEYWORDS_3,GL.KEYWORDS_4
>FROM
>ITMLIST IL,GRPLIST GL
>WHERE
>GRPLIST.GROUP_ID=ITMLIST.GROUP_ID
>AND
>ITMLIST.ITEM_ID=1
>-------
>
>There is no massive data in either of the fields of the query (a 10kb
>max image in FILE_1) and the TEXT_ fields aren't used to capacity
>either, but somehow this query fails.
>
>If however I remove 3 of the fields in the query (any), the query runs
>through fine and the recordset is returned ok.
>
>I am at the absolute end of things I can think of. I even increased
>the buffer size for that DB in the hope it might have something to
>do with the size of the recordset returned, but that doesn't seem to
>help either.

More likely to do with the size and/or logic of the plan. Do you have
indexes on every column?


>I'd appreciate ANY ideas.

One thing I'd do is fix up the syntax of this query, which might or might
not help the optimizer to get itself sorted out. You have a merry jumble
here of table names and table aliases, so the plan probably looks like a
dog's breakfast.

SELECT
IL.GROUP_ID, IL.TEXT_1, IL.TEXT_2,
IL.TEXT_3,IL.TEXT_4,IL.TEXT_5,
IL.TEXT_6,IL.TEXT_7,IL.TEXT_8,
IL.NAME,IL.FILE_1,IL.PRICE_AUD_INC,
IL.PRICE_SPECIAL_AUD_INC,IL.FEATURED,IL.SOLD,
GL.NAME,GL.TEXT_1,GL.KEYWORDS_3,GL.KEYWORDS_4
FROM
ITMLIST IL JOIN GRPLIST GL
ON
GL.GROUP_ID=IL.GROUP_ID
WHERE
IL.ITEM_ID=1

./hb