# Fastes database server for

**URL:** <https://www.ruby-forum.com/t/fastes-database-server-for/182896>\
**Category:** Rails\
**Created:** [February 4, 2010, 2:18pm UTC](https://www.ruby-forum.com/t/fastes-database-server-for/182896 "2010-02-04T14:18:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pubclub](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3d9bf3/32.png) [@pubclub](https://www.ruby-forum.com/u/pubclub)\
**Post date:** [February 4, 2010, 2:18pm UTC](https://www.ruby-forum.com/t/fastes-database-server-for/182896/1 "2010-02-04T14:18:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pubclub](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3d9bf3/32.png) [@pubclub](https://www.ruby-forum.com/u/pubclub)\
**Post date:** [February 4, 2010, 2:47pm UTC](https://www.ruby-forum.com/t/fastes-database-server-for/182896/2 "2010-02-04T14:47:55Z")

</div>

Vincent B. 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,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![pubclub](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3d9bf3/32.png) [@pubclub](https://www.ruby-forum.com/u/pubclub)\
**Post date:** [February 4, 2010, 2:51pm UTC](https://www.ruby-forum.com/t/fastes-database-server-for/182896/3 "2010-02-04T14:51:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pubclub](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3d9bf3/32.png) [@pubclub](https://www.ruby-forum.com/u/pubclub)\
**Post date:** [February 4, 2010, 5:36pm UTC](https://www.ruby-forum.com/t/fastes-database-server-for/182896/4 "2010-02-04T17:36:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pubclub](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3d9bf3/32.png) [@pubclub](https://www.ruby-forum.com/u/pubclub)\
**Post date:** [February 4, 2010, 5:10pm UTC](https://www.ruby-forum.com/t/fastes-database-server-for/182896/5 "2010-02-04T17:10:32Z")

</div>

On 04 Feb 2010, at 14:18, Vincent B. wrote:

> I was thinking about SQLlite.

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

---

<div class="post-metadata">

**Author:** ![pubclub](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3d9bf3/32.png) [@pubclub](https://www.ruby-forum.com/u/pubclub)\
**Post date:** [February 4, 2010, 5:46pm UTC](https://www.ruby-forum.com/t/fastes-database-server-for/182896/6 "2010-02-04T17:46:48Z")

</div>

Vincent B. 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,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![pubclub](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3d9bf3/32.png) [@pubclub](https://www.ruby-forum.com/u/pubclub)\
**Post date:** [February 4, 2010, 6:09pm UTC](https://www.ruby-forum.com/t/fastes-database-server-for/182896/7 "2010-02-04T18:09:39Z")

</div>

On 04 Feb 2010, at 17:36, Vincent B. 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?

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
