Fastes database server for...

Hi,

I'm currently building a small rails application that needs to store web traffic information. Similar to google analytics and clicky. (but simpler) It needs to store refer domains and visitors. Integration goes through a small javascript snippet.

My question is: What database server is the fastest and should I use for this app?

I was thinking about SQLlite.

Thanks for your time,

Regards,

Vincent

Vincent Bakker wrote:

Hi,

I'm currently building a small rails application that needs to store web traffic information. Similar to google analytics and clicky. (but simpler) It needs to store refer domains and visitors. Integration goes through a small javascript snippet.

My question is: What database server is the fastest and should I use for this app?

I was thinking about SQLlite.

No! SQLite is not suitable for production use in Web applications, since it doesn't handle concurrency issues well. PostgreSQL should be fast enough if set up properly; you might also consider something like MongoDB.

Thanks for your time,

Regards,

Vincent

Best,

How much traffic are you expecting, how many inserts a minute?

You should simply set up a test and use curl perhaps to call the api and see which database performs best.

Dont use SQLite in production, it’s not designed for that, it’s more of a single user local database. I’d suggest MongoDB for your use-case, but PostgreSQL or MySQL could also be an option.

Best regards

Peter De Berdt

I recently heard about MongoDB, maybe Ill give that one a try.

If I use the Mongo Wrapper does it work the same as if I where using a SQL or MYSQL database?

Vincent Bakker wrote:

I recently heard about MongoDB, maybe Ill give that one a try.

If I use the Mongo Wrapper does it work the same as if I where using a SQL or MYSQL database?

MySQL *is* a SQL database.

Answer: I'm not sure. I suspect it would be at least a little different since the underlying DB is so different, but I've never used Mongo.

But PostgreSQL will work just like any other SQL database.

Best,

Mongomapper uses a slightly different syntax than ActiveRecord, leaning more towards DataMapper. This is quite understandable though, since it’s more apt for a schemaless database. No reason not to use it though.

Best regards

Peter De Berdt