Subject | Re: Firebird Query Problem |
---|---|
Author | bk007121 |
Post date | 2005-02-09T03:15:32Z |
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
thanks for the reply. As the previous reply to my post indicated it
seems to be an issue with the rather long varchar types that make up
the TEXT_ fields.
They were all 8000's which seems to have lead to the problem I was
having, I have since spoken to the client again and it turns out that
it was actually not necessary to have all of the TEXT_ fields as these
large varchars.
I have now reduced most of the other varchars to the maximum they
REALLY need and only one of them is still an 8000er.
I would have assumed that varchars only take the size of their
contents+x, but maybe firebird doesn't do things that way, which would
have brought the query easily over 64kb, which might have been the
problem all along.
Anyway, thanks for everyone help and the tips on the SQL statements
I have considered all of it, and the query is no longer causing any
problems.
cheers,
Ben
<aharrison@i...> wrote:
> bk007121 wrote:block
>
> > can anyone please tell me what the error below means and how I can get
> > rid of it? (Firebird 1.1)
>
> That's odd. I know of a number of Firebirds 1.0x and some Firebirds
> 1.5x, but 1.1 is a new bird to me.
>
> >
> > "Invalid token.
> > invalid request BLR at offset 140.
> > Implementation limit exceeded.
> > block size exceeds implementation restriction."
>
> Typically this happens when the query compiler runs out of scratch
> size - fixed in the newer birds (1.5.x I think). But that doesn'tHi Ann,
> normally happen until you've got a very complex query.
>
> Your mix of table aliases (IL.xxx, GL.xxx) and table qualifiers
> (GRPLIST.xxx, ITMLIST.xxx) are confusing to the human reader but
> disappear from the query during the parse phase. The number of select
> items and the length of names are not an issue either, as they are also
> resolved during parsing.
>
> You use the SQL 89 join syntax -
> FROM ITMLIST IL,GRPLIST GL
> WHERE GRPLIST.GROUP_ID=ITMLIST.GROUP_ID
> AND ITMLIST.ITEM_ID=1
>
> - rather than the SQL-92 syntax
>
> FROM ITMLIST IL
> JOIN GRPLIST GL ON GRPLIST.GROUP_ID = ITMLIST.GROUP_ID
> WHERE ITMLIST.ITEM_ID=1
>
> That's OK, as long as you don't mix the two - there is a precedence
> between the two join styles that is NOT intuitive and leads to
> unexpected results.
>
> Still, it's a very simple query, unless one or both of your tables is
> actually a view.
>
> Is there something you didn't tell us?
>
> Regards,
>
>
> Ann
thanks for the reply. As the previous reply to my post indicated it
seems to be an issue with the rather long varchar types that make up
the TEXT_ fields.
They were all 8000's which seems to have lead to the problem I was
having, I have since spoken to the client again and it turns out that
it was actually not necessary to have all of the TEXT_ fields as these
large varchars.
I have now reduced most of the other varchars to the maximum they
REALLY need and only one of them is still an 8000er.
I would have assumed that varchars only take the size of their
contents+x, but maybe firebird doesn't do things that way, which would
have brought the query easily over 64kb, which might have been the
problem all along.
Anyway, thanks for everyone help and the tips on the SQL statements
I have considered all of it, and the query is no longer causing any
problems.
cheers,
Ben