Hi all -
I'm running into some issues with the MERGE command. Pretty much I take data from some table in 2 databases and then merge the data into one of those databases. What I'm running into though. is that the tempdb file grows 10 times as much as the target database
Does MERGE operate on the tempdb? I have a handful of these queries that I need to run. I've ran them simultaneously and one at a time (up until the point where they fill up my temp drives and then I try something else).
The structure seems strange...but there is a purpose and is how we need it. Car, State and Operator are in the Processed database (source). tblSource, tblOperatorVersion and tblCarVersion are in the Header database (target). Basic info is in the Processed
database. The purpose of the target database is practically to hold the same data. There are multiple source databases that I'm merging into the target. Each have their own structure. The target provides a source where everything can be in one schema and hold
the same information. Ok so that's that.
Processed.dbo.Car has ~5million rows
Processed.dbo.State has 50 rows
Processed.dbo.Operator has ~900k rows
Header.dbo.tblSource has 200 rows
Header.dbo.tblOperatorVersion has ~900k rows
Header.dbo.tblCarVersion has ~5million rows
Header.dbo.tblCarOperator has 0 (this is what I'm trying to merge into. I nuked out all of the other rows i
View Complete Post