473,593 Members | 2,907 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL Operation Performance Advice

24 New Member
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 1095
Delerna
1,134 Recognized Expert Top Contributor
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 Recognized Expert Top Contributor
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 Recognized Expert Specialist
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
2186
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 Any advice on benchmarking tools / techniques ? I have no budget for tool-building, so if there's anything already out there, that would be good to know.
3
54593
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 (tcClient per in tcClientList) <-- Exception throw by this line. { if (tcClient!=tcClientNow) tcClient.flush(); }
0
1297
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 message="tns:EJobGetEmpBrdRes" name="EJobGetEmpBrdRes"/> <fault message="tns:Fault" name="Fault"/> </operation>
10
19137
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 than 90 seconds. I am running VS.Net and the app is ASP.Net, written using VB.Net. The app calls an asp.Net web service to retrieve the report. Both the web site and the web service are running locally on my PC. I have tried modifying the...
5
2468
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 configured, I prepared set of data using DBGEN from TPC and I already imported them into databases.Also, I configured the replication. Now I have to do a test with a few kind of replications method implemented in these RDMBS, but I don't know which...
14
1479
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 very if statement I compare stuff with (foo>>1) about four times, and I'd like to know if it everytime does the shifting from the original foo value or if it re-uses the previous result, since the value of foo did not change. Also I use many...
11
4491
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 rows inserted/sec up to 500, and 100rows/6secs up to 3000, which isn't great but then the Row Count is clicking away for the user to see and they can hit the "cancel" button at anytime, so overall I'm happy), what really disappoints me is the...
1
15505
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 be performed. Stack Trace: at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library)
0
1627
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 be performed. Stack Trace: at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library)
0
7874
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8241
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6646
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5738
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5402
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3853
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.