external_storage_connect_timeout_sec
Connect timeout in seconds. Now supported only for MySQLexternal_storage_max_read_bytes
Limit maximum number of bytes when table with external engine should flush history data. Now supported only for MySQL table engine, database engine, and dictionary. If equal to 0, this setting is disabledexternal_storage_max_read_rows
Limit maximum number of rows when table with external engine should flush history data. Now supported only for MySQL table engine, database engine, and dictionary. If equal to 0, this setting is disabledexternal_storage_push_down_limit
Allow to push the query’sLIMIT clause down into the query sent to an external database (such as MySQL, PostgreSQL or SQLite).
The push-down is not performed for the generic ODBC/JDBC bridges, because they do not expose the remote LIMIT syntax, and some of the supported databases do not accept a LIMIT clause at all.
The LIMIT is pushed down only when it is guaranteed to be safe, i.e. when every clause that logically applies before it is copied to the external query without changes. Precisely, the query must be a plain single-table SELECT:
- there is no
JOIN,ARRAY JOIN,SAMPLEorFINAL(otherwise rows could be dropped or transformed locally, so pre-limiting is unwanted); - the
WHEREclause, if any, is fully compatible and copied into the rewritten query unchanged (otherwise filtering after the remoteLIMITwould drop some rows); - there is no other clause or modifier (like
DISTINCT,GROUP BY,ORDER BY,LIMIT BY,WITH TIES, etc.) that may break the remote pre-limiting logic due to data reordering, aggregation or filtration; - an
OFFSETis allowed: it is applied locally, so the rows it skips have to be read as well, and the limit sent to the external database isoffset + length; - the
SELECTlist maps one source row to one result row, i.e. it contains no aggregate functions, window functions orarrayJoin(also spelledunnest) (they are evaluated locally over all the rows read from the external table); - there is no filter that is applied locally on top of the rows read from the external table, such as a row policy or
additional_table_filters(such a filter runs before theLIMIT, so pre-limiting remotely could discard rows that it would have kept).