SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Phoenix
We put the SQL back in the NoSQL
James Taylor
jtaylor@salesforce.com
Agenda
Phoenix Overview
Phoenix Implementation
Performance Analysis
Phoenix Roadmap
Demo           Completed
Phoenix Overview
SQL layer on top of HBase
Delivered as a embedded JDBC driver
Targeting low latency queries over HBase data
Columns modeled as multi-part row key and key values
Query engine transforms SQL into series of scans
Using native HBase APIs and capabilities
                        Completed
    Coprocessors for aggregation
    Custom filters for expression evaluation
    Transaction isolation through scan time range
    Optionally client-controlled timestamps
Open sourcing soon
100% Java
Phoenix SQL Support
           SELECT <expression>…
           FROM <table>
           WHERE <expression>
           GROUP BY <expression>…
           HAVING <aggregate expression>
           ORDER BY <aggregate expression>…
           LIMIT <value>
Aggregation Functions
       MIN, MAX, AVG, SUM, COUNT
Built-in Functions
       SUBSTR, ROUND, TRUNC, TO_CHAR, TO_DATE
Operators
       =,!=,<>,<,<=,>,>=, LIKE
       AND, OR, NOT
Bind Parameters
       ?, :#
CASE WHEN
IN (<value>…)
DDL/DML (in progress)
       CREATE/DROP <table>
       DELETE FROM <table> WHERE <expression>
       UPSERT INTO <table> [(<column>…)]
          VALUES (<value>…)
Sample Queries
SELECT host, TRUNC(dateTime, 'DAY'),
                               Completed
  AVG(cache_hit), MIN(cache_hit), MAX(cache_hit)
FROM server_metrics
WHERE host LIKE 'cs11-%'
AND dateTime> TO_DATE('2012-04-01')
AND dateTime< TO_DATE('2012-07-01')
GROUP BY host, TRUNC(dateTime, 'DAY')
HAVING MIN(cache_hit) < 90
ORDER BY host, AVG(cache_hit)

SELECT product_number, product_name,
   CASE
    WHEN list_price = 0 THEN 'Mfg item - not for resale'
    WHEN list_price < 50 THEN 'Under $50'
    WHEN list_price >= 50 and list_price < 250 THEN 'Under $250'
    WHEN list_price >= 250 and list_price < 1000 THEN 'Under $1000'
    ELSE 'Over $1000'
   END as price_category
FROM product_catalogue
WHERE product_category IN ('Camping', 'Hiking’)
AND (product_name LIKE '%Pack’ OR product_name LIKE '% Cots %’)
Query Processing
                   Product Metrics HTable
     Row Key        ORG_ID       DATE           FEATURE

                                     TXNS
     Key Values                    IO_TIME
                               RESPONSE_TIME


                             Scan
SELECT feature, SUM(txns)      Start key: ORG_ID (:1) + DATE (:2)
FROM product_metrics           End key: ORG_ID (:1) + DATE (:3)
                             Filter
WHERE org_id = :1              Filter:    IO_TIME > 100
AND date >= :2               Aggregation
AND date <= :3                 Intercepts scan on region server
                               Builds map of distinct FEATURE values
AND io_time > 100
                               Returns one row per distinct group
GROUP BY feature               Client does final merge
Phoenix Query Optimizations
Start/stop key of scan based on AND-ed columns
    Through SUBSTR, ROUND, TRUNC, LIKE
Parallelized on client by chunking over start/stop key of scan
Aggregation on region-servers through coprocessor
    Inline for GROUP BY over row key ordered columns
    In memory map per group otherwise
WHERE clause executed through custom filters
                              Completed
    Incremental evaluation with early termination
    Evaluated through byte pointers
IN and OR over same column (in progress)
    Becomes batched get or filter with next row hint
Top N queries (future)
    Through coprocessor keeping top N rows
TABLESAMPLE (future)
    Becomes filter with next row hint
Phoenix Performance
Phoenix Performance




      Completed
Phoenix Roadmap
Increase breadth of SQL support
    DML/DDL (in progress)
    Derived tables (SELECT * FROM (SELECT foo FROM bar))
    More built-in functions: COALESCE, UPPER, TRIM
    More operators: ||, IS NULL, *,/,+,-
Secondary indexes
    Multiple projections for immutable data
       Reordered columns Completed
                              in row key
       Different levels of aggregation
    Incrementally maintained for non immutable data
TABLESAMPLE for sampling
Improve multi-byte support
Joins
    Hash join
OLAP extensions
    OVER
    PARTITION BY
Demo
              Completed



Time-series database charting
http://goo.gl/61WRs
Thank you!
Questions/comments?

Weitere ähnliche Inhalte

Was ist angesagt?

InfiniFlux collector
InfiniFlux collectorInfiniFlux collector
InfiniFlux collectorInfiniFlux
 
2 sql - single-row functions
2   sql - single-row functions2   sql - single-row functions
2 sql - single-row functionsAnkit Dubey
 
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache CalciteCost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache CalciteJulian Hyde
 
Edition Based Redefinition
Edition Based RedefinitionEdition Based Redefinition
Edition Based RedefinitionAlex Nuijten
 
Edition Based Redefinition - Continuous Database Application Evolution with O...
Edition Based Redefinition - Continuous Database Application Evolution with O...Edition Based Redefinition - Continuous Database Application Evolution with O...
Edition Based Redefinition - Continuous Database Application Evolution with O...Lucas Jellema
 
PL-SQL DIFFERENT PROGRAMS
PL-SQL DIFFERENT PROGRAMSPL-SQL DIFFERENT PROGRAMS
PL-SQL DIFFERENT PROGRAMSraj upadhyay
 
Data Processing with Cascading Java API on Apache Hadoop
Data Processing with Cascading Java API on Apache HadoopData Processing with Cascading Java API on Apache Hadoop
Data Processing with Cascading Java API on Apache HadoopHikmat Dhamee
 
Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)jaxLondonConference
 
An Introduction To PostgreSQL Triggers
An Introduction To PostgreSQL TriggersAn Introduction To PostgreSQL Triggers
An Introduction To PostgreSQL TriggersJim Mlodgenski
 
なんでもID
なんでもIDなんでもID
なんでもIDkwatch
 
Chetan postgresql partitioning
Chetan postgresql partitioningChetan postgresql partitioning
Chetan postgresql partitioningOpenSourceIndia
 
Optimizing MySQL Queries
Optimizing MySQL QueriesOptimizing MySQL Queries
Optimizing MySQL QueriesAchievers Tech
 
Explaining the Postgres Query Optimizer
Explaining the Postgres Query OptimizerExplaining the Postgres Query Optimizer
Explaining the Postgres Query OptimizerEDB
 
Sql and PL/SQL Best Practices I
Sql and PL/SQL Best Practices ISql and PL/SQL Best Practices I
Sql and PL/SQL Best Practices ICarlos Oliveira
 
Common mistakes made with Functional Java
Common mistakes made with Functional JavaCommon mistakes made with Functional Java
Common mistakes made with Functional JavaBrian Vermeer
 

Was ist angesagt? (20)

InfiniFlux collector
InfiniFlux collectorInfiniFlux collector
InfiniFlux collector
 
2 sql - single-row functions
2   sql - single-row functions2   sql - single-row functions
2 sql - single-row functions
 
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache CalciteCost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
 
Edition Based Redefinition
Edition Based RedefinitionEdition Based Redefinition
Edition Based Redefinition
 
My sql
My sqlMy sql
My sql
 
Explain that explain
Explain that explainExplain that explain
Explain that explain
 
Edition Based Redefinition - Continuous Database Application Evolution with O...
Edition Based Redefinition - Continuous Database Application Evolution with O...Edition Based Redefinition - Continuous Database Application Evolution with O...
Edition Based Redefinition - Continuous Database Application Evolution with O...
 
PL-SQL DIFFERENT PROGRAMS
PL-SQL DIFFERENT PROGRAMSPL-SQL DIFFERENT PROGRAMS
PL-SQL DIFFERENT PROGRAMS
 
Mysql
MysqlMysql
Mysql
 
Cube rollup slides
Cube rollup slidesCube rollup slides
Cube rollup slides
 
Olapsql
OlapsqlOlapsql
Olapsql
 
Data Processing with Cascading Java API on Apache Hadoop
Data Processing with Cascading Java API on Apache HadoopData Processing with Cascading Java API on Apache Hadoop
Data Processing with Cascading Java API on Apache Hadoop
 
Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)
 
An Introduction To PostgreSQL Triggers
An Introduction To PostgreSQL TriggersAn Introduction To PostgreSQL Triggers
An Introduction To PostgreSQL Triggers
 
なんでもID
なんでもIDなんでもID
なんでもID
 
Chetan postgresql partitioning
Chetan postgresql partitioningChetan postgresql partitioning
Chetan postgresql partitioning
 
Optimizing MySQL Queries
Optimizing MySQL QueriesOptimizing MySQL Queries
Optimizing MySQL Queries
 
Explaining the Postgres Query Optimizer
Explaining the Postgres Query OptimizerExplaining the Postgres Query Optimizer
Explaining the Postgres Query Optimizer
 
