Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

memory usage

 
   Database Help (Home) -> Programming RSS
Next:  Monthly Summary Report  
Author Message
Roy Goldhammer

External


Since: Jan 13, 2008
Posts: 68



(Msg. 1) Posted: Mon Jan 15, 2007 5:38 pm
Post subject: memory usage
Archived from groups: microsoft>public>sqlserver>programming (more info?)

Hello there

I have sql server 2000 SP4

I've started placing small tables in the memory by DBCC PINTABLE

Can i get on query anlyser the amout of the memory that sql server is using
right now?

and can i know how mutch of this memory is being using by RAM or HD?

 >> Stay informed about: memory usage 
Back to top
Login to vote
dmarkle

External


Since: Jan 07, 2007
Posts: 21



(Msg. 2) Posted: Mon Jan 15, 2007 5:38 pm
Post subject: Re: memory usage [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Roy:

I don't know the answer to your exact question, but I have a comment on
something you wrote.

A piece of advice: Stop using DBCC PINTABLE. In SQL Server 2005 (I'm
sure you will upgrade eventually), this command does nothing (though it
does not throw an error, to preserve backward compatibility).

Keep in mind that doing a DBCC PINTABLE will likely not do a thing for
your performance. SQL Server's caching mechanisms are quite good at
keeping tables which are frequently accessed in memory anyway.

-Dave




Roy Goldhammer wrote:
> Hello there
>
> I have sql server 2000 SP4
>
> I've started placing small tables in the memory by DBCC PINTABLE
>
> Can i get on query anlyser the amout of the memory that sql server is using
> right now?
>
> and can i know how mutch of this memory is being using by RAM or HD?

 >> Stay informed about: memory usage 
Back to top
Login to vote
Dan Guzman1

External


Since: Aug 22, 2004
Posts: 840



(Msg. 3) Posted: Mon Jan 15, 2007 5:38 pm
Post subject: Re: memory usage [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> I've started placing small tables in the memory by DBCC PINTABLE

Why are you doing this? SQL Server automatically keeps frequently used data
in cache. By pinning a table in memory, you are reserving memory that may
be better used elsewhere. Note that DBCC PINTABLE has been removed from SQL
2005.

> Can i get on query anlyser the amout of the memory that sql server is
> using right now?

See the sysperfinfo system table.

> and can i know how mutch of this memory is being using by RAM or HD?

I don't understand this your question.


--
Hope this helps.

Dan Guzman
SQL Server MVP

"Roy Goldhammer" wrote in message

> Hello there
>
> I have sql server 2000 SP4
>
> I've started placing small tables in the memory by DBCC PINTABLE
>
> Can i get on query anlyser the amout of the memory that sql server is
> using right now?
>
> and can i know how mutch of this memory is being using by RAM or HD?
>
 >> Stay informed about: memory usage 
Back to top
Login to vote
Roy Goldhammer

External


Since: Jan 13, 2008
Posts: 68



(Msg. 4) Posted: Tue Jan 16, 2007 10:13 am
Post subject: Re: memory usage [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Whell Dan.

About PINTABLE: i've seen the there isn't much diffrence of putting tables
like this in memory. In the execution plan it reduce it with 0.1 subtree
cost approx which is not do that mutch to improve performance.

Moreover, the sql server my office is Standard edition which can't be use
more then 2GB of memory. And as my understand, if the table is being loaded
to memory, the usage become more limited. ecpecily if the average of usage
today closes to 1.8GB

therefore i will cancel the using of PINTABLE.

About the memory usage: as far as i know, the sql server use first the RAM
memory , and after it being full, it start use the tempDB on the HD (virtual
memory)

my question is: can i know this on runtime that the amount of memory usage
has started to use virtual memory?

"Dan Guzman" wrote in message

>> I've started placing small tables in the memory by DBCC PINTABLE
>
> Why are you doing this? SQL Server automatically keeps frequently used
> data in cache. By pinning a table in memory, you are reserving memory
> that may be better used elsewhere. Note that DBCC PINTABLE has been
> removed from SQL 2005.
>
>> Can i get on query anlyser the amout of the memory that sql server is
>> using right now?
>
> See the sysperfinfo system table.
>
>> and can i know how mutch of this memory is being using by RAM or HD?
>
> I don't understand this your question.
>
>
> --
> Hope this helps.
>
> Dan Guzman
> SQL Server MVP
>
> "Roy Goldhammer" wrote in message
>
>> Hello there
>>
>> I have sql server 2000 SP4
>>
>> I've started placing small tables in the memory by DBCC PINTABLE
>>
>> Can i get on query anlyser the amout of the memory that sql server is
>> using right now?
>>
>> and can i know how mutch of this memory is being using by RAM or HD?
>>
>
 >> Stay informed about: memory usage 
Back to top
Login to vote
Dan Guzman1

External


Since: Aug 22, 2004
Posts: 840



(Msg. 5) Posted: Tue Jan 16, 2007 10:13 am
Post subject: Re: memory usage [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> About the memory usage: as far as i know, the sql server use first the RAM
> memory , and after it being full, it start use the tempDB on the HD
> (virtual memory)
>
> my question is: can i know this on runtime that the amount of memory usage
> has started to use virtual memory?
>

SQL Server uses RAM mostly for buffer cache. This cache is not written to
tempdb regardless of memory pressure because dirty pages are written to the
directly to the underlying database files and less frequently used
unmodified pages are freed. In other words, tempdb is not really used for
virtual memory like OS page files.

In addition to temporary user objects, SQL server uses tempdb for internal
work objects and intermediate storage during query processing. Additional
memory can reduce the amount of tempdb space and I/O. However, since you
are constrained by a 2GB memory limit, about all you really do is monitor
tempdb space and ensure database files are large enough to prevent autogrow
during normal operation.

Are you currently experiencing a performance problem? It's usually best to
concentrate on indexing and query tuning. SQL Server generally does a
pretty good job of self-tuning memory.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Roy Goldhammer" wrote in message

> Whell Dan.
>
> About PINTABLE: i've seen the there isn't much diffrence of putting tables
> like this in memory. In the execution plan it reduce it with 0.1 subtree
> cost approx which is not do that mutch to improve performance.
>
> Moreover, the sql server my office is Standard edition which can't be use
> more then 2GB of memory. And as my understand, if the table is being
> loaded to memory, the usage become more limited. ecpecily if the average
> of usage today closes to 1.8GB
>
> therefore i will cancel the using of PINTABLE.
>
> About the memory usage: as far as i know, the sql server use first the RAM
> memory , and after it being full, it start use the tempDB on the HD
> (virtual memory)
>
> my question is: can i know this on runtime that the amount of memory usage
> has started to use virtual memory?
>
> "Dan Guzman" wrote in message
>
>>> I've started placing small tables in the memory by DBCC PINTABLE
>>
>> Why are you doing this? SQL Server automatically keeps frequently used
>> data in cache. By pinning a table in memory, you are reserving memory
>> that may be better used elsewhere. Note that DBCC PINTABLE has been
>> removed from SQL 2005.
>>
>>> Can i get on query anlyser the amout of the memory that sql server is
>>> using right now?
>>
>> See the sysperfinfo system table.
>>
>>> and can i know how mutch of this memory is being using by RAM or HD?
>>
>> I don't understand this your question.
>>
>>
>> --
>> Hope this helps.
>>
>> Dan Guzman
>> SQL Server MVP
>>
>> "Roy Goldhammer" wrote in message
>>
>>> Hello there
>>>
>>> I have sql server 2000 SP4
>>>
>>> I've started placing small tables in the memory by DBCC PINTABLE
>>>
>>> Can i get on query anlyser the amout of the memory that sql server is
>>> using right now?
>>>
>>> and can i know how mutch of this memory is being using by RAM or HD?
>>>
>>
>
>
 >> Stay informed about: memory usage 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
How to make MODI.Document not leak memory? I have millions.. - How to make MODI.Document not leak memory? I have millions of images to OCR but each time i OCR one it leaks memory. How to do the OCR and then clean up so that my app doesnt leak memory? MODI.Document miDoc = new MODI.Document(); ...

Usage of CHARINDEX - I have a problem that too many rows are unexpectedly deleted in a table. I don't know what causes it yet, but I suspect it might be the SP below that causes it in some cases. @Params is a commaseparated list of GUIDs that identifies products. Rows with a...

Index usage - Hi Experts: Pardon me for asking this basic question. If I have the following query (Select * from customers where City=@City or City IS NULL) Assuming that I have an index on the city column would ther be ever a situation that the index would not be...

Index usage - I have a view that looks like CREATE VIEW foo AS SELECT <bunch of cols> FROM <bunch of joined tables> WHERE t1.EntryDate >= DATEADD(mm,-18,GETDATE()) This takes about 10 minutes to run, and when I join the view to other tables in a large...

Index Usage Info - Hi all, I am attempting to use the dmv sys.dm_db_index_usage_stats to get info about index usage. Simple question... What do I have to do to turn the return index_id column info into the name I assigned to that particular index. I tried joining with...
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]