Quote:
We have made a simple tests:
At first we have measured execution time of sequence containing 23 separate statements (simple "select" statements) - it took about 500ms.
In second test we "joined" all these statements code into single string and executed single statement - it took about 30ms :)
Exactly one week ago I encountered the same problem. Very fast on Oracle and MySQL and terribly slow when deployed on MS SQL Server 2000.
After a day of debugging and searching, I finally figured it out.
We use the jTDS driver and one of the properties you can give to the URL is the "sendStringParametersAsUnicode". If you don't specify it, it takes the default value, which is "TRUE". But in a SQL Server 2000 environment, this can have a dramatic performance influence as you can read in this faq:
http://jtds.sourceforge.net/faq.html#urlFormat.
We had a speed-up from 8-10 times by setting this flag to false.
Jos,
It can be that you increase performance with any parameter, but from architecture of MS SQL i see that it have to be slow in OLTP application - mysql is quick when you work without transaction and it is another story.
It is simple for explanation, but it isn't easy for test (you can test database with more users)
when you have more users and more read/write operations and users read/write different data sql server is fine
when they read (only read, but special write) to same page then first reader block others
it is much worst when you have complex system (complex procedures, functions , triggers
and all read/write many things)
and again - if this parameter make SQL server quicker, why MS don't set this to default - it work for english language only (maybe)