Sql and PL/SQL Best Practices I
Sql and PL/SQL Best Practices ISql and PL/SQL Best Practices I
Sql and PL/SQL Best Practices I
 
Common mistakes made with Functional Java
Common mistakes made with Functional JavaCommon mistakes made with Functional Java
Common mistakes made with Functional Java
 

Ähnlich wie Phoenix h basemeetup

What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
 
Data-and-Compute-Intensive processing Use Case: Lucene Domain Index
Data-and-Compute-Intensive processing Use Case: Lucene Domain IndexData-and-Compute-Intensive processing Use Case: Lucene Domain Index
Data-and-Compute-Intensive processing Use Case: Lucene Domain IndexMarcelo Ochoa
 
Overview of query evaluation
Overview of query evaluationOverview of query evaluation
Overview of query evaluationavniS
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1MariaDB plc
 
Sql FUNCTIONS
Sql FUNCTIONSSql FUNCTIONS
Sql FUNCTIONSAbrar ali
 
ClickHouse new features and development roadmap, by Aleksei Milovidov
ClickHouse new features and development roadmap, by Aleksei MilovidovClickHouse new features and development roadmap, by Aleksei Milovidov
ClickHouse new features and development roadmap, by Aleksei MilovidovAltinity Ltd
 
Graph Algorithms: Analytics for Understanding Data Relationships
Graph Algorithms: Analytics for Understanding Data RelationshipsGraph Algorithms: Analytics for Understanding Data Relationships
Graph Algorithms: Analytics for Understanding Data RelationshipsNeo4j
 
Novidades do SQL Server 2016
Novidades do SQL Server 2016Novidades do SQL Server 2016
Novidades do SQL Server 2016Marcos Freccia
 
MemSQL 201: Advanced Tips and Tricks Webcast
MemSQL 201: Advanced Tips and Tricks WebcastMemSQL 201: Advanced Tips and Tricks Webcast
MemSQL 201: Advanced Tips and Tricks WebcastSingleStore
 
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_103 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1mlraviol
 
IBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql FeaturesIBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql FeaturesKeshav Murthy
 
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...Jürgen Ambrosi
 
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...Accumulo Summit
 
OGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewOGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewBartosz Dobrzelecki
 
SQL Functions and Operators
SQL Functions and OperatorsSQL Functions and Operators
SQL Functions and OperatorsMohan Kumar.R
 
Intro to DAX Patterns
Intro to DAX PatternsIntro to DAX Patterns
Intro to DAX PatternsEric Bragas
 
Sql Server 2008 New Programmability Features
Sql Server 2008 New Programmability FeaturesSql Server 2008 New Programmability Features
Sql Server 2008 New Programmability Featuressqlserver.co.il
 

Ähnlich wie Phoenix h basemeetup (20)

What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
 
Data-and-Compute-Intensive processing Use Case: Lucene Domain Index
Data-and-Compute-Intensive processing Use Case: Lucene Domain IndexData-and-Compute-Intensive processing Use Case: Lucene Domain Index
Data-and-Compute-Intensive processing Use Case: Lucene Domain Index
 
Dun ddd
Dun dddDun ddd
Dun ddd
 
Overview of query evaluation
Overview of query evaluationOverview of query evaluation
Overview of query evaluation
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
 
Sql FUNCTIONS
Sql FUNCTIONSSql FUNCTIONS
Sql FUNCTIONS
 
ClickHouse new features and development roadmap, by Aleksei Milovidov
ClickHouse new features and development roadmap, by Aleksei MilovidovClickHouse new features and development roadmap, by Aleksei Milovidov
ClickHouse new features and development roadmap, by Aleksei Milovidov
 
Graph Algorithms: Analytics for Understanding Data Relationships
Graph Algorithms: Analytics for Understanding Data RelationshipsGraph Algorithms: Analytics for Understanding Data Relationships
Graph Algorithms: Analytics for Understanding Data Relationships
 
Couchbas for dummies
Couchbas for dummiesCouchbas for dummies
Couchbas for dummies
 
Novidades do SQL Server 2016
Novidades do SQL Server 2016Novidades do SQL Server 2016
Novidades do SQL Server 2016
 
MemSQL 201: Advanced Tips and Tricks Webcast
MemSQL 201: Advanced Tips and Tricks WebcastMemSQL 201: Advanced Tips and Tricks Webcast
MemSQL 201: Advanced Tips and Tricks Webcast
 
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_103 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1
 
IBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql FeaturesIBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql Features
 
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
 
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...
 
OGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewOGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's View
 
