Subject Re: Is there a parameter value of 'don't care' ?
Author landie_wu
--- In firebird-support@yahoogroups.com, "PenWin" <penwin@...> wrote:
>
> I am still trying to find a solution to this problem myself and
still can't
> find any that's good:
> 3) Using queries with conditions such as (NAME=:name OR :name IS
NULL) seems
> to be the best solution so far, but the problem is that it is very
slow.
> While the actual time to run a query with (NAME=:name) is negligible
(some
> 0.01 sec), query with the same parameter but condition (NAME=:name
OR :name
> IS NULL) could very well take as much as three seconds or more.
Still, it is
> a better solution than the two above.

Is it any faster if you use coalesce instead? Such as:

NAME = coalesce(:Name,NAME)

D.