0

I want to understand the query execution plan for Phoenix. I am executing below command to get query execution plan.

Command: -

explain select "col1","col2", count(*) as "Count" from "tab_name" group by "col1","col2";

Explain Plan: -

+----------------------------------------------------------------------------------------------------------+
|                   PLAN                                                                                                     |
+----------------------------------------------------------------------------------------------------------+
|CLIENT 85-CHUNK PARALLEL 85-WAY FULL SCAN OVER tab_name                                                                                                                  |
|     SERVER AGGREGATE INTO DISTINCT ROWS BY [d."col1", d."col2"]  |
| CLIENT MERGE SORT                                                                                          |
+----------------------------------------------------------------------------------------------------------+

Can any one help me to understand the Phoenix query execution plan.

Thanks in adv.

Community
  • 1
  • 1
Vijay_Shinde
  • 1,332
  • 2
  • 17
  • 38

1 Answers1

0

You're doing a full scan (reading every row) with 85 individual processes. On the server side (each node), there's going to be an aggregation (distinct) run on the rows you've selected col1, col2

Then the phoenix client will take those results, apply a merge sort to get the output

Eric Yang
  • 2,678
  • 1
  • 12
  • 18