Subject | Re: [firebird-support] INDEXes for a Query |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2004-03-18T10:56:12Z |
On 18 Mar 2004 at 15:38, James wrote:
CityName can't speed ordering too. CityVBSQ is already indexed
because it is a part of FOREIGN KEY.
If Uwe could transform comparsions into STARTING WITH, then, using
pre-uppercased indexed "shadow columns", this query might became
faster.
SY, Dimitry Sibiryakov.
>> WHERE UPPER(W.WPName) LIKE UPPER('%oeder%')No. LIKEs above can't use indices at all. Indices on WPOrder and
>> AND
>> UPPER(W.WPDescription) LIKE UPPER('%kwe%')
>> AND
>> W.CityVBSQ IN (200) ORDER BY 2 , 1
>>
>IMHO putting indexes on WPName, WPDescription, CityVBSQ, CITYNAME and
>WPOrder is good.
CityName can't speed ordering too. CityVBSQ is already indexed
because it is a part of FOREIGN KEY.
If Uwe could transform comparsions into STARTING WITH, then, using
pre-uppercased indexed "shadow columns", this query might became
faster.
SY, Dimitry Sibiryakov.