Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL and Ram Usage

Author  Topic 

smckechnie
Starting Member

7 Posts

Posted - 2005-08-30 : 10:36:13
Hi All.

I am new to MSSQL, Iam using it to store largeamounts of data on a daily basis,that I import from a CSV file at the rate that I am going it should be about 1Gig a month of data. I noticed that as I add data to MSSQL my ram usage climbs by the size of the data. Is there someting Ihave done wrong inthe setup.

Thanks
Scott

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-08-30 : 10:54:48
SQL Server will try to use all available RAM in your server. This is a normal behaviour of SQL Server btw. This can be changed if it is impacting other services on your system, but if you are running a dedicated SQL box you shouldn't have to change anything.



-ec
Go to Top of Page

smckechnie
Starting Member

7 Posts

Posted - 2005-09-01 : 07:39:00
Thanks.

However how will this impact when my data out grows the RAM i.e 3Gigs on a 512MegRam.

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-09-01 : 09:52:43
SQL Server will cache the data it is working on. If you access all the data in the database repeatedly then performance will suffer. If you access parts of it, i.e. the part you access regularly does not exceed the available RAM, performance will be fine.

Look at it this way, a Terrabyte database doesn't have to have a terrabyte of RAM!

Kristen
Go to Top of Page

ryanston
Microsoft SQL Server Product Team

89 Posts

Posted - 2005-09-01 : 13:06:08
Take a look at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqldev/html/sqldev_01262004.asp for more details on how this all works.

Thanks,

----------------------
Ryan Stonecipher
Developer, Microsoft SQL Server Storage Engine, DBCC
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

alimuumin
Starting Member

7 Posts

Posted - 2005-09-05 : 03:04:23
quote:
SQL Server will cache the data it is working on. If you access all the data in the database repeatedly then performance will suffer. If you access parts of it, i.e. the part you access regularly does not exceed the available RAM, performance will be fine


How can I Clear the Cashe becouse I have selected alot of data (perhaps 1 million Records) at many times.

Please Help...

Regards Mr. Mumin
Thanks All,

Go to Top of Page

scullee
Posting Yak Master

103 Posts

Posted - 2005-09-05 : 07:02:39
Dont clear it, let sql do that.

If you want to limit the amount of RAM sql uses, set it in the config.
Go to Top of Page

smckechnie
Starting Member

7 Posts

Posted - 2005-09-05 : 07:30:06
Thanks All.How badly does the performance get hampered once SQL has used all RAM assigned to it.

Thanks
Scott
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-09-05 : 15:14:25
Its smarter than that ... things that the application keeps asking for get held in cache, things that have not been required for a long time get flushed from the cache.

I don't know the details but in simplistic terms its probably some sort of least-recently-used algorithm

Kristen
Go to Top of Page

alimuumin
Starting Member

7 Posts

Posted - 2005-09-06 : 05:11:37
Thanks All. How can I Assign manually for SQL Server how murch RAM does it use.


Regards Mr. Mumin
Thanks All,

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-09-06 : 11:17:23
"How can I Assign manually for SQL Server how murch RAM does it use"

Its a "Property" for the Server in Enterprise Manager.

Kristen
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-09-06 : 23:56:19
This is kind of overkill. You can also change it with the information in this article. It's a good read to get you familiar with SQL Server memory anyway.

http://www.sql-server-performance.com/awe_memory.asp

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -