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?
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.
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.
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.