You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2015/02/11 03:12:39 UTC

svn commit: r1658867 - in /phoenix/site: publish/secondary_indexing.html publish/team.html source/src/site/markdown/secondary_indexing.md source/src/site/markdown/team.md

Author: jamestaylor
Date: Wed Feb 11 02:12:39 2015
New Revision: 1658867

URL: http://svn.apache.org/r1658867
Log:
Update team and update secondary index docs to talk about functional indexes

Modified:
    phoenix/site/publish/secondary_indexing.html
    phoenix/site/publish/team.html
    phoenix/site/source/src/site/markdown/secondary_indexing.md
    phoenix/site/source/src/site/markdown/team.md

Modified: phoenix/site/publish/secondary_indexing.html
URL: http://svn.apache.org/viewvc/phoenix/site/publish/secondary_indexing.html?rev=1658867&r1=1658866&r2=1658867&view=diff
==============================================================================
--- phoenix/site/publish/secondary_indexing.html (original)
+++ phoenix/site/publish/secondary_indexing.html Wed Feb 11 02:12:39 2015
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2015-01-27
+ Generated by Apache Maven Doxia at 2015-02-10
  Rendered using Reflow Maven Skin 1.1.0 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -132,8 +132,12 @@
 <div class="page-header">
  <h1>Secondary Indexing</h1>
 </div> 
-<p>Secondary indexes are an orthogonal way to access data from its primary access path. In HBase, you have a single index that is lexicographically sorted on the primary row key. Access to records in any way other than through the primary row requires scanning over potentially all the rows in the table to test them against your filter. With secondary indexing, the columns you index form an alternate row key to allow point lookups and range scans along this new axis. Phoenix is particularly powerful in that we provide <i>covered</i> indexes - we do not need to go back to the primary table once we have found the index entry. Instead, we bundle the data we care about right in the index rows, saving read-time overhead.</p> 
-<p>Phoenix supports two types of indexing techniques: global and local indexing. Each are useful in different scenarios and have their own failure profiles and performance characteristics.</p> 
+<p>Secondary indexes are an orthogonal way to access data from its primary access path. In HBase, you have a single index that is lexicographically sorted on the primary row key. Access to records in any way other than through the primary row requires scanning over potentially all the rows in the table to test them against your filter. With secondary indexing, the columns or expressions you index form an alternate row key to allow point lookups and range scans along this new axis. Phoenix is particularly powerful in that we provide <i>covered</i> indexes - we do not need to go back to the primary table once we have found the index entry. Instead, we bundle the data we care about right in the index rows, saving read-time overhead.</p> 
+<div class="section"> 
+ <h2 id="Functional_Indexes">Functional Indexes</h2> 
+ <p>Another useful feature that was introduced in the 4.3 release is functional indexes. Functional indexes allow you to create an index not just on columns, but on an arbitrary expressions. Then when a query uses that expression, the index may be used to retrieve the results instead of the data table. For example, you could create an index on <tt><small>UPPER(FIRST_NAME||‘ ’||LAST_NAME)</small></tt> to allow you to do case insensitive searches on the combined first name and last name of a person.</p> 
+ <p>Phoenix supports two types of indexing techniques: global and local indexing. Each are useful in different scenarios and have their own failure profiles and performance characteristics.</p> 
+</div> 
 <div class="section"> 
  <h2 id="Global_Indexing">Global Indexing</h2> 
  <p>Global indexing targets <i>read heavy</i>, <i>low write</i> uses cases. With global indexes, all the performance penalties for indexes occur at write time. We intercept the data table updates on write (<a href="language/index.html#delete">DELETE</a>, <a href="language/index.html#upsert_values">UPSERT VALUES</a> and <a href="language/index.html#upsert_select">UPSERT SELECT</a>), build the index update and then sent any necessary updates to all interested index tables. At read time, Phoenix will select the index table to use that will produce the fastest query time and directly scan it just like any other HBase table. By default, unless hinted, an index will not be used for a query that references a column that isn’t part of the index.</p> 
@@ -191,6 +195,19 @@ CREATE LOCAL INDEX my_index ON my_table
    </div> <p>Unlike global indexes, local indexes <i>will</i> use an index even when all columns referenced in the query are not contained in the index. This is done by default for local indexes because we know that the table and index data coreside on the same region server thus ensuring the lookup is local.</p></li> 
  </ol> 
  <div class="section"> 
