INSERT减慢sql server中包含大数据的表的速度 [英] INSERT Slows down for table with Large data in sql server

查看:253
本文介绍了INSERT减慢sql server中包含大数据的表的速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表包含大量数据(数百万条记录)简单的insert语句需要花时间执行。提高插入速度。我在该表上创建的索引仍然很慢。



INSERT在sql server中使用大数据减慢表格



谢谢,

-RG

I have one table contains huge data(millions of records) simple insert statement taking time in execution.HOw to improve the speed of insertion.i have created index on that table still slow.

INSERT Slows down for table with Large data in sql server

Thanks,
-RG

推荐答案

1。最好避免在INSERT时提高性能的索引。

2.确认现有表中列的数据类型,INSERT语句中的新值完全匹配。插入不同的数据格式需要时间。

3.希望表中有一个主键。创建/创建一个coulumn作为主键

4.禁用触发器(如果有)

5.如果可能,尝试BULK INSERT而不是添加单行。
1. Better to avoid index for improving the performance when INSERT.
2. Confirm the datatype of columns from existing table and new values in the INSERT statment are EXACTLY matching. Inserting different dataformats will take time.
3. Hope the table has a Primary key. Make/create a coulumn as Primary Key
4. Disable triggers if any
5. If possible, try BULK INSERT rather than adding single row.


这篇关于INSERT减慢sql server中包含大数据的表的速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