taming hbase with apache phoenix and sql

86
Apache Phoenix James Taylor @JamesPlusPlus Maryann Xue @MaryannXue Eli Levine @teleturn We put the SQL back in NoSQL http:// phoenix.incubator.apache.org

Upload: hbasecon

Post on 27-Jan-2015

116 views

Category:

Software


5 download

DESCRIPTION

Speakers: Eli Levine, James Taylor (Salesforce.com) & Maryann Xue (Intel) HBase is the Turing machine of the Big Data world. It's been scientifically proven that you can do *anything* with it. This is, of course, a blessing and a curse, as there are so many different ways to implement a solution. Apache Phoenix (incubating), the SQL engine over HBase to the rescue. Come learn about the fundamentals of Phoenix and how it hides the complexities of HBase while giving you optimal performance, and hear about new features from our recent release, including updatable views that share the same physical HBase table and n-way equi-joins through a broadcast hash join mechanism. We'll conclude with a discussion about our roadmap and plans to implement a cost-based query optimization to dynamically adapt query execution based on your data sizes.

TRANSCRIPT

Page 1: Taming HBase with Apache Phoenix and SQL

Apache Phoenix

James Taylor @JamesPlusPlus

Maryann Xue @MaryannXue

Eli Levine @teleturn

We put the SQL back in NoSQLhttp://phoenix.incubator.apache.org

Page 2: Taming HBase with Apache Phoenix and SQL

About James

Completed

o Engineer at Salesforce.com in BigData groupo Started Phoenix as internal project ~2.5 years agoo Open-source on Github ~1.5 years agoo Apache incubator for past 5 months

o Engineer at BEA Systemso XQuery-based federated query engineo SQL-based complex event processing engine

Page 3: Taming HBase with Apache Phoenix and SQL

Agenda

Completed

o What is Apache Phoenix?o Why is it so fast?o How does it help HBase scale?o Roadmapo Q&A

Page 4: Taming HBase with Apache Phoenix and SQL

What is Apache Phoenix?

Completed

Page 5: Taming HBase with Apache Phoenix and SQL

What is Apache Phoenix?

Completed

1. Turns HBase into a SQL databaseo Query Engineo MetaData Repositoryo Embedded JDBC drivero Only for HBase data

Page 6: Taming HBase with Apache Phoenix and SQL

What is Apache Phoenix?

Completed

2. Fastest way to access HBase datao HBase-specific push downo Compiles queries into native

HBase calls (no map-reduce)o Executes scans in parallel

Page 7: Taming HBase with Apache Phoenix and SQL

Completed

SELECT * FROM t WHERE k IN (?,?,?)

Phoenix Stinger (Hive 0.13)

0.04 sec 280 sec

* 110M row table

7,000x faster

Page 8: Taming HBase with Apache Phoenix and SQL

What is Apache Phoenix?

Completed

3. Lightweighto No additional servers requiredo Bundled with Hortonworks 2.1o 100% Java

Page 9: Taming HBase with Apache Phoenix and SQL

HBase Cluster Architecture

Page 10: Taming HBase with Apache Phoenix and SQL

HBase Cluster Architecture

Phoenix

Page 11: Taming HBase with Apache Phoenix and SQL

HBase Cluster Architecture

Phoenix

Phoenix

Page 12: Taming HBase with Apache Phoenix and SQL

What is Apache Phoenix?

Completed

4. Integration-friendlyo Map to existing HBase tableo Integrate with Apache Pigo Integrate with Apache Flumeo Integrate with Apache Sqoop (wip)

Page 13: Taming HBase with Apache Phoenix and SQL

What is Apache Phoenix?

Completed

1. Turns HBase into a SQL database2. Fastest way to access HBase data3. Lightweight4. Integration-friendly

Page 14: Taming HBase with Apache Phoenix and SQL

Why is Phoenix so fast?

Completed

Page 15: Taming HBase with Apache Phoenix and SQL

Why is Phoenix so fast?

Completed

1. HBaseo Fast, but “dumb” (on purpose)

2. Data modelo Support for composite primary keyo Binary data sorts naturally

3. Client-side parallelization4. Push down

o Custom filters and coprocessors

Page 16: Taming HBase with Apache Phoenix and SQL

Phoenix Data Model

HBase Table

Phoenix maps HBase data model to the relational world

Page 17: Taming HBase with Apache Phoenix and SQL

Phoenix Data Model

