Board index » delphi » BDE and C++Builder slower than ADO and VB Script with MS SQL??

BDE and C++Builder slower than ADO and VB Script with MS SQL??

I have bench marked an 20 line application written with C++Builder 4
which performs an SQL query against a MS SQL database.

Another developer has created a VB Script version running within I.E.
and using ADO to perform the same query.

The VB Script version performs about 50% faster, but more importantly,
if 10 continuous sessions are run simultaneously the SQL server will not
grind to a halt and potentially fail, as it will if I perform similar
numbers of continuous sessions vita the C++Builder (BDE) version.

I have tried via ODBC as well as SQL Links and get similar results.

What is going on?

The server is a 500Mhz DELL machine with 500MB of RAM and all the other
bells and whistles required to make it fast, but multiple requests from
BDE "flat line" the NT performance monitor!

--
Mischa Simmonds                e-mail: mis...@s055.aone.net.au
Information Design Pty Ltd     voice : +61-2-95522-066
1/2 Darghan Street             fax   : +61-2-95522-434
GLEBE NSW 2037 AUSTRALIA

 

Re:BDE and C++Builder slower than ADO and VB Script with MS SQL??


In the current world, subject to change by MS without notice, the only
reliable way to connect to MS SQL Server seems to be through ADO.  There
are several alternatives for how you go about connecting to anything -
regardless of what language you use - and the distinction is not "VB
Script vs. C++," but rather, "ADO vs. anything-else."

What I was referring to by "subject to change..." was the fact that, not
too long ago, "ODBC was the official way."  When ADO came out - did MS
provide a clean way to allow ODBC-compliant applications to take
advantage of the ADO architecture?  No-o-o-o...

One more thing to consider:  When timing the response of a query, be
certain that the VB application executes the query *and* moves to the
last record of the dataset thus retrieved!  Many servers will spit-back
the first page of results as quickly as possible, "to stop the clock and
to seem thereby to win the race," when in fact they are churning on the
results behind the scenes.  It may well be that the Delphi app is
retrieving those results.

You can monitor the SQL streams (commands and responses) that are
actually taking place between client and server when each of the two
applications are used; this will help you considerably in understanding
what is actually being done, and thus why one application is pummeling
the server while the other is not.

Quote
>Mischa Simmonds wrote:

> I have bench marked an 20 line application written with C++Builder 4
> which performs an SQL query against a MS SQL database.

> Another developer has created a VB Script version running within I.E.
> and using ADO to perform the same query.

> The VB Script version performs about 50% faster, but more importantly,
> if 10 continuous sessions are run simultaneously the SQL server will not
> grind to a halt and potentially fail, as it will if I perform similar
> numbers of continuous sessions vita the C++Builder (BDE) version.

--------------------------------------------------------------------
Sundial Services :: Scottsdale, AZ (USA) :: (480) 946-8259
mailto:i...@sundialservices.com  (PGP public key available.)
Quote
> Why =shouldn't= it be quick and easy to keep your database online?
> ChimneySweep(R):  "Click click, it's fixed!" {tm}
> http://www.sundialservices.com/products/chimneysweep

Other Threads