title: Using parts of the primary key to improve searching in KUDU
body: <p>I have a primary key composed of three columns (id_grandparent, id_parent, id_row) which is residing in KUDU.</p>
  
  <p>I want my lookups to be fast (hbase-like) when looking by id_grandparent. I'm using Impala and Spark to do lookups, let's assume both of them do the predicate pushdown on equality.</p>
  
  <p>I have some questions which I can't tell 100% sure by reading the docs</p>
  
  <pre><code>SELECT * FROM my_table where id_grandparent = 55
  </code></pre>
  
  <p>Will this query be able to use the index-order even If i'm not providing the whole primary key? (aka return mega-fast). I'm assuming yes because I guess primary key is sorted by the first column and it's some kind of prefix-scan</p>
  
  <pre><code>SELECT * FROM my_table where id_parent = 55
  </code></pre>
  
  <p>Will this query be able to use any kind of optimization? Or any non-first column (if first-column not provided) will force a full scan on all the tablets.</p>
  
  <p>I've read about this here: <a href="https://kudu.apache.org/2018/09/26/index-skip-scan-optimization-in-kudu.html" rel="nofollow noreferrer">https://kudu.apache.org/2018/09/26/index-skip-scan-optimization-in-kudu.html</a> but I'm not sure if that has been released or not</p>
  
  <p>Thanks beforehand!</p>