HBase TableColumn Family A Column Family B

Phoenix maps HBase data model to the relational world

Page 18: Taming HBase with Apache Phoenix and SQL

Phoenix Data Model

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Phoenix maps HBase data model to the relational world

Page 19: Taming HBase with Apache Phoenix and SQL

Phoenix Data Model

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 KeyValue

Phoenix maps HBase data model to the relational world

Page 20: Taming HBase with Apache Phoenix and SQL

Phoenix Data Model

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 KeyValue

Row Key 2 KeyValue KeyValue

Phoenix maps HBase data model to the relational world

Page 21: Taming HBase with Apache Phoenix and SQL

Phoenix Data Model

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 KeyValue

Row Key 2 KeyValue KeyValue

Row Key 3 KeyValue

Phoenix maps HBase data model to the relational world

Page 22: Taming HBase with Apache Phoenix and SQL

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 Value

Row Key 2 Value Value

Row Key 3 Value

Phoenix Data Model

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 KeyValue

Row Key 2 KeyValue KeyValue

Row Key 3 KeyValue

Phoenix maps HBase data model to the relational world

Page 23: Taming HBase with Apache Phoenix and SQL

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 Value

Row Key 2 Value Value

Row Key 3 Value

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 Value

Row Key 2 Value Value

Row Key 3 Value

Phoenix Data Model

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 KeyValue

Row Key 2 KeyValue KeyValue

Row Key 3 KeyValue

Phoenix maps HBase data model to the relational world

Page 24: Taming HBase with Apache Phoenix and SQL

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 Value

Row Key 2 Value Value

Row Key 3 Value

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 Value

Row Key 2 Value Value

Row Key 3 Value

Phoenix Data Model

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 KeyValue

Row Key 2 KeyValue KeyValue

Row Key 3 KeyValue

Phoenix maps HBase data model to the relational world

Multiple Versions

Page 25: Taming HBase with Apache Phoenix and SQL

Phoenix Data Model

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 KeyValue

Row Key 2 KeyValue KeyValue

Row Key 3 KeyValue

Phoenix maps HBase data model to the relational world

Phoenix Table

Page 26: Taming HBase with Apache Phoenix and SQL

Phoenix Data Model

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 KeyValue

Row Key 2 KeyValue KeyValue

Row Key 3 KeyValue

Phoenix maps HBase data model to the relational world

Phoenix Table

Key Value Columns

Page 27: Taming HBase with Apache Phoenix and SQL

Phoenix Data Model

HBase TableColumn Family A Column Family B

Qualifier 1 Qualifier 2 Qualifier 3

Row Key 1 KeyValue

Row Key 2 KeyValue KeyValue

Row Key 3 KeyValue

Phoenix maps HBase data model to the relational world

Phoenix Table

Key Value ColumnsPrimary Key Constraint

Page 28: Taming HBase with Apache Phoenix and SQL

Example

Row Key

SERVER METRICS

HOST VARCHAR

DATE DATE

RESPONSE_TIME INTEGER

GC_TIME INTEGER

CPU_TIME INTEGER

IO_TIME INTEGER

Over metrics data for servers with a schema like this:

Page 29: Taming HBase with Apache Phoenix and SQL

ExampleOver metrics data for servers with a schema like this:

Key Values

SERVER METRICS

HOST VARCHAR

DATE DATE

RESPONSE_TIME INTEGER

GC_TIME INTEGER

CPU_TIME INTEGER

IO_TIME INTEGER

Page 30: Taming HBase with Apache Phoenix and SQL

Example

CREATE TABLE SERVER_METRICS (

HOST VARCHAR,DATE DATE,RESPONSE_TIME INTEGER,

GC_TIME INTEGER,CPU_TIME INTEGER,IO_TIME INTEGER,CONSTRAINT pk PRIMARY KEY (HOST, DATE))

DDL command looks like this:

Page 31: Taming HBase with Apache Phoenix and SQL

With data that looks like this:

SERVER METRICSHOST + DATE RESPONSE_TIME GC_TIME

SF1 1396743589 1234

SF1 1396743589 8012

SF3 1396002345 2345

SF3 1396002345 2340

SF7 1396552341 5002 1234

Example

Row Key

Page 32: Taming HBase with Apache Phoenix and SQL

With data that looks like this:

SERVER METRICSHOST + DATE RESPONSE_TIME GC_TIME

SF1 1396743589 1234

SF1 1396743589 8012

SF3 1396002345 2345

SF3 1396002345 2340

SF7 1396552341 5002 1234

Example

Key Values

Page 33: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Example

Completed

SELECT host, avg(response_time)FROM server_metricsWHERE date > CURRENT_DATE() – 7AND host LIKE ‘SF%’GROUP BY host

Page 34: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Example

Completed

SELECT host, avg(response_time)FROM server_metricsWHERE date > CURRENT_DATE() – 7AND host LIKE ‘SF%’GROUP BY host

Page 35: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Example

Completed

SELECT host, avg(response_time)FROM server_metricsWHERE date > CURRENT_DATE() – 7AND host LIKE ‘SF%’GROUP BY host

Page 36: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Example

Completed

SELECT host, avg(response_time)FROM server_metricsWHERE date > CURRENT_DATE() – 7AND host LIKE ‘SF%’GROUP BY host

Page 37: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Example

Completed

SELECT host, avg(response_time)FROM server_metricsWHERE date > CURRENT_DATE() – 7AND host LIKE ‘SF%’GROUP BY host

Page 38: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down

1. Skip scan filter2. Aggregation3. TopN4. Hash Join

Page 39: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Skip scan

SELECT host, avg(response_time)FROM server_metricsWHERE date > CURRENT_DATE() – 7AND host LIKE ‘SF%’GROUP BY host

Page 40: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Skip scan

Completed

R1

R2

R3

R4

Page 41: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Skip scanClient-side parallel scans

Completed

R1

R2

R3

R4

scan1

scan3

scan2

Page 42: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Skip scanServer-side filter

Completed

SKIP

Page 43: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Skip scanServer-side filter

Completed

INCLUDE

Page 44: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Skip scanServer-side filter

Completed

SKIP

Page 45: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Skip scanServer-side filter

CompletedINCLUDE

Page 46: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Skip scanServer-side filter

SKIP

Page 47: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Skip scanServer-side filter

INCLUDE

Page 48: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Skip scanServer-side filter

INCLUDE

INCLUDE

INCLUDE

Page 49: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Aggregation

SELECT host, avg(response_time)FROM server_metricsWHERE date > CURRENT_DATE() – 7AND host LIKE ‘SF%’GROUP BY host

Page 50: Taming HBase with Apache Phoenix and SQL

SERVER METRICS

HOST DATE KV1 KV2 KV3SF1 Jun 2 10:10:10.234 239 234 674SF1 Jun 3 23:05:44.975 23 234SF1 Jun 9 08:10:32.147 256 314 341SF1 Jun 9 08:10:32.147 235 256SF1 Jun 1 11:18:28.456 235 23SF1 Jun 3 22:03:22.142 234 314SF1 Jun 3 22:03:22.142 432 234 256SF2 Jun 1 10:29:58.950 23 432SF2 Jun 2 14:55:34.104 314 876 23SF2 Jun 3 12:46:19.123 256 234 314SF2 Jun 3 12:46:19.123 432SF2 Jun 8 08:23:23.456 876 876 235SF2 Jun 1 10:31:10.234 234 234 876SF3 Jun 1 10:31:10.234 432 432 234SF3 Jun 3 10:31:10.234 890SF3 Jun 8 10:31:10.234 314 314 235SF3 Jun 1 10:31:10.234 256 256 876SF3 Jun 1 10:31:10.234 235 234SF3 Jun 8 10:31:10.234 876 876 432SF3 Jun 9 10:31:10.234 234 234SF3 Jun 3 10:31:10.234 432 276… … … … …

Phoenix Push Down: Aggregation Aggregate on server-side

SERVER METRICS

HOST AGGREGATE VALUESSF1 3421SF2 2145SF3 9823

Page 51: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: TopN

Completed

SELECT host, date, gc_timeFROM server_metricsWHERE date > CURRENT_DATE() – 7AND host LIKE ‘SF%’ORDER BY gc_time DESCLIMIT 5

Page 52: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: TopNClient-side parallel scans

Completed

R1

R2

R3

R4

scan1

scan3

scan2

Page 53: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: TopNEach region holds N rows

Completed

R1

R2

R3

R4

scan1

Page 54: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: TopNEach region holds N rows

Completed

R1

R2

R3

R4

scan2

Page 55: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: TopNEach region holds N rows

Completed

R1

R2

R3

R4

scan3

Page 56: Taming HBase with Apache Phoenix and SQL

SERVER METRICS

HOST DATE GC_TIMESF3 Jun 2 10:10:10.234 22123

SF5 Jun 3 23:05:44.975 19876

SF2 Jun 9 08:10:32.147 11345

SF2 Jun 1 11:18:28.456 10234

SF1 Jun 3 22:03:22.142 10111

Phoenix Push Down: TopNClient-side final merge sort

Scan1

Scan2

Scan3

Page 57: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: TopNSecondary Index

Completed

CREATE INDEX gc_time_indexON server_metrics (gc_time DESC, date DESC)INCLUDE (response_time)

Row Key

GC_TIME_INDEX

GC_TIME INTEGER

DATE DATE

HOST VARCHAR

RESPONSE_TIME INTEGER

Page 58: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: TopNSecondary Index

Completed

CREATE INDEX gc_time_indexON server_metrics (gc_time DESC, date DESC)INCLUDE (response_time)

Key Value

GC_TIME_INDEX

GC_TIME INTEGER

DATE DATE

HOST VARCHAR

RESPONSE_TIME INTEGER

Page 59: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: TopNSecondary Index

Completed

o Original query doesn’t changeo Phoenix rewrites query to use index tableo All referenced columns must exist in index

table for it to be consideredo Local Indexing coming soon!o Stats coming soon!

Page 60: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash Join

Completed

SELECT m.*, i.locationFROM server_metrics mJOIN host_info i ON m.host = i.hostWHERE m.date > CURRENT_DATE() – 7AND i.location = ‘SF’ORDER BY m.gc_time DESCLIMIT 5

Page 61: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinSeparate LHS and RHS

Completed

SELECT m.*, i.locationFROM server_metrics mJOIN host_info i ON m.host = i.hostWHERE m.date > CURRENT_DATE() – 7AND i.location = ‘SF’ORDER BY m.gc_time DESCLIMIT 5

Page 62: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinSeparate LHS and RHS

Completed

SELECT m.*, i.locationFROM server_metrics mJOIN host_info i ON m.host = i.hostWHERE m.date > CURRENT_DATE() – 7AND i.location = ‘SF’ORDER BY m.gc_time DESCLIMIT 5

Page 63: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinSeparate LHS and RHS

Completed

LHSSELECT *FROM server_metrics WHERE date > CURRENT_DATE() – 7ORDER BY gc_time DESCLIMIT 5

RHSSELECT host, locationFROM host_info WHERE location = ‘SF’

Page 64: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinExecute & broadcast RHS to each RS

Completed

RS1

RS2

RHS

Page 65: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinServer-side map lookup during scan

Completed

R1

R2

R3

R4

RHS

RHS

LHS

scan1

scan2

scan3

scan4

Page 66: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinDerived Tables and Filter Rewrite

Completed

SELECT i.host, i.location, m.res, m.gcFROM host_info iJOIN (SELECT host, avg(response_time) res, avg(gc_time) gc FROM server_metrics GROUP BY host) AS m ON i.host = m.hostWHERE i.location != ‘NJ’ AND (m.res >= 10000 OR m.gc >= 2000)

Page 67: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinFilters Pushed Down and Rewritten for RHS

Completed

RHSSELECT host, avg(response_time), avg(gc_time)FROM server_metrics GROUP BY hostHAVINGavg(response_time)>=10000 OR avg(gc_time)>=2000

LHSSELECT host, locationFROM host_info WHERE location != ‘NJ’

Page 68: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinMultiple Joins and Sub-joins

Completed

SELECT *FROM server_metrics mJOIN (host_info h JOIN location_info l ON h.location = l.location) ON m.host = h.hostWHERE m.date > CURRENT_DATE() – 7AND l.user_count >= 200000

Page 69: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinRecursively Separate LHS and RHS

Completed

Outer RHSOuter LHSSELECT *FROM server_metrics WHERE date > CURRENT_DATE() – 7

Inner LHSSELECT *FROM host_info

Inner RHSSELECT *FROM location_info WHERE user_count >= 200000

Page 70: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinIterative Execution of Multiple Joins

CompletedRS1

RS2

Inner RHS

Broadcast

RS1

RS1

RS2

RS3

RS4

ScanInner LHS

Outer RHS

Broadcast

ScanOuter LHS

ScanInner RHS

Page 71: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinStar-join Optimization

Completed

