Overview
You can include a kvpair clause in a query statement to customize various applications. The kvpair clause specifies key-value pairs.
Syntax
kvpair={key}:{value};{key}:{value};....Example
query=SELECT brand, COUNT(*) FROM phone &&kvpair=trace:INFO;formatType:full_jsonParameters supported in a kvpair clause
Parameter | Valid value | Default value | Description |
trace | DISABLE, FATAL, ERROR, WARN, INFO, DEBUG, TRACE1, TRACE2, TRACE3, SCHEDULE, NOTSET | DISABLE | The query process information that is generated in the frontend. |
formatType/format | string, json, full_json, flatbuffers | string | The format of returned results. For more information, see Interpret query results. 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 | The default value is determined based on the configuration of the SQL statement. | 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 plan. |
forbitMergeSearchInfo | true, false | false | Specifies whether Query Result Searcher (QRS) merges search information that is returned by column searches. If you want to query the details of each column, set this parameter to true. |
resultReadable | true, false | false | Specifies whether to add some line breaks to the returned results in JSON format to increase readability if the format parameter is set to json or full_json. |
parallel ( Applicable to OpenSearch Vector Search Edition of versions earlier than V3.8.0 ) | 1-16 | 1 | Enables parallel optimization on the Searcher. If the version of OpenSearch Vector Search Edition is 3.8.0 or later, use the new implementation. For more information, see Details. Note: The new implementation and the old implementation are incompatible. Do not use them together. |
parallelTables ( Applicable to OpenSearch Vector Search Edition of versions earlier than V3.8.0 ) | Separates multiple tables with vertical bars (|). This parameter is used together with the parallel parameter. The parallelTables parameter specifies the tables that support splitting and parallel and is used in joins. | ||
databaseName | Specifies the default database name that is used by QRS to access the corresponding Searcher. 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 results. For example, the RPC timeout column can be missing in the results. |
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 an ORDER BY clause. |
iquan.optimizer.force.limit.num | ulimit | 100 | If you set the iquan.optimizer.force.limit.enable parameter to true, iquan uses the value of the iquan.optimizer.force.limit.num parameter as the value of the LIMIT clause. |
iquan.optimizer.join.condition.check | true, false | true | Specifies whether the fields that need to be joined 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.optimize jni.post.optimize | jni.post.optimize | Used together with the iquan.plan.cache.enable or dynamic_params parameter. We recommend that you use jni.post.optimize. If you set the iquan.plan.cache.enable parameter to true, iquan stores the results of the specified phase in the cache. If you specify the dynamic_params parameter, iquan dynamically replaces parameters in the results of the specified phase. rel.post.optimize: returns the optimized results in Java code. jni.post.optimize: returns the results in CPP code after the Java Native Interface (JNI) is called. |
iquan.plan.cache.enable | true / false | false | Specifies whether to store the current results in the cache. |
exec.source.id | "" | A specific row that is accessed by the query statement. This parameter is useful when multiple exchanges exist. The values of this parameter are generated in chronological order by default. | |
exec.source.spec | "" | The source of the business party. Enter the source in the specified format. Scenarios recommended in The Personalization Platform (TPP): tpp-appid-abid-solutionid-ip Other scenarios: Product name-System name-IP | |
dynamic_params | Two-dimensional array | None | |
urlencode_data | true, false | false | If the value of the dynamic_params parameter is URL encoded, set this parameter to true. |
Usage notes
If the name of a configuration item is the same as a parameter name in a kvpair clause, the parameter in the kvpair clause takes precedence.
Separate multiple key-value pairs with semicolons (;). Do not specify spaces before or after the semicolons (;).