By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,109 Members | 969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,109 IT Pros & Developers. It's quick & easy.

Oracle performance with C#

P: n/a
We have an old DLL written with Visual C++, no MFC. The DLL construct a
fairly complex sql dynamically and send it to an Oracle 9 or 10 server.
We recently ported the code as a web service written in C# with .NET
1.1. We ran comparative performance statistics to ensure that our new
implementation would be as fast as the 10 years old, very mature and
very optimized version. Here are the results:

When the SQL is first send:
C++ : avg=655ms, std=1100ms
C# : avg=672ms, std=1146ms

When we repeat the same search again:
C++ : avg=178ms, std=166ms
C# : avg=78ms, std=66ms

Our conclusions are:
- when the sql if first send, a "context switch" seems to occur on
the server
- the time to process the SQL seems identical for both C# and C++
- if the SQL was already send on the current connection, the
performance is much faster

- why is .NET framework twice faster than C++ to "pump" back the data
of an already submitted SQL? The transport should be done by OCI
library using tcp/ip socket in both approach?

(Measurement was done in both case thru call of QueryPerformanceCounter
and ...Freq.

Mar 21 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.