If I run this test against MS Access or MySql it takes aprox. 4000ms.
bullo (4/4/2012)
my page is not optimal? IT is not. But this is independent.2 other db engines run it fine.
4 seconds is not 'fine' by any definition of the word.
I used to write web pages, any web page that takes 4 seconds just to query the data is a web page that is going to drive users away.
It's not a case that MySQL is fast and SQL Server is slow. It's a case that the query on MySQL is slow and the query on SQL Server is slower. With proper code and proper indexing we can probably get this way under a second.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability