473,383 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

SQL Operation Performance Advice

Hello,

Here is the my situation: I have a table "products" of about 10,000 records in System 1. How I have to update this table intermittently, from a different System 2, which contains exactly same table and more correct data.

Approach 1: Delete all the records from table "products" in System 1 and load it from System 2 afresh.

Approach 2: Check against all the records existing in System2 for every record we have in System1; if exists update it or insert it.

Please advice.

Thanks
May 7 '08 #1
3 1086
Delerna
1,134 Expert 1GB
There maybe another alternative.
If there is a date of entry field in the table. ie, the date the record is added to the table.
You could save the max(date) each time you transfer records.
that way you could just select all records greater than that date and transfer just those. Then you save the max(date) again.

or

you could do the same thing if there is a sequential ID field.


If not, I would opt for Delete contents and transfer all records. 10,000 records is really not that many records. If you did it with DTS then it would be pretty much set and forget, except for checking for failures of course. Even that can be arranged so that an email gets sent to someone in case of failure
May 7 '08 #2
Delerna
1,134 Expert 1GB
i just noticed

if exists update it or insert it.

I would go for a complete delete and transfer running with DTS afterhours.
The development overheads of the second option isn't worth trying reduce the amount of time it would take to transfer 10,000 records
But that just my opinion.
Having said that, lots of little savings can add up to 1 big saving, so it also depends on your situation.

Actually, were assuming the second option will be quicker, which im not entireley convinced it would be.
May 7 '08 #3
ck9663
2,878 Expert 2GB
Hello,

Here is the my situation: I have a table "products" of about 10,000 records in System 1. How I have to update this table intermittently, from a different System 2, which contains exactly same table and more correct data.

Approach 1: Delete all the records from table "products" in System 1 and load it from System 2 afresh.

Approach 2: Check against all the records existing in System2 for every record we have in System1; if exists update it or insert it.

Please advice.

Thanks

Approach 1: Watch out for relationship among the tables. If you use delete and you have an IDENTITY column, you might need to reset it.

Approach 2: Will take more processing time.Watch out for table relationship when updating.You might want to check if everything is updated.

Approach 3: Replication. One word: COMPLICATED ;)

-- CK
May 7 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Andy Dingley | last post by:
I've just started on a new project and inherited a huge pile of XSLT (and I use the term "pile" advisedly !) It runs at glacial speed, and I need to fix this this. Platform is MSXML 4 / ASP ...
3
by: Anders Both | last post by:
My client-server system, is begining (when more client are connected) sometimes to throw an exception like this: Collection was modified; enumeration operation may not execute. foreach...
0
by: relaxedrob | last post by:
Hi All, I have a portType such as this: <portType name="CMLeJobSoapGetEmpBrand"> <operation name="EJobGetEmpBrand"> <input message="tns:EJobEmpBrdReq" name="EJobEmpBrdReq"/> <output...
10
by: Jim Underwood | last post by:
I am having a problem with my web page timng out while retrieving a long runnign report (90-120 seconds. I have tried modifying several settings in various places and cannot get it to run for more...
5
by: mjan | last post by:
Hello, could you please advice on how to measure replication performance in Oracle, DB2 & MS SQL Server RDBMS installed in Windows servers ? I've got two servers with databases installed and...
14
by: Michel Rouzic | last post by:
Hi, I'd like to know whether an operation which always has the same result will be recomputed. Here's the context : I in a loop have to compare many things to foo>>1 in an if statement. In that...
11
by: Richard Maher | last post by:
Hi, I have read many of the copius entries on the subject of IE performance (or the lack thereof) when populating Select Lists. I don't mind the insert performance so much, (I get 100x120byte...
1
by: JSha | last post by:
Hello, The application I am using works on most machines except one where in it throws the following exception... Error: Process Performance Counter is Disabled, so requested operation cannot...
0
by: JSha | last post by:
Hello, The application I am using works on most machines except one where in it throws the following exception... Error: Process Performance Counter is Disabled, so requested operation cannot...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.