|
-
I didn't mean for it to sound like a rant. I feel like I walked into one of those seemingly easy questions to answer and was met with one of those "oh, by the way, this has to work for a million records, you must be kidding about your answer" replies. For his million records, as it turns out, there could be anywhere from one million to two million SQL queries (you test for inserts first and the temp records are all new = one million, but if they are all updates, you're doing two queries, so there are some design issues to consider). Using a PK, the inserts are easy. The updates could be more complex because of what the update condition is, i.e., what's being tested, but why bother testing? If the PK is in the temp table, then do a blanket update of that record in the master table. Either way, SQL or other language, there are a lot queries. Do you want to do them one at a time or group them (cursor)? I agree that for a large number of records that cursors are probably not the best approach
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|