在 SQL 外部 table 中花时间 select 并将数据插入临时 table

In SQL External table take a time for select and insert data into temp table

我正在使用主数据库的外部 table 到 Datawarehouse 数据库。从外部 table 到 # table 选择数据需要将近 9 分钟,有时需要更多时间。如何提高外部 table?

的性能

就是使用下面的TSQL在外部数据库中进行查询,只获取需要的数据。过滤器首先应用在外部数据库中,然后数据库接收来自过滤器的数据。

When you enable the query's Actual Execution Plan option, you can see that the query : Select * from PerformanceVarcharNVarchar, brings data from an external database to the temporal database, and then the engine applies the filter.

这是微软官方文档:EXECUTE (Transact-SQL) | Docs

否则您可以使用 Azure Data Sync : SQL Data Sync 是一项基于 Azure SQL 数据库的服务,允许您在多个数据库之间双向同步所选数据,这两个数据库都在本地在云端。

The Original Post has got detailed insights: Lesson Learned #56: External tables and performance issues | techcommunity