I'm on SQL Server 2000 and I'm about to update two columns on a large (tall and wide) table in my DW. The tables look like this.
DW_INVOICE(TRANS_ID,INVOICE_DATE,AMOUNT,etc)
100 milj rows, 15 GB data
DW_INVOICE_CARD(TRANS_ID,DISCOUNT_PERC,DISCOUNT_AMOUNT,etc)
97 milj rows, 23 GB data
The relationship is 1 to 1 on TRANS_ID. I need to update 28 milj rows of DW_INVOICE_CARD with the information from DW_INVOICE and some other tiny tables.
I've tried to update a small (7 milj rows) subset of the tables but ran into all kinds of IO Latch-wait-disc and what-not-problems. (Not sure what happened there).
I need help on some other techniques to perform this update, or any large update. The design of the tables and the hardware setup are both rather crappy but I still need to do the update. Oh, did I mention that they're not partitioned either?
I know that "SELECT * INTO NewTable .." doesn't affect the Transaction Log, for instance. Can I create many small tables that are subsets of the large one and then with some excellent technique create a new version of the large one? E.g.:
SELECT *
INTO New_DW_INVOICE_CARD
FROM
(Select a,b,c,.. from subset1)
union all
(Select a,b,c,.. from subset2)
union all
...
I'd be very greatful for any expert help
DW_INVOICE(TRANS_ID,INVOICE_DATE,AMOUNT,etc)
100 milj rows, 15 GB data
DW_INVOICE_CARD(TRANS_ID,DISCOUNT_PERC,DISCOUNT_AMOUNT,etc)
97 milj rows, 23 GB data
The relationship is 1 to 1 on TRANS_ID. I need to update 28 milj rows of DW_INVOICE_CARD with the information from DW_INVOICE and some other tiny tables.
I've tried to update a small (7 milj rows) subset of the tables but ran into all kinds of IO Latch-wait-disc and what-not-problems. (Not sure what happened there).
I need help on some other techniques to perform this update, or any large update. The design of the tables and the hardware setup are both rather crappy but I still need to do the update. Oh, did I mention that they're not partitioned either?
I know that "SELECT * INTO NewTable .." doesn't affect the Transaction Log, for instance. Can I create many small tables that are subsets of the large one and then with some excellent technique create a new version of the large one? E.g.:
SELECT *
INTO New_DW_INVOICE_CARD
FROM
(Select a,b,c,.. from subset1)
union all
(Select a,b,c,.. from subset2)
union all
...
I'd be very greatful for any expert help