Snowflake 到 SQL Server 数据加载性能

发布于 2025-01-15 15:45:14 字数 376 浏览 5 评论 0原文

我正在尝试提高用于将数据从雪花视图移动到 SQL Server 表的 SQL 查询的性能。查询使用使用 ODBC 驱动程序创建的链接服务器,使用 OPENQUERY 语句从 SQL Server 连接到 Snowflake 视图。目前,5000 万行数据的移动大约需要 2 小时。请建议是否可以采取任何措施来提高性能。

我们正在使用的示例查询:

SELECT * 
INTO #temp
FROM OPENQUERY (SnowflakeServer, 'select * from "SnowflakeDB"."SnowflakeSchema"."mytable"') 

I am trying to improve performance of a SQL query used to move data from snowflake view to SQL Server table. Query uses linked server created using a ODBC driver to connect to Snowflake view from SQL Server using an OPENQUERY statement. Currently 50 million rows take around 2 hours to move the data. Please suggest if there is anything that can be done to improve performance.

Sample query we are using:

SELECT * 
INTO #temp
FROM OPENQUERY (SnowflakeServer, 'select * from "SnowflakeDB"."SnowflakeSchema"."mytable"') 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泪痕残 2025-01-22 15:45:14

所以这并不是基于任何具体的东西,但可能有一些想法。

  1. 导入到具有列存储索引的
  2. 表-ver15" rel="nofollow noreferrer">使用 PolyBase 查询
  3. 将查询导出到 CSV 并使用 批量插入

So this is not based on anything concrete, but a few ideas could be.

  1. Importing to a table with an columnstore index
  2. Doing the query using PolyBase
  3. Exporting your query to CSV and loading using BULK INSERT
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文