Subject | Re: Is there a parameter value of 'don't care' ? |
---|---|
Author | landie_wu |
Post date | 2007-01-12T08:25:59Z |
--- In firebird-support@yahoogroups.com, "PenWin" <penwin@...> wrote:
NAME = coalesce(:Name,NAME)
D.
>still can't
> I am still trying to find a solution to this problem myself and
> find any that's good:NULL) seems
> 3) Using queries with conditions such as (NAME=:name OR :name IS
> to be the best solution so far, but the problem is that it is veryslow.
> 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=:nameOR :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.