Dictionary Code Hint
Function
Specifies a column to create a dictionary code and compares the encoded strings as numbers, which speeds up the query operations such as Group By and Filter. This hint is supported only by clusters of version 8.3.0 or later.
Precautions
- Currently, only the new version hstore tables are supported (the table-level parameter enable_hstore_opt is set to on).
Syntax
/* + ( no ) dict(table (column)) */
Parameter description
Example
1
|
SELECT /*+ dict (bitmaptbl_high (server_ip)) */ distinct(server_ip) FROM bitmaptbl_high WHERE scope_name='saetataetaeta' ORDER BY server_ip; |
The generated plan is as follows. server_ip uses the dictionary encoding:
You can use no dict to disable server_ip from using dictionary encoding.
1
|
SELECT /*+ no dict (bitmaptbl_high (server_ip)) */ distinct(server_ip) FROM bitmaptbl_high WHERE scope_name='saetataetaeta' ORDER BY server_ip; |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot