Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9E0AD1337BD6 for ; Wed, 11 May 2011 08:41:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 39582-04 for ; Wed, 11 May 2011 11:41:27 +0000 (UTC) X-Greylist: delayed 00:19:59.601035 by SQLgrey-1.7.6 Received: from 26.mail-out.ovh.net (1.26.mail-out.ovh.net [46.105.43.121]) by mail.postgresql.org (Postfix) with SMTP id 1E594133740B for ; Wed, 11 May 2011 08:41:26 -0300 (ADT) Received: (qmail 32561 invoked by uid 503); 11 May 2011 10:41:16 -0000 Received: from b9.ovh.net (HELO mail620.ha.ovh.net) (213.186.33.59) by 26.mail-out.ovh.net with SMTP; 11 May 2011 10:41:16 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 11 May 2011 13:16:39 +0200 Received: from par69-8-88-161-102-87.fbx.proxad.net (HELO apollo13) (lists%peufeu.com@88.161.102.87) by ns0.ovh.net with SMTP; 11 May 2011 13:16:38 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Merlin Moncure" Cc: "pgsql-performance@postgresql.org" Subject: Re: Postgres NoSQL emulation References: Date: Wed, 11 May 2011 13:14:46 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Pierre C" Message-ID: In-Reply-To: User-Agent: Opera Mail/11.10 (Linux) X-Ovh-Tracer-Id: 8076642983295845982 X-Ovh-Remote: 88.161.102.87 (par69-8-88-161-102-87.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201105/146 X-Sequence-Number: 43655 > why even have multiple rows? just jam it all it there! :-D LOL But seriously, when using an ORM to stuff an object hierarchy into a database, you usually get problems with class inheritance, and all solutions suck more or less (ie, you get a zillion tables, with assorted pile of JOINs, or stinky key/attributes schemes where all attributes end up as TEXT, or a table with 200 columns, most of them being NULL for a given line). NoSQL guys say "hey just use NoSQL !". In a (common) case where the classes have some fields in common and othen searched, and that the DB needs to know about and access easily, those become columns, with indexes. Then the other fields which only occur in some derived class and are not very interesting to the DB get shoved into a hstore. The big bonus being that you use only one table, and the "extra" fields can still be accessed and indexed (but a little slower than a normal column). However I believe hstore can only store TEXT values... Could be interesting. Or not.