I am trying to create an external table for a table on ClickHouse using ODBC connection.
Let's assume the external table code looks like this:
CREATE EXTERNAL TABLE [dbo].[externalTable1]
(
[col1] [int] NULL,
[col2] [int] NULL,
[col3] [datetime] NULL,
...
)
WITH (DATA_SOURCE = [testODBC],LOCATION = N'test.table1')
If I check the query log on destination (Clickhouse) I can see that (on both table creation and querying) SQL Server is sending queries such as:
Select col1 from test.table1
Select col2 from test.table1
Select col3 from test.table1
which seems like to be statistics queries. Considering the record count (tens of billions) these queries cause serious problems on destination server. I couldn't find a way to disable these auto stat queries. My first guess was SQL is using them to decide the PUSHDOWN, so I tried external resource with PUSHDOWN disabled, the queries were still there (even if it worked it wouldn't be possible for us to use external table without the push down, but just wanted to check it)
Any ideas about it?