Apache Phoenix Performance Result :: Thu Mar 06 10:52:07 PST 2014

Queries by Category


Index

select count(*) from INDEXED_TABLE_MUTABLE
1.46s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE midx1 midx2 midx3 midx4) */ count(*) from INDEXED_TABLE_MUTABLE
1.45s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE mids1 mids2 mids3 mids4) */ count(*) from INDEXED_TABLE_MUTABLE
0.55s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(*) from INDEXED_TABLE_MUTABLE
0.74s PHOENIX-SNAPSHOT

select round(date, 'day',50), sum(core)+2 from INDEXED_TABLE_MUTABLE where (CORE<10 or CORE>90) group by round(date, 'day',50), host
0.34s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ round(date, 'day',50), sum(core)+2 from INDEXED_TABLE_MUTABLE where (CORE<10 or CORE>90) group by round(date, 'day',50), host
1.29s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core IN (1,100)
0.14s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE midx1 midx2 midx3 midx4) */ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,100)
0.05s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE mids1 mids2 mids3 mids4) */ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,100)
0.14s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,100)
1.08s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core IN (1,25,50,75,100)
0.15s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE midx1 midx2 midx3 midx4) */ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,25,50,75,100)
0.08s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE mids1 mids2 mids3 mids4) */ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,25,50,75,100)
0.14s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,25,50,75,100)
1.07s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core < 10 and db < 200
0.38s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE midx1 midx2 midx3 midx4) */ count(core) from INDEXED_TABLE_MUTABLE where core < 10 and db < 200
0.4s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE mids1 mids2 mids3 mids4) */ count(core) from INDEXED_TABLE_MUTABLE where core < 10 and db < 200
0.36s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core < 10 and db < 200
1.25s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core < 100 and db < 2000
0.83s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core < 100 and db < 2000
1.38s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core > 90
0.17s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core > 90
1.09s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core > 0
0.49s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core > 0
1.1s PHOENIX-SNAPSHOT

select db from INDEXED_TABLE_MUTABLE where db >5 and db <7 order by db
0.18s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ db from INDEXED_TABLE_MUTABLE where db >5 and db <7 order by db
1.96s PHOENIX-SNAPSHOT

select db from INDEXED_TABLE_MUTABLE order by db limit 10
1.17s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ db from INDEXED_TABLE_MUTABLE order by db limit 10
1.49s PHOENIX-SNAPSHOT


Index Creation After Data

CREATE INDEX midx5 ON INDEXED_TABLE_MUTABLE (CORE) INCLUDE (DB,ACTIVE_VISITOR)
35.81s PHOENIX-SNAPSHOT


Load Data

LOAD DATA INDEXED_TABLE_MUTABLE [2000000 ROWS]
633.94s PHOENIX-SNAPSHOT




Queries by Table



INDEXED_TABLE_MUTABLE


Indexing test. Phoenix 2.0+ feature. See explain plan by hovering over version label to see which index table is used.

ROWS 2000000 [2M]

DDL CREATE TABLE $TABLE (HOST CHAR(2) NOT NULL,DOMAIN VARCHAR NOT NULL,FEATURE VARCHAR NOT NULL,DATE DATE NOT NULL,USAGE.CORE BIGINT,USAGE.DB BIGINT,STATS.ACTIVE_VISITOR INTEGER CONSTRAINT PK PRIMARY KEY (HOST, DOMAIN, FEATURE, DATE)) MAX_FILESIZE=30485760;CREATE INDEX midx1 ON $TABLE (CORE);CREATE INDEX midx2 ON $TABLE (DB);CREATE INDEX midx3 ON $TABLE (DB,ACTIVE_VISITOR);CREATE INDEX midx4 ON $TABLE (CORE,DB,ACTIVE_VISITOR);CREATE INDEX mids1 ON $TABLE (CORE) SALT_BUCKETS=16;CREATE INDEX mids2 ON $TABLE (DB) SALT_BUCKETS=16;CREATE INDEX mids3 ON $TABLE (DB,ACTIVE_VISITOR) SALT_BUCKETS=16;CREATE INDEX mids4 ON $TABLE (CORE,DB,ACTIVE_VISITOR) SALT_BUCKETS=16;

DATA GENERATOR
STRING :: Values: NA|CS|EU
STRING :: Values: Salesforce.com|Apple.com|Google.com|Yelp.com
STRING :: Values: Login|Report|Dashboard|Sales|UI
DATE :: Values: SEQUENTIAL
INTEGER :: Max. Value: 100 Values: RANDOM
INTEGER :: Max. Value: 2000 Values: RANDOM
INTEGER :: Max. Value: 10000 Values: RANDOM

select count(*) from INDEXED_TABLE_MUTABLE
1.46s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE midx1 midx2 midx3 midx4) */ count(*) from INDEXED_TABLE_MUTABLE
1.45s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE mids1 mids2 mids3 mids4) */ count(*) from INDEXED_TABLE_MUTABLE
0.55s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(*) from INDEXED_TABLE_MUTABLE
0.74s PHOENIX-SNAPSHOT

select round(date, 'day',50), sum(core)+2 from INDEXED_TABLE_MUTABLE where (CORE<10 or CORE>90) group by round(date, 'day',50), host
0.34s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ round(date, 'day',50), sum(core)+2 from INDEXED_TABLE_MUTABLE where (CORE<10 or CORE>90) group by round(date, 'day',50), host
1.29s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core IN (1,100)
0.14s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE midx1 midx2 midx3 midx4) */ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,100)
0.05s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE mids1 mids2 mids3 mids4) */ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,100)
0.14s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,100)
1.08s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core IN (1,25,50,75,100)
0.15s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE midx1 midx2 midx3 midx4) */ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,25,50,75,100)
0.08s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE mids1 mids2 mids3 mids4) */ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,25,50,75,100)
0.14s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core IN (1,25,50,75,100)
1.07s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core < 10 and db < 200
0.38s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE midx1 midx2 midx3 midx4) */ count(core) from INDEXED_TABLE_MUTABLE where core < 10 and db < 200
0.4s PHOENIX-SNAPSHOT

select /*+ INDEX(INDEXED_TABLE_MUTABLE mids1 mids2 mids3 mids4) */ count(core) from INDEXED_TABLE_MUTABLE where core < 10 and db < 200
0.36s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core < 10 and db < 200
1.25s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core < 100 and db < 2000
0.83s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core < 100 and db < 2000
1.38s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core > 90
0.17s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core > 90
1.09s PHOENIX-SNAPSHOT

select count(core) from INDEXED_TABLE_MUTABLE where core > 0
0.49s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ count(core) from INDEXED_TABLE_MUTABLE where core > 0
1.1s PHOENIX-SNAPSHOT

select db from INDEXED_TABLE_MUTABLE where db >5 and db <7 order by db
0.18s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ db from INDEXED_TABLE_MUTABLE where db >5 and db <7 order by db
1.96s PHOENIX-SNAPSHOT

select db from INDEXED_TABLE_MUTABLE order by db limit 10
1.17s PHOENIX-SNAPSHOT

select /*+NO_INDEX*/ db from INDEXED_TABLE_MUTABLE order by db limit 10
1.49s PHOENIX-SNAPSHOT

CREATE INDEX midx5 ON INDEXED_TABLE_MUTABLE (CORE) INCLUDE (DB,ACTIVE_VISITOR)
35.81s PHOENIX-SNAPSHOT

LOAD DATA INDEXED_TABLE_MUTABLE [2000000 ROWS]
633.94s PHOENIX-SNAPSHOT



Note: Hover over version label to see Phoenix Query Explain Plan.