User: Password:
|
|
Subscribe / Log in / New account

The birth of the open source enterprise stack

The birth of the open source enterprise stack

Posted Jun 29, 2006 6:01 UTC (Thu) by jwb (guest, #15467)
In reply to: The birth of the open source enterprise stack by dmantione
Parent article: The birth of the open source enterprise stack

Well, I'd be happy to introduce you to some of these applications. For an example, I have written a system which caches the information about the last trade of hundreds of thousands of stocks. During active trading, this information comes at the rate of thousands of updates per second. The amount of information to be stored is basically fixed, as there are a fixed number of stocks to be traded. In MySQL, the database size stays nice and constant, I get atomic updates, and I also get a transaction rate up to 10k/sec on hardware costing less than $2000.

If I were to use PostgreSQL for this load, I would end up with a huge, ever-growing file, because updates are handled like inserts. I would have an always-running VACUUM process, but the file would probably grow slightly at peak times anyway. I would likely have unbounded index growth, as VACUUM does not reclaim index space (only REINDEX does this, and it requires exclusive access in some versions). In all likelihood, I would need a nightly maintenance period, which I can't afford because there are stock markets all over the planet.

So there's an example of a load where you'd better use MySQL.


(Log in to post comments)

The birth of the open source enterprise stack

Posted Jun 29, 2006 16:08 UTC (Thu) by dskoll (subscriber, #1630) [Link]

If I were to use PostgreSQL for this load, I would end up with a huge, ever-growing file, because updates are handled like inserts.

Correct, sort-of. VACUUM would reclaim the space.

I would likely have unbounded index growth, as VACUUM does not reclaim index space

This is no longer true. Since 8.0 (and possibly since 7.4), VACUUM reclaims index space.

The birth of the open source enterprise stack

Posted Jun 30, 2006 17:07 UTC (Fri) by nix (subscriber, #2304) [Link]

... and therefore so does the autovacuum daemon in 8.1+.

The birth of the open source enterprise stack

Posted Jul 4, 2006 7:57 UTC (Tue) by nlucas (subscriber, #33793) [Link]

You might want to check SQLite for this kind of applications.
No server setup as it's only a library using a single file as a database, but *very* fast (but ACID by default, so you need to know how to make it fast).

It's not good for multiple simultaneous writers, because it locks the entire database on a write, but most applications only write once and read many.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds