|
Posted by Daniel Smedegaard Buus on 11/22/06 10:50
Hey there :)
Sorry if I'm asking a dumb question here, but I'm still quite new to MS SQL,
so this problem might appear larger to me than it really is.
I'm trying to create a performance test environment for a Ruby on Rails and
Mongrel setup with an MS SQL Server 2000.
The adapter, mssqlclient, uses some kind of "conversion" for unicode, here's
a quote from the homepage:
"Automatically translate from proper UTF-16LE nvarchar fields in the
database to UTF-8 Ruby Strings you can display in your application"
As far as the local DB designer knows, we're not using UTF16-LE nvarchar
fields, unless it's something that happens implicitly.
Either way, this is how a query from the mssqlclient adapter might look:
SELECT TOP 1 * FROM Item WHERE (Item.Itemnumber = N'45783745')
Response time the first couple of times was upwards of 20+ seconds, after
the sql server has "awaken from its slumber", it's roughly 4 seconds.
Omitting the "N" from the WHERE clause, response time is in milliseconds (as
one would expect, regardless of the fact that there's currently >2.5
million items in the table).
Any tips on how to resolve this? Is the SQL statement bad, or is it a
question of configuring SQL Server correctly?
Thanks in advance for any help,
Daniel Buus :)
--
http://www.rhesusb.dk
Navigation:
[Reply to this message]
|