Hbase Phoenix query performance with 100 million rows

After previuos blog about more than ten handle thousands read/write request with Hbase Phoenix, today i will show some simple query performance result with 100M records.

Create Index

CREATE INDEX IF NOT EXISTS idx__test__int_1 ON test(int_1);

Count

0: jdbc:phoenix:localhost,bd2,bd37:2181> select count(*) from test;
+------------+
|  COUNT(1)  |
+------------+
| 112072822  |
+------------+
1 row selected (135.8 seconds)

Count with index

0: jdbc:phoenix:localhost,bd2,bd37:2181> select count(int_1) from test where int_1 > 500;
+--------------+
| COUNT(INT_1) |
+--------------+
| 55919865     |
+--------------+
1 row selected (139.147 seconds)

0: jdbc:phoenix:localhost,bd2,bd37:2181> select count(int_1) from test where int_1 > 10;
+--------------+
| COUNT(INT_1) |
+--------------+
| 110838425    |
+--------------+
1 row selected (88.276 seconds)

Group by 

0: jdbc:phoenix:localhost,bd2,bd37:2181> select count(*), int_1 from test where int_1 > 995 group by int_1;
+------------+------------+
|  COUNT(1)  |   INT_1    |
+------------+------------+
| 112018     | 996        |
| 111647     | 997        |
| 112242     | 998        |
| 112461     | 999        |
+------------+------------+
4 rows selected (53.37 seconds)

0: jdbc:phoenix:localhost,bd2,bd37:2181> select count(*), int_1 from test where int_1 > 500 group by int_1;
[a lot of result]
499 rows selected (62.13 seconds)

Try it now, good luck!

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. hi, have you test sql queries include join on Phoenix? Maybe it is not so good on join, i am also testing Phoenix these days.

    ReplyDelete

Post a Comment