How to clear memory usage after executing queries ?
From: Paul fpvt2 (Paulfpvt2_at_discussions.microsoft.com)
Date: 12/23/04
- Next message: Stijn Goris: "RE: Basic stored procedure question"
- Previous message: Steve Kass: "Re: Still Can't Make it Work?"
- Next in thread: Adam Machanic: "Re: How to clear memory usage after executing queries ?"
- Reply: Adam Machanic: "Re: How to clear memory usage after executing queries ?"
- Reply: Tom Moreau: "Re: How to clear memory usage after executing queries ?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 23 Dec 2004 07:35:03 -0800
We have a SQL Server 2000 database that has about 10 million records. The
database has 1 table, and the table has 3 columns.
CREATE TABLE [dbo].[Packet] (
[PACKET_TIME] [datetime] NOT NULL ,
[PACKET_CONTRACT] [varchar] (8) NOT NULL ,
[PACKET_DATA] [varchar] (2000) NOT NULL )
I have a clustered indexed for column ([PACKET_CONTRACT],[PACKET_TIME]). I
found this index execute the query that I want the fastest.
When I query the database, for example:
-select distinct(packet_contract) from packet (Returns 600 records)
-select packet_data from packet where packet_time >= dateadd(hour, -96,
getdate()) and packet_contract = 'ABCD' (returns 135,000 records)
the memory usage for SQL Server shot up from 50,000 K to 275,000 K.
The database currently has about 4 million records.
I tried the following statements, but the memory is still not cleared up:
-DBCC DROPCLEANBUFFERS
-dbcc freeproccache
The only way to clear up the memory usage is by stopping SQL Server Service
Manager.
How can I clear up the memory usage after executing a query without stopping
SQL Server Service Manager ?
Thanks a lot.
- Next message: Stijn Goris: "RE: Basic stored procedure question"
- Previous message: Steve Kass: "Re: Still Can't Make it Work?"
- Next in thread: Adam Machanic: "Re: How to clear memory usage after executing queries ?"
- Reply: Adam Machanic: "Re: How to clear memory usage after executing queries ?"
- Reply: Tom Moreau: "Re: How to clear memory usage after executing queries ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|