Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I had a talk with a professional who works in a hosting company and he told me that MS SQL Server does take more memory than MySQL in performing its queries. Is that true? And why do you think is the reason behind this? What makes SQL Server require more RAM?

share|improve this question

closed as not a real question by Mark Henderson Jul 13 '11 at 1:46

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Insufficient data. Is the red one bigger than the blue one? –  John Gardeniers Mar 24 '11 at 10:49
add comment

2 Answers

It is likely because the guy (a) did not really know what he talks about and (b) MS does not target mini databases.

For a: SQL Server uses - unless told otherwise - as much RAM as it can to cache database pages in memory. This means in any environment which is active, and has non-trivial databases larger than the memory, the memory WILL fill up to 100%. Point. This is by design to speed things up, and SQL Server rightly assumes it runs alone (serious databases do) and knows better than the file system cache. Often people with poor knowledge of SQL Server overlook that. If you want SQL Server to use little RAM, the admin HAS TO SAY SO (it is a setting limiting the RAM used).

For b: SQL Server is aimed at high-end scalability, and MS Often does not consider the lower end edge case something to optimize for. Whether it uses 10 or 20mb RAM makes no practical difference, but scalability once you hit 1000gb is more important.

At the end, without knowing the details, it is unknown whether the guy ran into a low scalability issue or was simply incompetent.

share|improve this answer
    
I would vote for the guy at the hosting company being incompetent. –  mrdenny Mar 24 '11 at 8:05
    
Have to agree with this... it may be that MySQL is better at fitting into lower end requirements but the majority of admins seem to just install whatever version of SQL they know and don't bother (or even realise it is possible) to tune pretty much all of them to fit into different circumstances) –  RobM Mar 24 '11 at 8:06
add comment

It's been a while since I've done a MySQL install (Sun buying them diminished my love of them and then the subsequent buy by Oracle has just about killed it), but if I recall correctly, MySQL's installation prompts for settings that effectively limit MySQL's use of memory, etc., out of the box. SQL Server Standard and Enterprise editions, on the other hand, set up SQL Server to maximize resources on the server. This is different than SQL Server Express, which installs in a way that limits the resources it needs as much as possible.

SQL Server Express can be configured to use more resources (to a maximum point, since it is Express) and Standard and Enterprise editions can be configured to limit access to memory, processors, etc. They are fairly easy to configure using SQL Server Management Studio, but a lot of folks don't touch these settings. So out of the box MS SQL Server will take up more resources because it assumes you're going to want to maximize its use of resources for the best possible performance.

So with all this said, if your hosting guy just ran the install and went no further, MySQL will have a smaller footprint. But that doesn't mean MySQL can't be configured to use more nor does it mean SQL Server can't be configured to use less.

share|improve this answer
    
In addition, it does not mean it makes sense. If you ahve a dedicated database box, then not using the memory is just dead stupid and wasted money. So, MySql installes should be adjusted then, while SqlServer is fine on larder dedicated servers. –  TomTom Mar 24 '11 at 9:12
add comment

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