By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,694 Members | 2,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,694 IT Pros & Developers. It's quick & easy.

MSSQL Query Memory when using long fields

P: n/a
Here is our problem...

We are doing a lot of selects against a table that has one large field
in it.

If we do a select against all the fields except for description, the
query comes back relatively quickly. If we add that last field (768
chars) to the query, our query takes 10x longer (5 seconds vs 56
seconds.)

When we run the one without the description column, we can watch
perfmon and see a very quick spike to physical disk. If we add in the
description field we can see that the server becomes I/O bound - the
disk sits at 100% until the query is complete.

We have tweaked the min query memory setting for the server but it
seems to have had no effect no matter how high we set it. Is there
some point at which MSSQL decides it cannot perform the transaction in
memory? What would I increase to cure this problem?
For example:
TMZDIFF int 4 10
WRITETIME char no 16
System_Name char no 64
Timestamp char no 16
Name char no 32
Mount_Point char no 32
Size int no 4 10
Space_Used int no 4 10
Space_Available int no 4 10
Inode_Size int no 4 10
Inodes_Used int no 4 10
Inodes_Free int no 4 10
Space_Used_Percent int no 4 10
Inodes_Used_Percent int no 4 10
FS_Type char no 8
Space_Available_Percent int no 4 10
Name_U nchar no 32
Description nchar no 768

Mar 2 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
(wi***********@yahoo.com) writes:
If we do a select against all the fields except for description, the
query comes back relatively quickly. If we add that last field (768
chars) to the query, our query takes 10x longer (5 seconds vs 56
seconds.)
My initial reaction is that there is an index on the table that covers
all columns, save the long column.

Could you post CREATE TABLE and CREATE INDEX statements for the table?
Don't forget PRIMARY KEY and UNIQUE constraints.
We have tweaked the min query memory setting for the server but it
seems to have had no effect no matter how high we set it. Is there
some point at which MSSQL decides it cannot perform the transaction in
memory? What would I increase to cure this problem?


How many rows are you returning? On what sort of network connection?
How much memory do you have in the machine?
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 3 '06 #2

P: n/a
give us an example of the two selects.

Mar 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.