473,397 Members | 1,960 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,397 software developers and data experts.

ADO.NET performance expectations?

Hey all,

I'm working on a winform that does an update on a local VFP database using
OleDb. Doing this natively in VFP is about two seconds, while doing so in a
..NET form takes 25 seconds. Any idea where I can get some speedup?

cmdPrepaidCard.CommandText =
"UPDATE PrepaidBatch SET TransactionKey = 100 " +
"WHERE EMPTY(Created) AND TransactionKey = 0 AND " +
"BatchType = 'I' AND Sequence - 5 < " +
"(SELECT MIN( Sequence ) " +
"FROM PrepaidBatch " +
"WHERE EMPTY( Created ) AND BatchType = 'I' " +
"AND TransactionKey = 0 )";

TIA,

John
Jul 21 '05 #1
3 1245
Follow-up: I knew that it was faster to use a stored proecedure, but not
this different! I changed the code to call a stored procedure and it now
runs in about two seconds. Should it normally save 22 seconds in such a
case?

"John Spiegel" <js******@YETANOTHERSPAMHATERc-comld.com> wrote in message
news:eu**************@TK2MSFTNGP12.phx.gbl...
Hey all,

I'm working on a winform that does an update on a local VFP database using
OleDb. Doing this natively in VFP is about two seconds, while doing so in a .NET form takes 25 seconds. Any idea where I can get some speedup?

cmdPrepaidCard.CommandText =
"UPDATE PrepaidBatch SET TransactionKey = 100 " +
"WHERE EMPTY(Created) AND TransactionKey = 0 AND " +
"BatchType = 'I' AND Sequence - 5 < " +
"(SELECT MIN( Sequence ) " +
"FROM PrepaidBatch " +
"WHERE EMPTY( Created ) AND BatchType = 'I' " +
"AND TransactionKey = 0 )";

TIA,

John

Jul 21 '05 #2

Check the query plan in SQL and look at the time difference, I am sure your
parsing and generating the query plan for each execution would be slow but I
agree not a performance difference like that. Also you should use the query
hint NOLOCK on your subquery to avoid locking.

Happy holidays

"John Spiegel" wrote:
Follow-up: I knew that it was faster to use a stored proecedure, but not
this different! I changed the code to call a stored procedure and it now
runs in about two seconds. Should it normally save 22 seconds in such a
case?

"John Spiegel" <js******@YETANOTHERSPAMHATERc-comld.com> wrote in message
news:eu**************@TK2MSFTNGP12.phx.gbl...
Hey all,

I'm working on a winform that does an update on a local VFP database using
OleDb. Doing this natively in VFP is about two seconds, while doing so in

a
.NET form takes 25 seconds. Any idea where I can get some speedup?

cmdPrepaidCard.CommandText =
"UPDATE PrepaidBatch SET TransactionKey = 100 " +
"WHERE EMPTY(Created) AND TransactionKey = 0 AND " +
"BatchType = 'I' AND Sequence - 5 < " +
"(SELECT MIN( Sequence ) " +
"FROM PrepaidBatch " +
"WHERE EMPTY( Created ) AND BatchType = 'I' " +
"AND TransactionKey = 0 )";

TIA,

John


Jul 21 '05 #3
Thanks for jumping in. This one is a VFP database not MSSQL. There's no
execution plan to check nor query hint in this environment.
"BeanTownBizTalkGuru" <Be*****************@discussions.microsoft.com> wrote
in message news:50**********************************@microsof t.com...

Check the query plan in SQL and look at the time difference, I am sure your parsing and generating the query plan for each execution would be slow but I agree not a performance difference like that. Also you should use the query hint NOLOCK on your subquery to avoid locking.

Happy holidays

"John Spiegel" wrote:
Follow-up: I knew that it was faster to use a stored proecedure, but not this different! I changed the code to call a stored procedure and it now runs in about two seconds. Should it normally save 22 seconds in such a
case?

"John Spiegel" <js******@YETANOTHERSPAMHATERc-comld.com> wrote in message news:eu**************@TK2MSFTNGP12.phx.gbl...
Hey all,

I'm working on a winform that does an update on a local VFP database using OleDb. Doing this natively in VFP is about two seconds, while doing
so in a
.NET form takes 25 seconds. Any idea where I can get some speedup?

cmdPrepaidCard.CommandText =
"UPDATE PrepaidBatch SET TransactionKey = 100 " +
"WHERE EMPTY(Created) AND TransactionKey = 0 AND " +
"BatchType = 'I' AND Sequence - 5 < " +
"(SELECT MIN( Sequence ) " +
"FROM PrepaidBatch " +
"WHERE EMPTY( Created ) AND BatchType = 'I' " +
"AND TransactionKey = 0 )";

TIA,

John


Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Greg Brunet | last post by:
In doing some testing of different but simple algorithms for getting a list of prime numbers, I ended up getting some results that seem a bit contradictory. Given the following test program...
4
by: Leon Jollans | last post by:
Hi. I'm reading a 5 meg (or so) file from the response stream of a WebRequest, and it's pitifully slow. I mean *really* slow, in the order of 15 minutes to download. Now obviously I'm caching this...
2
by: Dave Weaver | last post by:
I'm having severe performance issues with a conceptually simple database. The database has one table, containing weather observations. The table currently has about 13.5 million rows, and is being...
10
by: Daniel Billingsley | last post by:
In another online group in which I participate, we were discussing a particular piece of code that had a pretty high risk for breaking in the future (because it depended on something not changing...
3
by: John Spiegel | last post by:
Hey all, I'm working on a winform that does an update on a local VFP database using OleDb. Doing this natively in VFP is about two seconds, while doing so in a ..NET form takes 25 seconds. Any...
1
by: Amerz | last post by:
heres one for ya.... what measures can be put into place in order to bring a system back up to its expected levels of performance, when numerous instances of paging to and form the hard disk...
8
by: Al Kolff | last post by:
After developing two major php/mysql projects (over 15 weeks (700+ hours)on each) for two different clients, I am having the same problem. I did due diligence and spent major time with both clients...
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...
4
by: 73k5blazer | last post by:
Hello again all.. We have a giant application from a giant software vendor that has very poor SQL. It's a PLM CAD application, that makes a call to the db for every cad node in the assembly. So...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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,...

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.