简体   繁体   English

在 SQL Server 2000 中处理大表性能

[英]Dealing with large tables performance in SQL Server 2000

I have a table tbl_ECR_ProductData with nearly 92356143 rows.我有一个包含近 92356143 行的表tbl_ECR_ProductData Weekly 100000 rows are imported into this table.每周将 100000 行导入该表。

The table has 16 columns, 2 of those columns make up the primary key, the remaining columns are of type varchar .该表有 16 列,其中 2 列构成主键,其余列的类型为varchar

My question here is when I search the table based on the remaining column values.. its taking a long time, nearly 10 mins.我的问题是,当我根据剩余的列值搜索表格时……需要很长时间,将近 10 分钟。

How can I minimise the time?我怎样才能尽量减少时间? Please help me on this.. your help is appreciated... Thanks in advance!请帮我解决这个问题……感谢您的帮助……提前致谢! Table structure is as follows表结构如下

CREATE TABLE [tbl_ECR_ProductData]( [Serial Number] [varchar](255) NOT NULL, [Act Number] [varchar](255) NULL, [Act Date] [datetime] NULL, [Act Location] [varchar](255) NOT NULL, [Manufacturer] [varchar](255) NULL, [ManufacturerPN] [varchar](255) NULL, [Act Description] [varchar](255) NULL, [Act PtNumber] [varchar](255) NULL, [Act Code] [varchar](255) NULL, [Act DateCode] [varchar](255) NULL, [Pmrl] [varchar](255) NULL, [Act ReceiveDate] [datetime] NULL, [Act Channel] [varchar](255) NULL, [Act Supplier] [varchar](255) NULL, [ImportDate] [datetime] NULL
CONSTRAINT [PK_tbl_ECR_ProductData] PRIMARY KEY CLUSTERED ( [Serial Number] ASC, [Act Location] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY] )

It is difficult to say how to minimise the time without seeing the code.不看代码很难说怎么把时间减到最少。 However,these below links should help you find out where the problem is and probaly fix them.然而,这些下面的链接应该可以帮助您找出问题所在并可能修复它们。 I find these very helpful.我发现这些非常有帮助。

http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/ http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/

http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-2/ http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-2/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM