Link Search Menu Expand Document

The Open Distro project is archived. Open Distro development has moved to OpenSearch. The Open Distro plugins will continue to work with legacy versions of Elasticsearch OSS, but we recommend upgrading to OpenSearch to take advantage of the latest features and improvements.


The SQL plugin adds a few settings to the standard Elasticsearch cluster settings. Most are dynamic, so you can change the default behavior of the plugin without restarting your cluster.

You can update these settings like any other cluster setting:

PUT _cluster/settings
  "transient" : {
    "opendistro.sql.enabled" : false
Setting Default Description
opendistro.sql.enabled True Change to false to disable the plugin.
opendistro.sql.query.slowlog 2 seconds Configure the time limit (in seconds) for slow queries. The plugin logs slow queries as Slow query: elapsed=xxx (ms) in elasticsearch.log.
opendistro.sql.query.analysis.enabled True Enables or disables the query analyzer. Changing this setting to false lets you bypass strict syntactic and semantic analysis.
opendistro.sql.query.analysis.semantic.suggestion False If enabled, the query analyzer suggests correct field names for quick fixes.
opendistro.sql.query.analysis.semantic.threshold 200 Because query analysis needs to build semantic context in memory, indices with a large number of fields are be skipped. You can update this setting to apply analysis to smaller or larger indices as needed.
opendistro.sql.query.response.format JDBC Sets the default response format for queries. The supported formats are JDBC, JSON, CSV, raw, and table.
opendistro.sql.cursor.enabled False You can enable or disable pagination for all queries that are supported.
opendistro.sql.cursor.fetch_size 1,000 You can set the default fetch_size for all queries that are supported by pagination. An explicit fetch_size passed in request overrides this value.
opendistro.sql.cursor.keep_alive 1 minute This value configures how long the cursor context is kept open. Cursor contexts are resource heavy, so we recommend a low value. True Enables or disables the new query engine. This setting must be true in order to use date and time functions.
opendistro.query.size_limit 200 Defines the default index size. Cannot be greater than the maximum result window value (10000 by default).