473,809 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MSSQL Query Memory when using long fields

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_Perc ent int no 4 10
Inodes_Used_Per cent 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
2 1931
(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****@sommarsk og.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
give us an example of the two selects.

Mar 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1650
by: Don | last post by:
I have MSSQL2k SP3a on WIN2k SP4. moved a Date/log files to this server about a week ago from a SQL7 server and attached it to this new Sql2k server. everything works fine for about 24hrs and then it starts timing out !! all I have to so is restart the MSSQL service and works fine again till the next day !
14
2476
by: Kukurydz | last post by:
I've got such problem: My database is stored on MSSQL Server. I have to write reports for it in MSAccess. I've got a problem with creating a query which will select records from MSSQL table with date and time values from given range. The difficulty is mainly caused by the fact, that Date and Time is stored in separate rows as String . I've tried to use CDate() function in my query, but it worked well only during tests on small table (about...
2
13967
by: Ian Hinson | last post by:
Hi, Sometimes I find it handy to construct an sql string for action queries, and then run it directly against the database and/or connection instead of using Recordsets for simple updates. eg. This query works in MS Access (using dbs.Execute): UPDATE Customer SET LastContact = #2/5/2005 13:15:00# WHERE Customer.CustomerID = 101;
2
1261
by: Jeremy Cowles | last post by:
Disclaimer: This could be considered an ADO question, but, it really is a question of code maintenance. I have created a utility app that synchronizes MSSQL tables & stored procedures as Classes in .NET. So Given the following table structure: Table Name: ITEM item_id varchar(20) description varchar(40)
11
31777
by: ralphie | last post by:
hi all since nearly 2 days i fight with mssql and utf-8 as i need to store and retrieve arabic characters. i tried the com approach http://groups.google.com/group/mailing.www.php-dev/browse_thread/thread/69f90dc978763e99/d61aa0bd48de23f0?lnk=st&q=php+mssql+utf-8&rnum=7#d61aa0bd48de23f0 i tried as well the odbtp library, odbc and obviously the mssql native
8
1831
by: No bother | last post by:
I have a table with two columns, one named master, the other slave. Each column has a set of numbers. A number in one column can appear in the other. I am trying to see if there is any infinite recursion in the table. E.g.: Master Slave 1 2 2 1
2
2035
by: larmores | last post by:
I have a medical database being exported to fixed-width text file and then need to ftp. I have a data source and can extract 6 of the seven tables via a Transform Data Task connected to a Text File Destinaton. When I edit the properties of the seventh Transform Data Task, immunizations, I can get the SQL Query source in and MSSQL is happy when I click "Parse Query". Then, when I go to the Destination tab the options for defining the columns...
14
2935
by: guswebb | last post by:
Hi. I'm a newbie to PHP and am having a few problems as follows... I have installed PHP successfully on server 1 which is running IIS 6 (W2k3) and hosting multiple sites, some of which connect to MSSQL 2k (SP4) on server 2 (using ASP). I can load a basic 'Hellow world' PHP page hosted on server1 but when I add the code to create a simple connection to MSSQL on server 2, my PHP doesn't seem to connect nor output any of the desired query...
11
4059
by: Icemokka | last post by:
Hi, I'm need to upload a big file ( 600Mb+ ) to a BLOB field in MSSQL 2005. My code looks like this : fs = New FileStream(sFilePath, FileMode.Open) Dim ByteArray(fs.Length) As Byte fs.Read(ByteArray, 0, fs.Length)
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7660
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3014
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.