Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 44FF49F97DC for ; Sun, 19 Aug 2007 15:41:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 39284-08 for ; Sun, 19 Aug 2007 15:41:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from fetter.org (start.fetter.org [66.92.188.65]) by postgresql.org (Postfix) with ESMTP id 597319F981A for ; Sun, 19 Aug 2007 15:41:17 -0300 (ADT) Received: by fetter.org (Postfix, from userid 500) id C91F2FBC83F; Sun, 19 Aug 2007 11:41:15 -0700 (PDT) Date: Sun, 19 Aug 2007 11:41:15 -0700 From: David Fetter To: mark overmeer , pgsql-performance@postgresql.org Subject: Re: schema design question Message-ID: <20070819184115.GL28490@fetter.org> References: <20070819181216.GK28490@fetter.org> <20070819182658.GC25214@uio.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070819182658.GC25214@uio.no> User-Agent: Mutt/1.5.14 (2007-02-12) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/198 X-Sequence-Number: 26328 On Sun, Aug 19, 2007 at 08:26:58PM +0200, Steinar H. Gunderson wrote: > On Sun, Aug 19, 2007 at 11:12:16AM -0700, David Fetter wrote: > > There's your mistake. EAV is not performant, and won't become so. > > It sort of depends. I put all the EXIF information for my image > gallery into an EAV table -- it was the most logical format at the > time, although I'm not sure I need all the information. Anyhow, with > clustering and indexes, Postgres zips through the five million > records easily enough for my use -- at least fast enough that I can > live with it without feeling the need for a redesign. Unless your records are huge, that's a tiny database, where tiny is defined to mean that the whole thing fits in main memory with plenty of room to spare. I guarantee that performance will crash right through the floor as soon as any table no longer fits in main memory. > As a general database design paradigm, though, I fully agree with > you. Databases are databases, not glorified OO data stores or hash > tables. Exactly :) Cheers, David. -- David Fetter http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgresql.org/about/donate