Subject Re: [firebird-support] Problem with query parameter
Author Anderson Farias
Hi,



>I accept that you can do that, but what is
> the performance like with these either/or statements? And what about
> indexes with nulls?

That's another issue. The point is it *is* possible.

I for instance aways do that on an limited amount of records selected by a
short period of time, so there's no performance problem (date fields have
indexes that are used on the query) -- this is very usefull to my
procedures, eg:

for select <fields> from table
where date_field between :initial_date and :final_date
and (:some_param is null or some_field=:some_param)
into ...


I just suppose the OP's example was very simple to make it easy to get to
his point.

=)


Regards,
Anderson Farias