title: How to get an index used with OR in statement
body: <p>I have SQL with params passed by user. User can pass some id or -1, what mean "nevermind".
  It's possible to write query like below, but can using index?</p>
  
  <pre><code>SELECT *
  FROM table
  WHERE
      ((col1 = :param1) OR (:param1 = -1))
      AND ((col2 = :param2) OR (:param2 = -1))
      AND col3 STARTING 'A'
  </code></pre>
  
  <p><code>col1</code>, <code>col2</code> and <code>col3</code> are indexed. In FB 2.x using <code>OR</code> never use index for col1 or col2. In FB 3 only if first (or second) conditions exist that can use index (PLAN index and natural), but with last condition stop using index for col1/2.</p>
  
  <p>How can I write SQL without using PLAN and can use index for <code>col1/2</code> and stay possibility to "off" condition by passing <code>-1</code>?</p>