Subject Re: [firebird-support] Plan Syntax
Author Mitch Peek
Anderson Farias wrote:
> Hi,
>
>
> To be able to evaluate the folowing
>
>
>> OR
>> (Exists ( select 1
>> from discussion DS
>> where DS.Deal_ID=D.ID
>> AND DS.CreateDate >= '3/1/2008' ))
>> OR
>> (Exists ( Select 1
>> from Attachment A
>> where A.Deal_ID=D.ID
>> AND A.CreateDate >= '3/1/2008' ))
>>
>>
>
> the engine must visit all records from "D", so, there's no way to use the
> index you wish, I *think*
>
>

Ahhh, you're right. If the first OR was an And, however, it would not.

Stupid of me...

Thanks for pointing me straight!

Mitch

> Regards,
> Anderson Farias
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>



[Non-text portions of this message have been removed]