Subject | Query Optimiser |
---|---|
Author | paulhope@allcomm.co.uk |
Post date | 2001-01-15T13:43:24Z |
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
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