Subject Query Optimiser
Author paulhope@allcomm.co.uk
I've discovered recently that a technique I use for getting the
inability to
create dynamic SQL in a stored procedure creates problems with query
plans.
(Still using 5.6 but I assume the same applies in 6)

If I have select . . from . . where invoice_number>=:INVNO -- the
plan uses
the index, but
select . . from . . where ((-1=:INVNO)or(invoice_number>=:INVNO))
doesn't
and the extraction is very slow.

Is this a horrible thing to do or is an enhancement worth suggesting?

Regards
Paul