-
Notifications
You must be signed in to change notification settings - Fork 302
kvpair clauses en
yuyang edited this page Dec 16, 2022
·
2 revisions
You can include a kvpair clause in a query statement to meet your business requirements. The kvpair clause specifies key-value pairs.
kvpair={key}:{value};{key}:{value};....
query=SELECT brand, COUNT(*) FROM phone &&kvpair=trace:INFO;formatType:full_json
Parameter | Valid value | Default value | Parameter description |
---|---|---|---|
trace | DISABLE, FATAL,ERROR,WARN,INFO,DEBUG, TRACE1, TRACE2, TRACE3, SCHEDULE, NOTSET | DISABLE | The query process information that is displayed in the frontend. |
formatType/format | string, json, full_json, and flatbuffers | string | The data type of the returned result. We recommend that you use full_json if your query is in the JSON format and use flatbuffers if you want to accelerate the query. |
timeout | ulimit | Determined by the SQL configuration. | The timeout period for a query. Unit: milliseconds. |
searchInfo | true, false | false | Specifies whether to return search information. |
sqlPlan | true, false | false | Specifies whether to return information about the SQL execution plan. |
forbitMergeSearchInfo | true, false | false | Specifies that the Query Result Searcher (QRS) does not merge search information that is returned by column searches. If you want to query the details of each column, set this parameter. |
resultReadable | true, false | false | Adds some line breaks to the returned results in JSON format to improve readability if the format parameter is set to json or full_json. |
parallel (Applicable to Havenask of versions earlier than V3.8.0) | 1-16 | 1 | Enables parallel optimization on the Searcher. For Havenask V3.8.3 or later, use the new implementation method. Note: The new and old implementation methods are incompatible. Therefore, you cannot use the methods at the same time. |
parallelTables (Applicable to Havenask earlier than 3.8.0) | Specifies the tables that support parallel splitting. This parameter is used in JOIN operations. Multiple tables are separated by '|' and this parameter is used together with the parallel parameter. | ||
databaseName | Specifies the default database name that is used by the QRS to access the corresponding Searcher. The QRS can also access multiple Searchers at the same time if you specify the database name before the table name in the dbName.tableName format in the query statement. | ||
lackResultEnable | true, false | false | Specifies whether to allow missing columns in the result. For example, the RPC timeout column can be missing in the result. |
iquan.optimizer.debug.enable | true/false | false | Specifies whether to enable debugging in the optimization phase. |
iquan.optimizer.sort.limit.use.together | true/false | true | Specifies whether to forcibly specify a LIMIT clause after the ORDER BY clause if the ORDER BY clause is used. |
iquan.optimizer.force.limit.num | ulimit | 100 | Specifies the value that iquan uses as the value of the LIMIT clause if you set the iquan.optimizer.force.limit.enable parameter to true. |
iquan.optimizer.join.condition.check | true/false | true | Specifies whether the fields that you want to join must be hash fields. |
iquan.optimizer.force.hash.join | true/false | false | Specifies whether to forcibly convert all join nodes to hash join nodes. |
iquan.plan.format.type | json | json | Specifies the format of the execution plan that is generated by iquan. Currently, only JSON is supported. |
iquan.plan.prepare.level | rel.post.optimizejni.post.optimize | jni.post.optimize | Used together with the iquan.plan.cache.enable and dynamic_params parameters. We recommend that you use jni.post.optimize. |
iquan.plan.cache.enable | true / false | false | Specifies whether to store the current results in the cache. |
exec.source.id | "" | Specifies a row that is accessed by the query statement. This parameter can be used when multiple exchanges exist. The values of this parameter are generated in chronological order by default. | |
exec.source.spec | "" | Specifies the source of the service in the specified format. Scenarios of recommendations from the Personalization Platform (TPP): tpp-appid-abid-solutionid-ip. Other scenarios: Product name-System name-IP address. | |
dynamic_params | Two-dimensional array | None | Reference |
urlencode_data | true / false | false | If the value of the dynamic_params parameter is URL encoded, set this parameter to true. |
-
If a parameter is specified in the kvpair clause and the query statement, the settings of the parameter in the kvpair clause take precedence.
-
Separate multiple key-value pairs with semicolons (;). Do not specify spaces before semicolons (;) or after semicolons (;).