[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Managing Updates on Large amounts of Data in SQL 2005

Asked by jazzer102 in SQL Server 2005, SSIS, MS SQL DTS

Tags: Large amounts of Data, SQL 2005

Hi There,

I have a product table with about 1.5mil records and a stock table with a similar amount of data. I have set up a view that (inner) joins the stock onto the product data and performs a few more calcuations on the data. There are then indexes (normal and full text with change tracking) set up  on the view for searching on the front end. (none of the indexes on the view directly reference the data from the stock table, however a product has to have a stock record in order to be included)

This is working well from a front end perspective.

My situation is that I need to completely refresh the stock data twice a day (which comes in CSV format). I am looking for a seamless and effecient route to do this without causing any downtime on the front end, as well as being fast / effeicent..

I have a couple of ideas:

1. Set up a SSIS package to: Delete existing data and Import new data direct into the stock table.
This works, and runs in under 5 mins, however I am concerned about the amount of knock on this will have in terms of recalculating the view / indexes etc. Presumably there will also be "down time" while everthing completes.

2. Set up a tempoary table for the stock data and import as above, then update the main stock table from the temp table using and update statement. This will update all records that appear in both tables. As there will be addtions and omissions, presumably I could then run insert and delete statements for the differences between the tables.
I have not tried this, so am unsure of the performance, however I think that there will not be any knock on to the indexes where it is not nessecary, and therefore avoid any recalcuation here, and also avoid downtime while tables are emptied and re-created?

I would appreciate your thoughts on this, and any other ideas on how this could be achieved.

Thanks
[+][-]10/31/09 05:18 AM, ID: 25709410Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/31/09 06:18 AM, ID: 25709641Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/31/09 06:56 AM, ID: 25709794Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/02/09 02:36 AM, ID: 25718305Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/02/09 08:10 AM, ID: 25720654Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/02/09 09:27 AM, ID: 25721419Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/02/09 10:08 AM, ID: 25721850Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625