Live data from Hacker News

SQL Server 2005 vs. MySQL for a startup?

news.ycombinator.com

1–10 of 30 posts

SQL Server 2005 vs. MySQL for a startup?

#1
We are wondering whether to use SQL Server 2005 or MySQL as our database. The database will store the following information (for stocks & bonds):

1. Market activity information – price, volume, open, high, low, close for various instruments. 2. Fundamental information – balance sheet line items, income statement line items, news stories etc. 3. Technical indicator values – commonly used moving averages, RSIs etc.

Typical use scenario will be that a browser will request the following information:

1. Data for an stock/bond 2. Data for a certain day/time (across a bunch of stocks).

The predominant concern here is : SPEED. The application should very quickly be able to handle requests and spit out the necessary data to a .NET client.

Do you have any idea what might be the fastest solution in this situation? Can you ask your coders for any suggestions?

I am tempted to go with MySQL since it is free vs. high licensing costs for SQL Server.

The main reason I am considering SQL Server is because of a notion in my head that if it's a .NET/Windows application, SQL Server may be faster.

Thanks!

Re: SQL Server 2005 vs. MySQL for a startup?

#3
I tend to be fairly techagnostic. So, even though I tend to prefer a Unixy/OSS environment for web apps. I researched MS offerings for a startup idea last summer. I'd say that if you're going with a .NET stack, you're probably better off going with MSFT if you can afford it.

Have you considered an Action Pack subscription? If not, you might want to check in to it: https://partner.microsoft.com/Indonesia/program/managemember... You get a +lot+ of MSFT software for around $300 bucks. Granted, the license is only for two years, but that should be enough to get a startup off the ground. If you don't have enough money to buy MSFT licenses after 2 years, you have bigger problems than licensing costs.

And, as long as you're willing to keep going the MSFT way, there's ways to get cheap bulk subscriptions to MSFT licenses. You just have to keep up with MSFT certification process. They actually make it pretty easy to start your own software company based on the MSFT stack.

I really can't speak to speed of SQL server vs MySQL, however. It sounds like most of the data in your DB is going to be text based. I'd be a bit more concerned about speed if you were going to be serving video or a lot of graphics out of your DB.

One option that you might consider before investing a year or two an a DB, is downloading a trial version of each RMDB and do some tests.

MSSQL Server 2005 download: http://msdn2.microsoft.com/en-us/bb498185.aspx

MySQL 5 download: http://dev.mysql.com/downloads/mysql/5.0.html#downloads

Your schema sounds pretty simple. So, design your schema, and run some tests. Find out how quick your server will run with each DB. I bet if you spent a week or two running tests like that, the time spent would more than pay for itself in the long term. Platform and DB choices tend to lock you in for a long time, and if you hate your platform, those are headaches you'll have for quite a while.

Re: SQL Server 2005 vs. MySQL for a startup?

#4
post #2

MySQL Server is cheaper and faster. However, MySQL Server is technically only free if you use it with GPL2 applications or never distribute your app.

I was suspicious, but I read MySQL's page on licensing and that seems to be true. I'm quite shocked about it, I thought you were free to use MySQL in non-open products without having to buy their commercial license.

Re: SQL Server 2005 vs. MySQL for a startup?

#5
I'd go with MySQL. There are better tools, it is less expensive and easier to scale. I don't have any straight-up "speed" evidence other than what is anecdotal.

If you're worried about the MySQL license, you should try PostgreSQL. I've been using it for three years and have had nothing but extremely positive results. Version 8.3 is stupidly fast.

Re: SQL Server 2005 vs. MySQL for a startup?

#7
I would argue assuming its stock trading, your concern should be transactions safety so you need a database with ACID support. Beyond that, which you choose is based on your experience.

Speed is really not a concern anymore because you can use memcached or other distributed cached system when you really need that much scalability and fast access to raw data.

Re: SQL Server 2005 vs. MySQL for a startup?

#8
The raw performance between Sql Svr and Mysql are pretty much a wash. If you primarily base your decision on this, you are overlooking quite a few more important issues. Hardware (Raid level, Ram, CPU), DB driver, programming language, and caching are all more important issues.

Non-speed issues: 1. Sql Svr 2000 had locking problems such that many transactions deadlock and automatically get rolled back. This was due to page locking. I think MS fixed this in 2005 with record-level locking. 2. Sql Svr has very nice stored procedure support. This can be extremely useful. If you think you may need this capability, then Sql Svr is the better choice.

If you do decide to go with Sql Svr, you will probably end up having to get a copy of VS 2008 and do some C# programming. It's almost impossible to maintain Sql Svr w/o it, unless you want to maintain the db by hand every day.

It doesn't sound like you have much db experience. Get a couple of experienced db admins in to talk with you before you make any big decisions, even if it's just a two hour consult.

Re: SQL Server 2005 vs. MySQL for a startup?

#9
Postgresql is free, it is less encumbered, possibly, than MySQL in the long run. Postgresql is more totally Open Source, whereas MySQL is owned by Sun Microsystems. And it is not free for all commercial cases. Postgresql is.

MySql gets its speed rep from the 'MyIsam' table type. But you don't want that for financial data. You want a stronger database. They have another several table types that are more robust and standardized, but not as fast.

Postgresql is plenty fast for large installations when well tuned. And it has good referential integrity, a long-enough history so you can trust it, and stored procedures. MySql is simpler to get started with.

I've never heard that SQL Server was faster, but I'd estimate they have very nice integration with .NET, as it's the same company. This nice integration will undoubtedly lock you in to using their database forever, though. And who knows how their price will change?

Whichever you choose, you will gain if you have at least one person around who has used the DB before and (for MySQL) table-type before. Even once in a while.

Paid consultants are available for any database you choose.

Re: SQL Server 2005 vs. MySQL for a startup?

#10
1. Data for an stock/bond 2. Data for a certain day/time (across a bunch of stocks). The predominant concern here is : SPEED.

I'm a big fan of PostgreSQL but based on your description you might want to look into one of the existing kdb solutions from www.kx.com. Those guys have been solving stuff in that domain for the last two decades.

Post reply on HN