Subject | NULL param and indexes |
---|---|
Author | Radu Sky |
Post date | 2006-02-15T13:41:32Z |
Hello,
I have some queries with this type of WHERE:
WHERE FK_KEY=COALESCE(:param,FK_KEY)
I read this type of WHERE in some posts before and it is working as I
expected on the results side, however it doesn't use indexes.
Is there a way to do this with index (get all records when :param is
null and the indexed ones when :param is set to some value)?
TIA
Radu
I have some queries with this type of WHERE:
WHERE FK_KEY=COALESCE(:param,FK_KEY)
I read this type of WHERE in some posts before and it is working as I
expected on the results side, however it doesn't use indexes.
Is there a way to do this with index (get all records when :param is
null and the indexed ones when :param is set to some value)?
TIA
Radu