Hi Kenneth,
It really depends on what you need the database to do.
If the database which your game will be running on will be having a
bunch of people simultaneously using it, then PostgreSQL kicks the crap
out of MySQL.
But, for single user use (i.e. one database on every client system),
MySQL is pretty much WAY faster than PostgreSQL.
We have different coding and optimisation priorities, so there's a
fairly marked difference here.
Also, you need to determine how "important" the game data is, as if you
need to go with MySQL, they have different "table types" which offer
different advantages.
If its data that can afford to be lost without much worry, and you're
using a predominately single-client database system, then MySQL with
it's default table type (can't remember its name) could be your best
choice.
If you're in a single-client database model and the data is important,
MySQL has the InnoDB table type, which is apparently very rugged and is
hard to lose data from, as well as offering the capability of
Transactions, ACID compliance, etc. (You might need to look those terms
up if you're not familiar with them).
Something which has come to light recently is that people which write
the InnoDB table stuff have put out a benchmark page, and it claims to
be more than 10x faster than even the leading proprietory database
vendors, in *every* circumstance. I looked at the page and am very
concerned that they've decided to skip being honest, and do very blatent
bullshit in their benchmark claims. I can't fathom how any database on
the planet could be 10x faster than everything else. Oracle would have
bought them on the spot if that was the case, AND they would have been
able to name their own price. :(
Anyway, SapDB has a good reputation too (another now-Open-Source
database), www.sapdb.com from memory, but I haven't had a chance to use
it.
Hope that help Kenneth.
:-)
Regards and best wishes,
Justin Clift
Kenneth Gangstoe wrote:
>
> Hello!
>
> I'm currently coding a game, using C++ and OpenGL. I need to store
> the game state data into a database, and heard alot of positive
> things about PostgreSQL. As this is a game, speed is critical. I'm
> going to do alot of writing to the database, but seldom much reading
> from it, so I'm mostly interested in write-speeds.
>
> Does anyone have an idea if Postgresql could suit my needs, or should
> I look into other databases (mysql for instance) ?
>
> Best regards,
> Kenneth Gangstø
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi