Subject | Re: [firebird-support] Re: Problem with compound index |
---|---|
Author | Ismael L. Donis Garcia |
Post date | 2011-09-08T12:37:10Z |
You could not substitute the consultation for:
select * from fond where typ=:typ and tridnaz like :text || '%' order by tridnaz;
Best Regards
=========
|| ISMAEL ||
=========
select * from fond where typ=:typ and tridnaz like :text || '%' order by tridnaz;
Best Regards
=========
|| ISMAEL ||
=========
----- Original Message -----
From: ma_golyo
To: firebird-support@yahoogroups.com
Sent: Thursday, September 08, 2011 1:57 AM
Subject: [firebird-support] Re: Problem with compound index
Hi!
I found this also and reported it. This is a known bug :
http://tracker.firebirdsql.org/browse/CORE-3052
Unfortunatley still not fixed and no sign of doing it... :(
--- In firebird-support@yahoogroups.com, "tomkrej" <respektive@...> wrote:
>
> Hi all, I have interesting problem with compound index.
>
> I have records in one table divided in a groups by field TYP
> and each record has its name field TRIDNAZ
>
> TRIDNAZ is varchar(40) character set WIN1250 collation PXW_CSY
> TYP is smallint
>
> I had 2 indexes - on TRIDNAZ only, and on TYP, TRIDNAZ
>
> And I have query
>
> select * from FOND where TYP = :typ and TRIDNAZ starting with :text order by TRIDNAZ;
>
> when I set text = 'C' the result set was empty
> when I set text = 'CA' the result set was filled with records starting with 'CA'
>
> I can't found the reason why was 'C' empty.
>
> I saw the plan and the server use compound index - TYP, TRIDNAZ
>
> When I dropped it, server us TRIDNAZ only index and - wow - 'C' records exists.
>
> I think there is some foult in compound index smallint + varchar(WIN1250) and characte C
> It could be the reason that in Czech languague is 'Ch' one character not two.
>
> When I change it to two separate indexes - TYP and TRIDNAZ
> Server use both of them and works correctly.
>
> Please correct this error - it is tested on 2.1 and 2.5 on windows
>
> Tom
>
[Non-text portions of this message have been removed]