Live data from Hacker News

SQL Server 2005 vs. MySQL for a startup?

news.ycombinator.com

21–30 of 30 posts

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

#21
post #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.

you can use it all you want. Just don't distribute it. e.g you are prohibited to take it and make tweaks and release your own DB software...

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

#22
Speed I have found is more dependant upon the sql query you are using and once you have the data the method you use to display it. If you have highly optimized queries and you are using Array's or GetString (not sure what they call those in .net) then you will be in good shape.

For $42 from Amazon you can get the SQL Server 2005 developer version, which is the "enterprise" version, but just for development to get you started http://www.amazon.com/Microsoft-SQL-Server-Developer-2005/dp...

Personally, I am sticking with MSSQL 2000 because I know and already own it. You can get that on eBay for about $800.

I hate that I tend to get out of date on Microsoft stuff, I tend to stick with what I have and not experiment once something is working the way I want it. I did buy the MSSQL 2005 developer because the price is right, one day I will try it out.

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

#23
I would go for sql server 2005/8 in a .net enviroment.

I have never had any speed problems. Also if you are going to use asp.net membership stuff it makes sense to go with it. There is a mySQL membership provider but its not great from my playing.

Also the cost is not going to be that much because you can do an aweful lot of processing with one MS database server.

I am sure with some googling you can find some bench marking of all major dbs.

I use discountasp.net for my .net apps as a starting point.

One last thing, finding someone to work on your MS sql database might be easier.

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

#24
Have you thought of trying Amazon's simpledb? I just to my beta login and it seems pretty awesome so far.

what about couchdb? Still young but can be clustered and will probably way outperform any relational db for the stuff you're describing.

Last time I did benchmarks (a few years ago) mssql totally blew away mysql and postgres on windows. Turns out this was b/c I was using a "dependent subquery" which in my opinion is a lot simpler way to write a lot of queries.

Now that I use mysql (and linux and solaris) exclusively I don't use dependent subqueries at all and all is well.

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

#25
The financial industry does not use databases for this kind of thing much - for keeping records, and back office trade post-processing, yes, but not for market data. Try wikipedia ~ Event Stream Processing, Complex Event Processing, TimesTen (now inside Oracle), Streambase... all very expensive... And if you don't need this kind of speed, then probably all of your listed databases are fine, none has a significant (x10) lead over the others. Work with what matches your skillset.

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

#27
Skip both of them.

Just use memory with a (very frequent) periodic write of the entire dataset in a file named after the time you saved it. Just write/read a block of memory (big array) to/from disk in a file named after the relevant time. What's better is that modifying or accessing this data is normal straightforward memory accesses - very likely less work than writing SQL queries and very very likely easier to unit test. So this should not only be faster, it should also take you less work.

You probably only care about ~10,000 US stocks & bonds, maybe 50 numbers per, all of which are represented well by a 64-bit double (most probably fine in a 32-bit float... yes even US bond prices - they trade in 32nds - binary works fine). 10,000 instruments x 50 numbers x 8 bytes = 4M bytes. All 3 dimensions could increase by an order of magnitude and the answer would probably remain the same or very similar.

You mentioned two requests, and a primary goal of SPEED.

1. Data for a stock/bond - it's in memory. Heck, there's a good chance you can fit the entire current dataset in your CPU cache. You just can't beat that (well you don't need to - put down that VHDL tutorial).

2. Data for a certain day/time (across a bunch of stocks): Just read the file off disk for that day/time. Even if this isn't immediately up to your needs, normal optimizations should buy you tons of performance here - buy RAM and disk mirrors. The data should be contiguous on disk, so you should have very minimal seeking (which is normally the speed killer). You could come up with something that beats this by pulling out fewer than all the stocks at once, but your complexity would skyrocket. This will should at least beat most setups with MySQL or SQL Server 2005 without a metric ton of tuning.

I'm guessing you forgot to mention that you need a time-series for price and volume information (if only for a graph to throw up alongside some boring numbers). Consider just handling that separately, especially as all the other numbers you're interested in don't change anywhere close to as often (and those that do are based off the price/volume and can be trivially calculated on the fly). Some headaches to watch out for though: if you try opening 10,000 file handles at the same time, something's likely to get mad at you. Also note that if you're thinking of opening and closing 10,000 files a lot, you're likely going to be sending the disk seeking around like crazy updating meta-data on disk.

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

#28
Go with what you have experience in. If you build it and it is not fast enough, then throw caching at it. There probably won't be a huge difference between most databases, if used effectively.

If you have special requirements, such as true isolation in transactions, be aware that this is "leading edge" for SQL Server 2005, and probably for MySQL. On the other hand, Oracle has been doing it for years.

If the data is being streamed in, and timestamped, and stored, you may want to just hold it in memory (32 Gigs holds a lot of data) or write to flat files. For simple data types, that are used in a predictable way, not much beats well-written custom code.

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

#29
post #13
post #11

I chose SQL Server 2005 for Loopt, but that's because at the time I made the choice MySQL didn't meet all my requirements. I should have looked more into PostgreSQL, but didn't. In your case, it sounds like MySQL should work just fine. For fast response times, just partition the data across a lot of cheap servers that can keep it all in RAM. This approach lends itself to a free database. That said, speed will be affe…

> If you go with MySQL or PostgreSQL, be prepared to fix bugs in the ADO connectors from .Net to the database. Likewise for SQL Server and ODBC, but then the bugs are in SQL Server so you can't fix them. However, .NET has a perfectly good ODBC client library. Use that, not ADO, to talk to MySQL.

Oracle has a native driver for .NET.

Google for ODP.NET. If it's anything like as good as their pure Java JDBC drivers, it will perform pretty well.

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

#30
The actual design and implementation of your data model and application are going to be far more important for performance. My suggestion would be to start on MySQL and migrate to another platform if it becomes necessary. You also have to ask what kind of skill sets do you have around and what are you likely to have in the future. A well configured and maintained installation of either platform will out peform a bad one. So are you windows geeks or linux geeks?
Post reply on HN