Martin Vajsar wrote:
Sudheer Bhat wrote:Your query would look something like SELECT ... where field1 = NVL(:1,field1) and field2 = NVL (:2, field2) ... (If your DB is Oracle)
In JDBC, the :1, :2 should be replaced by question mark.
However, if I'm not seriously mistaken, such query will never use an index on any of these columns (certainly not on Oracle).
Martin Vajsar wrote:
Yes, it could definitely be an issue. Try creating the type using CREATE TYPE and if it is not enough, use fully qualified name.
Paul Clapham wrote:Include a non-null column from your "child" table.