Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
04-15-2018
12:02 PM
- edited on
07-24-2023
08:49 AM
by
VidyaSargur
In this article series, part 1 , part 2 , part 3, part 4 covered various Hbase tuning parameters, scenarios, system side of things etc, in last and part 5 of this series, I will discuss little bit about Phoenix performance parameters and general tips for tuning.
I am taking an example of a query which was performing very slow and how we investigated this situation. We will start by reading explain plan of this query. I cannot quote exact query (customer's data) here but it was a select query with some where clause and finally order by conditions. The explain plan of the query is as follows:
+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | CLIENT 5853-CHUNK 234762256 ROWS 1671023360974 BYTES PARALLEL 5853-WAY FULL SCAN OVER MESSAGE_LOGS.TEST_MESSAGE | | SERVER FILTER BY ((ROUTING IS NULL OR ROUTING = ‘TEST') AND TESTNAME = 'createTest' AND TESTID = ’TEST’ AND ERRORCODE | | SERVER TOP 20 ROWS SORTED BY [CREATEDTIMESTAMP DESC, TESTID] | | CLIENT MERGE SORT | +--------------------------------------------------------------------------------------------------------------------------------------------------------+ 4 rows selected (0.958 seconds)
Firstly, lets learn to dissect an explain plan of a Phoenix query, following are my observations looking at this plan:
First statement
Second Statement
Third Statement
Fourth Statement
What tuning was done to make query run faster ?
Tuning recommendations in general :
Reference:
http://phoenix.apache.org/explainplan.html
https://phoenix.apache.org/tuning.html
https://phoenix.apache.org/tuning_guide.html