Re: MS SQL Server/ODBC package for Python



:) Knock away, as my info isn't scientific anyway. In my case, ASA is
*not* local. The db is running on a 500MHz x 2 server with 768MB RAM,
over 100BaseT connection. That same server is also running the MSSQL
instance, and IIS.

Running your benchmark, I ran into a couple of interesting points.
Using mx.ODBC, my times were 0.54 seconds and 6.56 seconds
respectively, while using adodbapi my results are 3.55 seconds and 25.9
seconds respectively. mx.ODBC is faster with the simple query you
provide.

Next I modified the benchmark to reflect my particular circumstances
more accurately (?Maybe? Comments invited). I changed the query to
one of the queries in regular use in my application. This query
selects 26 columns from 3 joined tables, with a where clause "where
f476 = ?", and I provide the missing value as a tuple in the execute
statement. Note that, as I mentioned in my reply to M-A, the f476
field is not indexed, and is a long varchar. Again, the system is
bought, so I have no control over the schema. ;)

The other change I made was to reduce the number of iterations from 100
to 10. Since there are 128000 records in the main table, the wait for
100 iterations was too long for my patience. Under these
circumstances, mx.ODBC's numbers are 188.49 seconds and 377.56 seconds
respectively, and adodbapi's times are 111.15 seconds and 223.55
seconds respectively.

My first wall-clock impressions are obvious exaggerations of reality,
for which I duly apologize to all. However, adodbapi did prove to be
faster in my admittedly very wacky common use case. Slower to connect,
but faster to run a substantial query.

Comments? Questions? Suggestions for improvement?

.



Relevant Pages

  • Re: Java Faster Than C ?
    ... winning vendor tweaked their optimizer to recognize the query text and ... If you have control over that, you can bias it to the ... it is rare when those composing the benchmark don't have ... Knuth has frightened people off EVER tweaking code. ...
    (comp.lang.java.programmer)
  • Re: create and/or insert into a table, specifying columns once
    ... >have to create a query that comes up with all of the columns in two places: ... >first to create a new table and then to populate an existing table. ... for all iterations. ... I see no reason to prefer the third or fourth option over this. ...
    (microsoft.public.sqlserver.programming)
  • Re: ExecuteReader
    ... The reader typically will not know how many rows are ... You either have to include it as a part of the query (have a ... iterations. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Attempting to Create a "Top N Values Per Group" Query Runs Unexpec
    ... after the function had been called through 309296 iterations. ... The query is based on a query which returns 1830 ... q.[Overall Total Apps], ... is working with only the results of the first query. ...
    (microsoft.public.access.queries)