Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have SQL Server Express on my VPS(2GB RAM) with a database size of 1.5 GB that I expect will increase to 15 GB. I have noticed that SQL Server is using 1.5 GB RAM even when only small queries has been run against the database.

Is there any relation between memory and database size? Can I tune my SQL Server so it can handle memory better and not use as much memory as it does now?

Here is the memory status of SQL Server:

VM Reserved,1455488
VM Committed,19320
AWE Allocated,0
Reserved Memory,1024
Reserved Memory In Use,0
share|improve this question

migrated from Apr 8 '13 at 0:39

This question came from our site for professional and enthusiast programmers.

This is a very general question so a very general answer might be to make sure you have indexed fields involved in WHERE clauses as a start. Look at the query profiler output too. – Roger Rowland Apr 7 '13 at 16:21
Not related to the question, but "upto 15GB": SQL Server Express edition allows to store only up to 10GB. – outcoldman Apr 7 '13 at 16:25
I already have index on all column which are in conditions(where queries). How can I find reason by profiler? Is there profiler in sql server 2005 express? – Aslam Khan Apr 7 '13 at 16:26
SQL Server Express does not have a profiler - that's one of its limitations – marc_s Apr 7 '13 at 16:41

SQL Server is known for by default consuming as much memory as the OS allows it to take, so you'll have to reduce it manually.

One way of doing this is described here and here. On the second link, specifically, you will find this example that might be useful for you:

sp_configure 'show advanced options', 1;
sp_configure 'max server memory', 4096;

Instead of 4096, you might want to enter something smaller depending on your available RAM.

And, as @outcoldman says in a comment to your question, SQL Server Express doesn't allow 15 GB databases. This answer specifies 4 GB max for SQL Server Express 2005 and 10 GB max for SQL Server Express 2008 & 2012.

share|improve this answer
Thanks for your suggestion. I will upgrade edition if needed. 4096 is 4GB right? Can I allow 1GB to SQL Server, I hope, it will not effect performance? – Aslam Khan Apr 7 '13 at 17:34
@AslamKhan Yes, 4096 is 4 GB. 1024 would be 1 GB. It's a bit on the low side, but if that's what you can allow with your hardware, then so be it... – user5094 Apr 7 '13 at 18:03
Final query, how it would if I switch to MySQL. My need is full text search and MySQL allow full text search and it is free too but I do not know database limit and large database performances? – Aslam Khan Apr 7 '13 at 18:21
@AslamKhan There are many considerations to be taken into account before deciding to switch from one DBMS to another. As far as I know, MySQL does not impose limitations like SQL Server Express, but I won't go into a benchmark comparison between the two. You might want to take a look at… - specifically look for those areas where SQL Server and MySQL differ and how important they are to you. Also, there is always the possibility of working around the 4/10 GB limitation by splitting up the database. – user5094 Apr 7 '13 at 18:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.