SELECT *FROM server_metrics mJOIN host_info h ON m.host = h.hostJOIN location_info l ON h.location = l.locationWHERE m.date > CURRENT_DATE() – 7AND l.user_count >= 200000

Page 72: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinSeparate LHS and Multiple Parallel RHS

Completed

LHSSELECT *FROM server_metrics WHERE date > CURRENT_DATE() – 7

RHS 1SELECT *FROM host_info

RHS 2SELECT *FROM location_info WHERE user_count >= 200000

Page 73: Taming HBase with Apache Phoenix and SQL

Phoenix Push Down: Hash JoinStar-join Execution of Multiple Joins

Completed

RS1

RS2

RHS 1RS1 RS1

RS2

RS3

RS4

Scan RHS 2

Broadcast

Scan LHSScan RHS 1

RHS 2

Page 74: Taming HBase with Apache Phoenix and SQL

New in Phoenix 3: Shared Tables

• HBase wants small # of big tables instead of large # of small tables

• Two types of shared tables in Phoenix 3:• Views• Tenant-specific Tables

Page 75: Taming HBase with Apache Phoenix and SQL

Views

• Multiple Phoenix tables share same physical HBase table

• Inherit parent table’s PK, KV columns

• Updateable Views

• Secondary Indexes on Views

Page 76: Taming HBase with Apache Phoenix and SQL

Completed

CREATE TABLE event (type CHAR(1),event_id BIGINT,created_date DATE,created_by VARCHAR,CONSTRAINT pk PRIMARY KEY (type, event_id));

CREATE VIEW web_event (referrer VARCHAR) AS

SELECT * FROM eventWHERE type=‘w’;

• Includes columns from TABLE• Cannot define PK• Updateable if only equality

expressions separated by AND

Views

Page 77: Taming HBase with Apache Phoenix and SQL

Completed

type = ‘c’

type = ‘m’

type = ‘p’

type = ‘w’

EVENT

CHAT_EVENT

MOBILE_EVENT

PHONE_EVENT

WEB_EVENT

Views

Page 78: Taming HBase with Apache Phoenix and SQL

Tenant-Specific Tables

• Tenant data isolation and co-location

• Built using Views

• Uses tenant-specific Connections

Page 79: Taming HBase with Apache Phoenix and SQL

Completed

CREATE TABLE event (tenant_id VARCHAR,type CHAR(1),event_id BIGINT,created_date DATE,created_by VARCHAR,CONSTRAINT pk PRIMARY KEY (tenant_id, type, event_id))

MULTI_TENANT=true;

First PK column identifies tenant ID

Tenant-Specific TablesStep 1: Create multi-tenant base table

Page 80: Taming HBase with Apache Phoenix and SQL

Completed

CREATE VIEW web_event ( referrer VARCHAR) ASSELECT * FROM eventWHERE type=‘w’;

DriverManager.connect(“jdbc:phoenix:localhost;TenantId=me”);

CREATE VIEW my_web_event ASSELECT * FROM web_event; Tenant-specific view

Tenant-specific connection

Tenant-Specific TablesStep 2: Create tenant-specific tables

Page 81: Taming HBase with Apache Phoenix and SQL

tenant_id = ‘me’

EVENT

tenant_id = ‘you’

tenant_id = ‘them’

Tenant-Specific Tables

Page 82: Taming HBase with Apache Phoenix and SQL

type = ‘c’

type = ‘m’

type = ‘p’

type = ‘w’

EVENT

CHAT_EVENT

MOBILE_EVENT

PHONE_EVENT

WEB_EVENT

PERtenant_id

Tenant-Specific Tables

Page 83: Taming HBase with Apache Phoenix and SQL

• Tenant-specific connection may only see and operate on their data

• Inherit parent table’s PK, KV columns• Tenant-specific secondary indexes• Restrictions:

• No ALTER base table• No DROP columns used in PK and where clause• PK columns same as parent

Tenant-Specific Tables

Page 84: Taming HBase with Apache Phoenix and SQL

• Allow shared tables to extend parent’s PK

• Support more complex WHERE clauses for updatable views

• Support projecting subset of columns to View

Shared Tables Future Work

Page 85: Taming HBase with Apache Phoenix and SQL

Phoenix Roadmap

Completed

o Local Indexeso Transactionso More Join strategieso Cost-based query optimizero OLAP extensions

Page 86: Taming HBase with Apache Phoenix and SQL

Thank you!Questions/comments?