But fact is that with "... OR :HOST = 0" you are going to have massive performance problems.
Better way (not a perfect sollution either) is to have many key-ranges like this:
where col1 between :h1_low and :h1_high
and col2 between :h2_low and :h2_high
and col3 between :h3_low and :h3_high
...
Now, when you need to have certain column, issue
the host value to both :hx_low and :hx_high variables.
Otherwise :hx_low and :hx_high have LOWVALUE and HIGHVALUE.
This way this query may use some indexes, but still it's a pain in the...
Cheers, Bill