Subject Re: [firebird-support] Re: another make my query faster question
Author Svein Erling Tysvaer
markd_mms wrote:
> --- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
>> Try replacing the following line:
>>
>>> INNER JOIN TITLE ON PRODUCT.TITLEID = TITLE.TITLEID
>> With:
>>
>> INNER JOIN TITLE ON PRODUCT.TITLEID+0 = TITLE.TITLEID
>
> i did that but it didn't make a difference. the performance analysis
> (in ems sqlmanager) shows the following...

Adam had the right idea, he just prevented the wrong index from being
used (i.e. he "recommended" the suboptimal plan rather than prevented
it). What you probably want is

INNER JOIN TITLE ON PRODUCT.TITLEID = TITLE.TITLEID+0

Hopefully, you have an index on TITLE.METAPHONE.

HTH,
Set