- Local time
- Today, 23:59
- Joined
- Feb 19, 2013
- Messages
- 17,361
Without a full description of the story behind the action you are undertaking it is not possible to provide more that general suggestions. So explain how the 3m records are created, what they actually contain, why they are transferred to SQL server and what SQL server does with it once received.here we need to update customer details like [Current Outstanding & Ageing] on daily basis.
I think we are still all confused about the purpose of 3m records - I can understand if you are a financial, utilities or telecoms type entity you will have these sort of numbers on a customer base, but aging (I presume you mean age of debt) is a calculation so should not be a stored value. And it sounds like you are transferring all records and not just those that have changed since yesterday/last upload. And Current Outstanding would be a number (currency), yet you say 'There are no validation on text' which implies your fields are text, not numeric.
you ask
The answer is, it depends. As a straight movement of 3m records, Append is probably quicker because although there is the overhead of updating the index, you have the update overhead of identifying which records have changed by comparing the two tables - only real test would be to try it and see. But if you have say a timestamp field in your access table to indicate when last changed, an update query which updates to 50,000 records which have changed since last updated will be faster because you don't have that comparison to make.which method is best for 3 Million Record (1) Append Query (2) Update Query.
Also, what happens to the 3m records in Access (and SQL server for that matter) whilst the upload is going on? Are users still adding/changing records?
So have you considered using a make table query on SQL Server?Here i just run all query's on ms access table and final result will append to a separate sql table.
...
Here i'm trying to Alter Server Table (Delete Primary Key before appending records And Adding Primary Key post records appended) programmatically but no luck.
...