title: sparql slow if more object value specified
body: <p>Using virtuoso 7 open source edition,</p>
  <p>This query below is fast, it return the result instantly,</p>
  <pre><code>select *
                  WHERE {
  
                  graph &lt;http://localhost:8890/graph&gt; {
  
                              ?catAtt qq:catId ?catId;
                              qq:caDataType ?caDataType;
                              qq:showInView   ?showInview;
                              qq:valFormat    ?valFormatKey;
                              qq:multiple     ?multiple; 
                              qq:position     ?position; 
                              qq:link         ?link; 
                              qq:catAttName   ?catAttName; 
                              qq:setting      ?setting; 
                              qq:flag         ?flag;
                              qq:unit         ?caUnit.
  
                     
  
         
                    }  
                  }
                  
                  
                  LIMIT 20
  </code></pre>
  <p>This query is so slow, took 10 seconds for the result, the only difference is the ?catId is replaced with literal value 1</p>
  <pre><code>select *
                  WHERE {
  
                  graph &lt;http://localhost:8890/graph&gt; {
  
                              ?catAtt qq:catId 1;
                              qq:caDataType ?caDataType;
                              qq:showInView   ?showInview;
                              qq:valFormat    ?valFormatKey;
                              qq:multiple     ?multiple; 
                              qq:position     ?position; 
                              qq:link         ?link; 
                              qq:catAttName   ?catAttName; 
                              qq:setting      ?setting; 
                              qq:flag         ?flag;
                              qq:unit         ?caUnit.
  
                     
  
         
                    }  
                  }
                  
                  
                  LIMIT 20
  </code></pre>
  <p>Why is it so ? I am still new in sparql and triplestore, seems like I have to do some indexing on the object ?</p>
  <p>EDIT :</p>
  <p>I have tried creating the GOPS index with, I don't understand about the Partition part, is using O correct ? What does that partition mean ? Creating this index has improved the execution for the second query to 4 seconds, but still too slow for a DBMS.</p>
  <pre><code>CREATE COLUMN INDEX RDF_QUAD_GOPS
    ON RDF_QUAD (G, O, P, S)
    PARTITION (O VARCHAR (-1, 0hexffff));
  </code></pre>