Hi Howard,

On 14 Mar 2009, at 10:20, howard chen wrote:

1. I know couchdb is good for simple key-value query, but is couchdb
fast for range requests ? E.g. I want to get all message in between
Add_Time -  Last_Time? How does it compare with MySQL range query on
index?

Yes, CouchDB is extremely fast for range requests. In fact, this is CouchDB's sweet spot. Essentially, CouchDB's views allow you to create a B-Tree index (mapping keys to values) and then retrieve values from a range of keys (in a linear keyspace) very quickly. So, this would be ideal for range requests on documents indexed by time, like in your case. I don't know how comparable such queries are with an equivalent on a MySQL index, but it would certainly be comparable, and CouchDB gives you a lot more for free (flexible schema, replication and in general designed for high scalability) so I would recommend giving it a try.

2. Is Memcached useless if I am using couchdb?

I'm guessing memcached would still be useful as a caching layer to squeeze that extra bit of speed if you have the RAM, but maybe someone else can speak from experience.

--
Jason Davies

www.jasondavies.com

Reply via email to