SQL Functions and Operators
SQL Functions and OperatorsSQL Functions and Operators
SQL Functions and Operators
 
Intro to DAX Patterns
Intro to DAX PatternsIntro to DAX Patterns
Intro to DAX Patterns
 
Sql Server 2008 New Programmability Features
Sql Server 2008 New Programmability FeaturesSql Server 2008 New Programmability Features
Sql Server 2008 New Programmability Features
 

Mehr von Dmitry Makarchuk

2012 11-28 rich web data modeling with graphs-1
2012 11-28 rich web data modeling with graphs-12012 11-28 rich web data modeling with graphs-1
2012 11-28 rich web data modeling with graphs-1Dmitry Makarchuk
 
2012 11-28 rich web data modeling with graphs-1
2012 11-28 rich web data modeling with graphs-12012 11-28 rich web data modeling with graphs-1
2012 11-28 rich web data modeling with graphs-1Dmitry Makarchuk
 
Hadoop and mysql by Chris Schneider
Hadoop and mysql by Chris SchneiderHadoop and mysql by Chris Schneider
Hadoop and mysql by Chris SchneiderDmitry Makarchuk
 
A random forest approach to skin detection with r
A random forest approach to skin detection with rA random forest approach to skin detection with r
A random forest approach to skin detection with rDmitry Makarchuk
 
"Your script just killed my site" by Steve Souders
"Your script just killed my site" by Steve Souders"Your script just killed my site" by Steve Souders
"Your script just killed my site" by Steve SoudersDmitry Makarchuk
 
RBrowserPlugin Project (Gabriel Becker)
RBrowserPlugin Project (Gabriel Becker)RBrowserPlugin Project (Gabriel Becker)
RBrowserPlugin Project (Gabriel Becker)Dmitry Makarchuk
 
Builiding analytical apps on Hadoop
Builiding analytical apps on HadoopBuiliding analytical apps on Hadoop
Builiding analytical apps on HadoopDmitry Makarchuk
 
Jesse Yates: Hbase snapshots patch
Jesse Yates: Hbase snapshots patchJesse Yates: Hbase snapshots patch
Jesse Yates: Hbase snapshots patchDmitry Makarchuk
 
Mongo DB in gaming industry
Mongo DB in gaming industryMongo DB in gaming industry
Mongo DB in gaming industryDmitry Makarchuk
 

Mehr von Dmitry Makarchuk (11)

Linzer slides-barug
Linzer slides-barugLinzer slides-barug
Linzer slides-barug
 
2012 11-28 rich web data modeling with graphs-1
2012 11-28 rich web data modeling with graphs-12012 11-28 rich web data modeling with graphs-1
2012 11-28 rich web data modeling with graphs-1
 
2012 11-28 rich web data modeling with graphs-1
2012 11-28 rich web data modeling with graphs-12012 11-28 rich web data modeling with graphs-1
2012 11-28 rich web data modeling with graphs-1
 
Hadoop and mysql by Chris Schneider
Hadoop and mysql by Chris SchneiderHadoop and mysql by Chris Schneider
Hadoop and mysql by Chris Schneider
 
A random forest approach to skin detection with r
A random forest approach to skin detection with rA random forest approach to skin detection with r
A random forest approach to skin detection with r
 
"Your script just killed my site" by Steve Souders
"Your script just killed my site" by Steve Souders"Your script just killed my site" by Steve Souders
"Your script just killed my site" by Steve Souders
 
RBrowserPlugin Project (Gabriel Becker)
RBrowserPlugin Project (Gabriel Becker)RBrowserPlugin Project (Gabriel Becker)
RBrowserPlugin Project (Gabriel Becker)
 
Bridge to r
Bridge to rBridge to r
Bridge to r
 
Builiding analytical apps on Hadoop
Builiding analytical apps on HadoopBuiliding analytical apps on Hadoop
Builiding analytical apps on Hadoop
 
Jesse Yates: Hbase snapshots patch
Jesse Yates: Hbase snapshots patchJesse Yates: Hbase snapshots patch
Jesse Yates: Hbase snapshots patch
 
Mongo DB in gaming industry
Mongo DB in gaming industryMongo DB in gaming industry
Mongo DB in gaming industry
 

Phoenix h basemeetup

  • 1. Phoenix We put the SQL back in the NoSQL James Taylor jtaylor@salesforce.com
  • 2. Agenda Phoenix Overview Phoenix Implementation Performance Analysis Phoenix Roadmap Demo Completed
  • 3. Phoenix Overview SQL layer on top of HBase Delivered as a embedded JDBC driver Targeting low latency queries over HBase data Columns modeled as multi-part row key and key values Query engine transforms SQL into series of scans Using native HBase APIs and capabilities Completed Coprocessors for aggregation Custom filters for expression evaluation Transaction isolation through scan time range Optionally client-controlled timestamps Open sourcing soon 100% Java
  • 4. Phoenix SQL Support SELECT <expression>… FROM <table> WHERE <expression> GROUP BY <expression>… HAVING <aggregate expression> ORDER BY <aggregate expression>… LIMIT <value> Aggregation Functions  MIN, MAX, AVG, SUM, COUNT Built-in Functions  SUBSTR, ROUND, TRUNC, TO_CHAR, TO_DATE Operators  =,!=,<>,<,<=,>,>=, LIKE  AND, OR, NOT Bind Parameters  ?, :# CASE WHEN IN (<value>…) DDL/DML (in progress)  CREATE/DROP <table>  DELETE FROM <table> WHERE <expression>  UPSERT INTO <table> [(<column>…)] VALUES (<value>…)
  • 5. Sample Queries SELECT host, TRUNC(dateTime, 'DAY'), Completed AVG(cache_hit), MIN(cache_hit), MAX(cache_hit) FROM server_metrics WHERE host LIKE 'cs11-%' AND dateTime> TO_DATE('2012-04-01') AND dateTime< TO_DATE('2012-07-01') GROUP BY host, TRUNC(dateTime, 'DAY') HAVING MIN(cache_hit) < 90 ORDER BY host, AVG(cache_hit) SELECT product_number, product_name, CASE WHEN list_price = 0 THEN 'Mfg item - not for resale' WHEN list_price < 50 THEN 'Under $50' WHEN list_price >= 50 and list_price < 250 THEN 'Under $250' WHEN list_price >= 250 and list_price < 1000 THEN 'Under $1000' ELSE 'Over $1000' END as price_category FROM product_catalogue WHERE product_category IN ('Camping', 'Hiking’) AND (product_name LIKE '%Pack’ OR product_name LIKE '% Cots %’)
  • 6. Query Processing Product Metrics HTable Row Key ORG_ID DATE FEATURE TXNS Key Values IO_TIME RESPONSE_TIME Scan SELECT feature, SUM(txns)  Start key: ORG_ID (:1) + DATE (:2) FROM product_metrics  End key: ORG_ID (:1) + DATE (:3) Filter WHERE org_id = :1  Filter: IO_TIME > 100 AND date >= :2 Aggregation AND date <= :3  Intercepts scan on region server  Builds map of distinct FEATURE values AND io_time > 100  Returns one row per distinct group GROUP BY feature  Client does final merge
  • 7. Phoenix Query Optimizations Start/stop key of scan based on AND-ed columns Through SUBSTR, ROUND, TRUNC, LIKE Parallelized on client by chunking over start/stop key of scan Aggregation on region-servers through coprocessor Inline for GROUP BY over row key ordered columns In memory map per group otherwise WHERE clause executed through custom filters Completed Incremental evaluation with early termination Evaluated through byte pointers IN and OR over same column (in progress) Becomes batched get or filter with next row hint Top N queries (future) Through coprocessor keeping top N rows TABLESAMPLE (future) Becomes filter with next row hint
  • 10. Phoenix Roadmap Increase breadth of SQL support DML/DDL (in progress) Derived tables (SELECT * FROM (SELECT foo FROM bar)) More built-in functions: COALESCE, UPPER, TRIM More operators: ||, IS NULL, *,/,+,- Secondary indexes Multiple projections for immutable data Reordered columns Completed in row key Different levels of aggregation Incrementally maintained for non immutable data TABLESAMPLE for sampling Improve multi-byte support Joins Hash join OLAP extensions OVER PARTITION BY
  • 11. Demo Completed Time-series database charting http://goo.gl/61WRs

Hinweis der Redaktion

  1. Demos: GOC demo – popups and filters Pulse – show Splunk dashboard and talk to the process – Shriman Stats.pl for GSI and SDA - Saran
  2. Add stories the team is planning to work on for the next sprint – List in priority order
  3. Add stories the team is planning to work on for the next sprint – List in priority order
  4. Add stories the team is planning to work on for the next sprint – List in priority order
  5. Add stories the team is planning to work on for the next sprint – List in priority order
  6. Add stories the team is planning to work on for the next sprint – List in priority order
  7. Add stories the team is planning to work on for the next sprint – List in priority order
  8. Add stories the team is planning to work on for the next sprint – List in priority order
  9. Add stories the team is planning to work on for the next sprint – List in priority order
  10. Add stories the team is planning to work on for the next sprint – List in priority order