Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 95532 invoked from network); 14 Oct 2008 16:47:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Oct 2008 16:47:00 -0000 Received: (qmail 82560 invoked by uid 500); 14 Oct 2008 16:47:00 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 82359 invoked by uid 500); 14 Oct 2008 16:47:00 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 82348 invoked by uid 99); 14 Oct 2008 16:47:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Oct 2008 09:47:00 -0700 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Oct 2008 16:45:54 +0000 Received: by fg-out-1718.google.com with SMTP id l26so1641509fgb.26 for ; Tue, 14 Oct 2008 09:46:18 -0700 (PDT) Received: by 10.187.227.5 with SMTP id e5mr1052279far.63.1224002778186; Tue, 14 Oct 2008 09:46:18 -0700 (PDT) Received: by 10.187.238.13 with HTTP; Tue, 14 Oct 2008 09:46:18 -0700 (PDT) Message-ID: Date: Tue, 14 Oct 2008 17:46:18 +0100 From: "Nick Johnson" To: couchdb-user@incubator.apache.org Subject: Re: When to use CouchDB, when not to... In-Reply-To: <6FC329DB-6EC2-49BE-9DFF-A030767CEC45@apache.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11778_28584382.1224002778189" References: <521183240810111938s2d60320fo30e47cdf22acc7d4@mail.gmail.com> <521183240810121228u3eef309dw7e44141701401e4e@mail.gmail.com> <6FC329DB-6EC2-49BE-9DFF-A030767CEC45@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_11778_28584382.1224002778189 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Oct 14, 2008 at 4:35 PM, Jan Lehnardt wrote: > > On Oct 12, 2008, at 21:28 , Lance Pollard wrote: > >> Just some thoughts on how and when to use Couch vs. MySQL. Any answers to >> this question would really help out a ton. >> > > My take on this is that the structure of the data is less important but the > types of queries you want to run are. CouchDB can handled structured, > unstructured, often- & lesser-frequent updated data just fine. An RDBMS > will only go so far providing performance on unstructured data. There's > a small sweet spot for CouchDB. > > The bigger thing though is that an RDBMS handles dynamic queries > quite well and CouchDB doesn't. A dynamic query is a query that a > developer can't predict when developing / deploying a system. CouchDB > views let you mimic dynamic queries a great deal, but you need to be > able to anticipate what sorts of queries are run and on which properties > they should be run against. If you run into a situation where you need > to create a new view on-the-fly for immediate consumption or even think > about using temporary views, you need to make sure your data set is > rather small; more likely though is that CouchDB is not the right choice. > (Yes, if you query an RDBMS on an unindexed column, you are in trouble > as well. Still.) A caveat: RDBMSes handle 'dynamic' queries as well as one can expect, but in my experience, at least, poor planning on the part of developers for what queries will be executed is part of what leads to extremely poor RDBMS performance in many situations. Thus, not supporting it actually forces developers to think about the queries they're executing and how they can be efficiently satisfied. On the downside, the answer to that is frequently to implement your own limited query planner for 'dynamic' situations. > > Luckily, views are flexible enough that I'd like to apply the 80/20 rule > and > say they solve most of our user's problems, but I haven't made a scientific > analysis yet, so you have to take my word for it :) > > Additionally, the plugin API that Damien, Paul and Chris are working on > lets you hook up other index/search solutions that can complement > CouchDB where views are not enough. This will nicely solve the sync- > issue that can (will) arise in a hybrid setup. (Not saying a MySQL + > CouchDB approach is bad, its just hard :) > > Cheers > Jan > -- > > > > ------=_Part_11778_28584382.1224002778189--