Subject Re: [ib-support] Speed of Joins
Author Lista de Discução Interbase
Helen,

I thought that if I send

Select * from Product where Descricption like 'PAINT%'

and

Select * from Product where Descricption Starting With 'PAINT'

should be synonymous, and the same execution plan will be used.

I tried both statments above and the plan are the same. Are you saying that
if a put like '%PAINT%' no index will be used ? This is correct, but like
'PAINT%' uses the index as starting with

the plan is

PLAN (PRODUCT INDEX (SK_PRODUCT_DESCRIPTION))

Did I understand you or I am missing something ?

see you

Alexandre

At 00:39 03/05/2002 +1000, you wrote:
>At 12:16 PM 02-05-02 +0000, sean_brad wrote:
>
> >I use a join select statement of the following form:
>........ REMOVED ..............
>As others have rightly explained, you are comparing apples and
>oranges. But, if you have an index on the column F, you can speed up that
>outer join (if it is what you need) by using the STARTING WITH predicate
>instead of LIKE. LIKE does not use an index, whereas STARTING WITH does.
>
>Also, that framework has ambiguous syntax: Firebird will not buy it
>without a table identifier on column F.
>
>regards,
>Helen
>
>
>All for Open and Open for All
>Firebird Open SQL Database · http://firebirdsql.org ·
>http://users.tpg.com.au/helebor/
>_______________________________________________________
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/