This question may be better suited for the DB stackexchange site, but I wasn't sure.
Anyway, I'm dealing with optimizing queries, and I learned that using bind variables makes the parser not work as hard. We have seen improvements in the queries being run, but I'm wondering if subbing out the static variables being passed in by our software for bind variables as well will help. Here's an example:
select *
from report
where report.name = :1
and report.enabled = '1'
I could sub that out to say
select *
from report
where report.name = :1
and report.enabled = :2
I would just make the change, but the process of actually doing it in the software and seeing the difference it makes is somewhat long and tedious. Does anyone know if mixing literals (as in the first example) hurts the optimizer efficiency even though they are constantly the same?
Thanks in advance.