title: Oracle: query on key/value pairs stored in one of the columns?
body: <p>I have a (large, multi-column) table similar to this:</p>
  
  <pre><code>prop1 | prop2 | prop3 | summary
  ------+-------+-------+----------------------------
        |       |       | "prop1=X, prop2=Y, prop3=Z"
  ------+-------+-------+----------------------------
    val |       |       | . . . 
  ------+-------+-------+----------------------------
        |       |   val | . . .
  </code></pre>
  
  <p>All columns are varchars. <code>prop1</code>, <code>prop2</code>, etc. columns may or may not have a value. If they don't have a value, I need to use the value from <code>summary</code> column for filtering purposes. So, suppose I have this query:</p>
  
  <pre><code>select * from T where prop1='val1' and prop2='val2' and prop3='val3'
  </code></pre>
  
  <p>I'd like to add something along the lines: if <code>prop1</code> is empty, extract <code>prop1</code> from <code>summary</code> and use that in <code>where</code> clause. Is this possible in Oracle? Also, considering that this is a large table with potentially millions of rows, will execution time be a consideration?</p>
  
  <p>Unfortunately, filtering cannot be done in the code because the query also does pagination and passes the current page to another system, so filtering has to be done in SQL.</p>