Subject | Re: [firebird-support] Is "EXISTS()" cheap? |
---|---|
Author | Eduardo Resek |
Post date | 2005-09-16T16:35:55Z |
Olá Bambang,
On Friday, September 16, 2005, 9:08:56 AM, you wrote:
> In this stored procedure statement:
> if (exists(select 1 from HOLIDAYS where ADate>=DSTART and AData<=DEND))
> then begin
> .....
> end
> Question:
> Does the select statement step through all records which meet the condition
> or does it return immediately after the first occurance of the condition?
> TIA,
Yes, it returns immediately after having found the first ocurrence
meeting your condition.
Eduardo Resek.