You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/hdinsight/hbase/apache-hbase-phoenix-performance.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Best practices to optimize Apache Phoenix performance for Azure HDI
4
4
ms.service: hdinsight
5
5
ms.topic: how-to
6
6
ms.custom: hdinsightactive
7
-
ms.date: 12/26/2022
7
+
ms.date: 01/04/2024
8
8
---
9
9
10
10
# Apache Phoenix performance best practices
@@ -42,7 +42,7 @@ With this new primary key the row keys generated by Phoenix would be:
42
42
| Dole-John-111|1111 San Gabriel Dr.|1-425-000-0002| John|Dole| 111 |
43
43
| Raji-Calvin-222|5415 San Gabriel Dr.|1-230-555-0191| Calvin|Raji| 222 |
44
44
45
-
In the first row above, the data for the rowkey is represented as shown:
45
+
In the first row of given table, the data for the rowkey is represented as shown:
46
46
47
47
|rowkey| key| value|
48
48
|------|--------------------|---|
@@ -107,7 +107,7 @@ Secondary indexes can improve read performance by turning what would be a full t
107
107
108
108
Covered indexes are indexes that include data from the row in addition to the values that are indexed. After finding the desired index entry, there's no need to access the primary table.
109
109
110
-
For example, in the example contact table you could create a secondary index on just the socialSecurityNum column. This secondary index would speed up queries that filter by socialSecurityNum values, but retrieving other field values will require another read against the main table.
110
+
For example, in the example contact table you could create a secondary index on just the socialSecurityNum column. This secondary index would speed up queries that filter by socialSecurityNum values, but retrieving other field values require another read against the main table.
@@ -145,7 +145,7 @@ The main considerations in query design are:
145
145
146
146
### Understand the query plan
147
147
148
-
In [SQLLine](http://sqlline.sourceforge.net/), use EXPLAIN followed by your SQL query to view the plan of operations that Phoenix will perform. Check that the plan:
148
+
In [SQLLine](http://sqlline.sourceforge.net/), use EXPLAIN followed by your SQL query to view the plan of operations that Phoenix performs. Check that the plan:
149
149
150
150
* Uses your primary key when appropriate.
151
151
* Uses appropriate secondary indexes, rather than the data table.
@@ -155,13 +155,13 @@ In [SQLLine](http://sqlline.sourceforge.net/), use EXPLAIN followed by your SQL
155
155
156
156
As an example, say you have a table called FLIGHTS that stores flight delay information.
157
157
158
-
To select all the flights with an airlineid of `19805`, where airlineid is a field that isn't in the primary key or in any index:
158
+
To select all the flights with an `airlineid` of `19805`, where `airlineid` is a field that isn't in the primary key or in any index:
@@ -196,13 +196,13 @@ CLIENT 1-CHUNK PARALLEL 1-WAY ROUND ROBIN RANGE SCAN OVER FLIGHTS [2014,1,2,'AA'
196
196
197
197
The values in square brackets are the range of values for the primary keys. In this case, the range values are fixed with year 2014, month 1, and dayofmonth 2, but allow values for flightnum starting with 2 and on up (`*`). This query plan confirms that the primary key is being used as expected.
198
198
199
-
Next, create an index on the FLIGHTS table named `carrier2_idx` that is on the carrier field only. This index also includes flightdate, tailnum, origin, and flightnum as covered columns whose data is also stored in the index.
199
+
Next, create an index on the FLIGHTS table named `carrier2_idx` that is on the carrier field only. This index also includes `flightdate`, `tailnum`, `origin`, and `flightnum` as covered columns whose data is also stored in the index.
0 commit comments