Subject Re: [firebird-support] conditional where clause
Author Svein Erling Tysvaer
> where :pcond=0 or Table.field = :par1

Just a little warning. Doing things this way prevents using any index
for Table.field. Not a big problem if you have a small table with a few
thousand records, but don't make it a habit to do things this way just
to make it optional whether parameters are used or not. You will be
fighting against the optimizer making all select having to check all
records even though it ends up only selecting one record and once you
get into bigger tables (millions of records), your selects get slow.

HTH,
Set