+  <h3 id="Functional_Index">Functional Index</h3> 
+  <p>In addition to indexing on just a column, arbitrary expression may be indexed. For example:</p> 
+  <div class="source"> 
+   <pre>CREATE INDEX upper_name_idx ON employee (UPPER(name)) INCLUDE(name);
+</pre> 
+  </div> 
+  <p>With this index in place, when the following query is issued, the index would be used instead of the data table to retrieve the results:</p> 
+  <div class="source"> 
+   <pre>SELECT id, name FROM employee WHERE UPPER(NAME)='John Doe';
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
   <h3 id="Index_Sort_Order">Index Sort Order</h3> 
   <p>Multiple columns may be indexed and their values may be stored in ascending or descending order.</p> 
   <div class="source"> 

Modified: phoenix/site/publish/team.html
URL: http://svn.apache.org/viewvc/phoenix/site/publish/team.html?rev=1658867&r1=1658866&r2=1658867&view=diff
==============================================================================
--- phoenix/site/publish/team.html (original)
+++ phoenix/site/publish/team.html Wed Feb 11 02:12:39 2015
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2015-01-27
+ Generated by Apache Maven Doxia at 2015-02-10
  Rendered using Reflow Maven Skin 1.1.0 (http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -145,39 +145,39 @@
  </thead> 
  <tbody> 
   <tr class="b"> 
-   <td>Lars Hofhansl </td> 
+   <td>Andrew Purtell </td> 
    <td>Salesforce </td> 
-   <td><a class="externalLink" href="mailto:larsh@apache.org">larsh@apache.org</a> </td> 
+   <td><a class="externalLink" href="mailto:apurtell@apache.org">apurtell@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="a"> 
-   <td>Andrew Purtell </td> 
-   <td>Salesforce </td> 
-   <td><a class="externalLink" href="mailto:apurtell@apache.org">apurtell@apache.org</a> </td> 
+   <td>Anoop Sam John </td> 
+   <td>Intel </td> 
+   <td><a class="externalLink" href="mailto:anoopsamjohn@apache.org">anoopsamjohn@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="b"> 
-   <td>Enis Soztutar </td> 
+   <td>Deveraj Das </td> 
    <td>Hortonworks </td> 
-   <td><a class="externalLink" href="mailto:enis@apache.org">enis@apache.org</a> </td> 
+   <td><a class="externalLink" href="mailto:ddas@apache.org">ddas@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="a"> 
-   <td>Deveraj Das </td> 
-   <td>Hortonworks </td> 
-   <td><a class="externalLink" href="mailto:ddas@apache.org">ddas@apache.org</a> </td> 
+   <td>Eli Levine </td> 
+   <td>Salesforce </td> 
+   <td><a class="externalLink" href="mailto:elilevine@apache.org">elilevine@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="b"> 
-   <td>Steven Noels </td> 
-   <td>NG Data </td> 
-   <td><a class="externalLink" href="mailto:stevenn@apache.org">stevenn@apache.org</a> </td> 
+   <td>Enis Soztutar </td> 
+   <td>Hortonworks </td> 
+   <td><a class="externalLink" href="mailto:enis@apache.org">enis@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="a"> 
-   <td>Michael Stack </td> 
-   <td>Cloudera </td> 
-   <td><a class="externalLink" href="mailto:stack@apache.org">stack@apache.org</a> </td> 
+   <td>Gabriel Reid </td> 
+   <td>NGDATA </td> 
+   <td><a class="externalLink" href="mailto:greid@apache.org">greid@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="b"> 
@@ -187,51 +187,39 @@
    <td>PMC</td> 
   </tr> 
   <tr class="a"> 
-   <td>Jesse Yates </td> 
-   <td>Salesforce </td> 
-   <td><a class="externalLink" href="mailto:jyates@apache.org">jyates@apache.org</a> </td> 
+   <td>Jeffrey Zhong </td> 
+   <td>Hortonworks </td> 
+   <td><a class="externalLink" href="mailto:jeffreyz@apache.org">jeffreyz@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="b"> 
-   <td>Eli Levine </td> 
+   <td>Jesse Yates </td> 
    <td>Salesforce </td> 
-   <td><a class="externalLink" href="mailto:elilevine@apache.org">elilevine@apache.org</a> </td> 
+   <td><a class="externalLink" href="mailto:jyates@apache.org">jyates@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="a"> 
-   <td>Simon Toens </td> 
+   <td>Lars Hofhansl </td> 
    <td>Salesforce </td> 
-   <td><a class="externalLink" href="mailto:stoens@apache.org">stoens@apache.org</a> </td> 
+   <td><a class="externalLink" href="mailto:larsh@apache.org">larsh@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="b"> 
-   <td>Mujtaba Chohan </td> 
-   <td>Salesforce </td> 
-   <td><a class="externalLink" href="mailto:mujtaba@apache.org">mujtaba@apache.org</a> </td> 
-   <td>PMC</td> 
-  </tr> 
-  <tr class="a"> 
    <td>Maryann Xue </td> 
    <td>Intel </td> 
    <td><a class="externalLink" href="mailto:maryannxue@apache.org">maryannxue@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
-  <tr class="b"> 
-   <td>Anoop Sam John </td> 
-   <td>Intel </td> 
-   <td><a class="externalLink" href="mailto:anoopsamjohn@apache.org">anoopsamjohn@apache.org</a> </td> 
-   <td>PMC</td> 
-  </tr> 
   <tr class="a"> 
-   <td>Ramkrishna Vasudevan </td> 
-   <td>Intel </td> 
-   <td><a class="externalLink" href="mailto:ramkrishna@apache.org">ramkrishna@apache.org</a> </td> 
+   <td>Michael Stack </td> 
+   <td>Cloudera </td> 
+   <td><a class="externalLink" href="mailto:stack@apache.org">stack@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="b"> 
-   <td>Jeffrey Zhong </td> 
-   <td>Hortonworks </td> 
-   <td><a class="externalLink" href="mailto:jeffreyz@apache.org">jeffreyz@apache.org</a> </td> 
+   <td>Mujtaba Chohan </td> 
+   <td>Salesforce </td> 
+   <td><a class="externalLink" href="mailto:mujtaba@apache.org">mujtaba@apache.org</a> </td> 
    <td>PMC</td> 
   </tr> 
   <tr class="a"> 
@@ -241,17 +229,17 @@
    <td>PMC</td> 
   </tr> 
   <tr class="b"> 
-   <td>Gabriel Reid </td> 
-   <td>NGDATA </td> 
-   <td><a class="externalLink" href="mailto:greid@apache.org">greid@apache.org</a> </td> 
-   <td>PMC</td> 
-  </tr> 
-  <tr class="a"> 
    <td>Rajeshbabu Chintaguntla </td> 
-   <td>Huawei </td> 
+   <td>Hortonworks </td> 
    <td><a class="externalLink" href="mailto:rajeshbabu@apache.org">rajeshbabu@apache.org</a> </td> 
    <td>Committer</td> 
   </tr> 
+  <tr class="a"> 
+   <td>Ramkrishna Vasudevan </td> 
+   <td>Intel </td> 
+   <td><a class="externalLink" href="mailto:ramkrishna@apache.org">ramkrishna@apache.org</a> </td> 
+   <td>PMC</td> 
+  </tr> 
   <tr class="b"> 
    <td>Ravi Magham </td> 
    <td>Cornerstone OnDemand </td> 
@@ -264,6 +252,24 @@
    <td><a class="externalLink" href="mailto:samarth@apache.org">samarth@apache.org</a> </td> 
    <td>Committer</td> 
   </tr> 
+  <tr class="b"> 
+   <td>Simon Toens </td> 
+   <td>Salesforce </td> 
+   <td><a class="externalLink" href="mailto:stoens@apache.org">stoens@apache.org</a> </td> 
+   <td>PMC</td> 
+  </tr> 
+  <tr class="a"> 
+   <td>Steven Noels </td> 
+   <td>NG Data </td> 
+   <td><a class="externalLink" href="mailto:stevenn@apache.org">stevenn@apache.org</a> </td> 
+   <td>PMC</td> 
+  </tr> 
+  <tr class="b"> 
+   <td>Thomas D’Silva </td> 
+   <td>Salesforce </td> 
+   <td><a class="externalLink" href="mailto:tdsilva@apache.org">tdsilva@apache.org</a> </td> 
+   <td>Committer</td> 
+  </tr> 
  </tbody> 
 </table>
 			</div>

Modified: phoenix/site/source/src/site/markdown/secondary_indexing.md
URL: http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/secondary_indexing.md?rev=1658867&r1=1658866&r2=1658867&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/secondary_indexing.md (original)
+++ phoenix/site/source/src/site/markdown/secondary_indexing.md Wed Feb 11 02:12:39 2015
@@ -1,7 +1,18 @@
 # Secondary Indexing
 
-Secondary indexes are an orthogonal way to access data from its primary access path. In HBase, you have a single index that is lexicographically sorted on 
-the primary row key. Access to records in any way other than through the primary row requires scanning over potentially all the rows in the table to test them against your filter. With secondary indexing, the columns you index form an alternate row key to allow point lookups and range scans along this new axis. Phoenix is particularly powerful in that we provide _covered_ indexes - we do not need to go back to the primary table once we have found the index entry. Instead, we bundle the data we care about right in the index rows, saving read-time overhead.
+Secondary indexes are an orthogonal way to access data from its primary access path. In HBase, you have a single
+index that is lexicographically sorted on the primary row key. Access to records in any way other than through
+the primary row requires scanning over potentially all the rows in the table to test them against your filter.
+With secondary indexing, the columns or expressions you index form an alternate row key to allow point lookups
+and range scans along this new axis. Phoenix is particularly powerful in that we provide _covered_ indexes -
+we do not need to go back to the primary table once we have found the index entry. Instead, we bundle the data
+we care about right in the index rows, saving read-time overhead.
+
+## Functional Indexes
+Another useful feature that was introduced in the 4.3 release is functional indexes. Functional indexes  allow you to create
+an index not just on columns, but on an arbitrary expressions. Then when a query uses that expression, the index
+may be used to retrieve the results instead of the data table. For example, you could create an index on <code><small>UPPER(FIRST_NAME||' '||LAST_NAME)</small></code>
+to allow you to do case insensitive searches on the combined first name and last name of a person.
 
 Phoenix supports two types of indexing techniques: global and local indexing.
 Each are useful in different scenarios and have their own failure profiles and performance characteristics.
@@ -54,6 +65,15 @@ This will cause each data row to be retr
     </pre>
 Unlike global indexes, local indexes *will* use an index even when all columns referenced in the query are not contained in the index. This is done by default for local indexes because we know that the table and index data coreside on the same region server thus ensuring the lookup is local.
 
+###Functional Index
+In addition to indexing on just a column, arbitrary expression may be indexed. For example:
+
+    CREATE INDEX upper_name_idx ON employee (UPPER(name)) INCLUDE(name);
+
+With this index in place, when the following query is issued, the index would be used instead of the data table to retrieve the results:
+
+    SELECT id, name FROM employee WHERE UPPER(NAME)='John Doe';
+
 ###Index Sort Order
 Multiple columns may be indexed and their values may be stored in ascending or descending order.
 

Modified: phoenix/site/source/src/site/markdown/team.md
URL: http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/team.md?rev=1658867&r1=1658866&r2=1658867&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/team.md (original)
+++ phoenix/site/source/src/site/markdown/team.md Wed Feb 11 02:12:39 2015
@@ -7,23 +7,24 @@ The following is a list of contributors
 
 Name| Company| Email| Role
 ----|--------|------|-----
-Lars Hofhansl | Salesforce | larsh@apache.org | PMC
 Andrew Purtell | Salesforce | apurtell@apache.org | PMC
-Enis Soztutar | Hortonworks | enis@apache.org | PMC
+Anoop Sam John | Intel | anoopsamjohn@apache.org | PMC
 Deveraj Das | Hortonworks | ddas@apache.org | PMC
-Steven Noels | NG Data | stevenn@apache.org | PMC
-Michael Stack | Cloudera | stack@apache.org | PMC
+Eli Levine | Salesforce | elilevine@apache.org | PMC
+Enis Soztutar | Hortonworks | enis@apache.org | PMC
+Gabriel Reid | NGDATA | greid@apache.org | PMC
 James Taylor | Salesforce | jamestaylor@apache.org | PMC
+Jeffrey Zhong | Hortonworks | jeffreyz@apache.org | PMC
 Jesse Yates | Salesforce | jyates@apache.org | PMC
-Eli Levine | Salesforce | elilevine@apache.org | PMC
-Simon Toens | Salesforce | stoens@apache.org | PMC
-Mujtaba Chohan | Salesforce | mujtaba@apache.org | PMC
+Lars Hofhansl | Salesforce | larsh@apache.org | PMC
 Maryann Xue | Intel | maryannxue@apache.org | PMC
-Anoop Sam John | Intel | anoopsamjohn@apache.org | PMC
-Ramkrishna Vasudevan | Intel | ramkrishna@apache.org | PMC
-Jeffrey Zhong | Hortonworks | jeffreyz@apache.org | PMC
+Michael Stack | Cloudera | stack@apache.org | PMC
+Mujtaba Chohan | Salesforce | mujtaba@apache.org | PMC
 Nick Dimiduk | Hortonworks | ndimiduk@apache.org | PMC
-Gabriel Reid | NGDATA | greid@apache.org | PMC
-Rajeshbabu Chintaguntla | Huawei | rajeshbabu@apache.org | Committer
+Rajeshbabu Chintaguntla | Hortonworks | rajeshbabu@apache.org | Committer
+Ramkrishna Vasudevan | Intel | ramkrishna@apache.org | PMC
 Ravi Magham | Cornerstone OnDemand | ravimagham@apache.org | Committer
 Samarth Jain | Salesforce | samarth@apache.org | Committer 
+Simon Toens | Salesforce | stoens@apache.org | PMC
+Steven Noels | NG Data | stevenn@apache.org | PMC
+Thomas D'Silva | Salesforce | tdsilva@apache.org | Committer