How to copy a table containing a few million rows effciently?
From: Karan (Karan_at_discussions.microsoft.com)
Date: 03/01/05
- Next message: Kalen Delaney: "Re: SQL Server 7 Permissions!"
- Previous message: Rick: "SQL Collation Error"
- Next in thread: Alex Papadimoulis: "RE: How to copy a table containing a few million rows effciently?"
- Reply: Alex Papadimoulis: "RE: How to copy a table containing a few million rows effciently?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Mar 2005 10:33:03 -0800
I have a table in SQL Server 2000 which contains about 5 millions rows and
keeps growing at the rate of 500,000 rows per month. This is a live
production table into which data is inserted/updated contantly. This table
contains a few indexes and keys. The activity on this table is extremely high
during the last few days of the month.
We use this table also to calculate a lot of reporting data currently. This
reporting job sometimes takes more than 20 hours to run especially during the
month end. We run this job about once a week. While this job is running there
are a lot of Timeouts and deadlocks since this table is being constantly
updated. Sometimes we have to even abort this job manually just to aviod
interruption to the regular processing. I am planning on copying this data (a
portion of the data) to a new table and run my reporting data queries on that
table. What is the best way to copy this data into a new table. It has to be
efficient and not affect the actual table much since it is being used
constantly. The Reporting queries may include data that are being currently
inserted as well.
We have a plan to replicate the entire database and use the replicated
database for the purpose of reporting. Until then, we need a temporary
solution to fix this problem.
Please advice.
Karan
- Next message: Kalen Delaney: "Re: SQL Server 7 Permissions!"
- Previous message: Rick: "SQL Collation Error"
- Next in thread: Alex Papadimoulis: "RE: How to copy a table containing a few million rows effciently?"
- Reply: Alex Papadimoulis: "RE: How to copy a table containing a few million rows effciently?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|