<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Question about the performance of the local index in  Apache Phoenix in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Question-about-the-performance-of-the-local-index-in-Apache/m-p/364040#M239096</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about the performance of the local index in Apache Phoenix&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I have a table TBL_X having 6 columns (A , B ,C ,D E, F).&lt;/P&gt;&lt;P&gt;1. Primary Key is (A, B)&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. One of the query patterns is&amp;nbsp;&amp;nbsp;&lt;U&gt;&lt;EM&gt; "Select * from&amp;nbsp; TBL_X where A = 'val1' and C = 'val3' "&amp;nbsp;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the better performance of the above query, I try to build the local index.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does&amp;nbsp; &amp;nbsp;[ Local index on (C, A)&amp;nbsp; ]&amp;nbsp; perform better than&amp;nbsp; &amp;nbsp;[ Local index on (C) ]&amp;nbsp; ??&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will there be no performance difference since A is already in the first part of the PK ??&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2023 04:03:37 GMT</pubDate>
    <dc:creator>bgkim</dc:creator>
    <dc:date>2023-02-17T04:03:37Z</dc:date>
    <item>
      <title>Question about the performance of the local index in  Apache Phoenix</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Question-about-the-performance-of-the-local-index-in-Apache/m-p/364040#M239096</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about the performance of the local index in Apache Phoenix&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I have a table TBL_X having 6 columns (A , B ,C ,D E, F).&lt;/P&gt;&lt;P&gt;1. Primary Key is (A, B)&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. One of the query patterns is&amp;nbsp;&amp;nbsp;&lt;U&gt;&lt;EM&gt; "Select * from&amp;nbsp; TBL_X where A = 'val1' and C = 'val3' "&amp;nbsp;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the better performance of the above query, I try to build the local index.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does&amp;nbsp; &amp;nbsp;[ Local index on (C, A)&amp;nbsp; ]&amp;nbsp; perform better than&amp;nbsp; &amp;nbsp;[ Local index on (C) ]&amp;nbsp; ??&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will there be no performance difference since A is already in the first part of the PK ??&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 04:03:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Question-about-the-performance-of-the-local-index-in-Apache/m-p/364040#M239096</guid>
      <dc:creator>bgkim</dc:creator>
      <dc:date>2023-02-17T04:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Question about the performance of the local index in  Apache Phoenix</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Question-about-the-performance-of-the-local-index-in-Apache/m-p/364788#M239231</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/102038"&gt;@bgkim&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for using Cloudera Community. To your Q, the Composite Primary Key would require using both A &amp;amp; B in WHERE Clause as the Indexing is done collectively. As such, Your SELECT Query would ideally benefit upon creating a Local Index on A &amp;amp; C.&amp;nbsp;You may review [1] as Read-Heavy Use-Case benefit via Global Index with Penalty incurred during Writes. Additionally, Phoenix offers Covered Index &amp;amp; Explain Plan helps confirming the Index Usage. Link [2] offers few examples as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With all recommendations, Best Advise is always to review the Performance internally prior to implementing them in Production.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Smarak&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://phoenix.apache.org/secondary_indexing.html" target="_blank"&gt;https://phoenix.apache.org/secondary_indexing.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[2]&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/hdinsight/hbase/apache-hbase-phoenix-performance" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/hdinsight/hbase/apache-hbase-phoenix-performance&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 06:54:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Question-about-the-performance-of-the-local-index-in-Apache/m-p/364788#M239231</guid>
      <dc:creator>smdas</dc:creator>
      <dc:date>2023-02-28T06:54:12Z</dc:date>
    </item>
  </channel>
</rss>

