Archives of the TeradataForum
Message Posted: Fri, 12 Dec 2003 @ 20:08:27 GMT
| Subj: || || Re: Concurrent Loads/Deletes for Staging Table |
| From: || || Victor Sokovin |
| ||We're trying to avoid having to create a separate table for each country because of the overhead/maintenance involved. We are
separated where the MLOAD process is concerned for the initial staging of the data and would prefer not to maintain the split further than
OK. So, you are happy with the staging table and your concern is only about the master table, right?
| ||I'm not sure I'm understanding your second paragraph, so bear with me. The MASTER table has the Primary Index of Customer and
Material, but it does contain the Country_Cd and Month fields that we delete by as well. I'd just like to find a way to facilitate a true
row-level locking mechanism so that I can have 3 or 4 countries deleting their own rows from that MASTER table since there is never an
overlap from one country to the next.|| |
From your original posting I understood that you store only one month at a time in the master table. If there are multiple months my
suggestion to restructure the PI should include the month column as well.
| ||Are you saying that a delete via a join would provide something along the lines of a row level lock (thus your suggestion for
the temporary table)?|| |
No, the join is not likely to change that. You still have to access the data in the master table in the same way as before, i.e., full
table scan or SI (if you have one). It would be good to understand what causes the table lock. May I ask how you do your deletes exactly?
You do not use MLOAD, right? Do you have SIs on the master table?
| ||Or are you saying that adding the Country_Cd and Month to the PI on the Master table might cause Teradata to opt against the
table lock?|| |
That would be my bet. We should be able to do concurrent transactions, shouldn't we? The PI way should be the easiest for TD.