X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0FC649FBD58 for ; Fri, 25 Aug 2006 19:59:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 27855-09 for ; Fri, 25 Aug 2006 19:59:22 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web31809.mail.mud.yahoo.com (web31809.mail.mud.yahoo.com [68.142.207.72]) by postgresql.org (Postfix) with SMTP id 824D09FBD5D for ; Fri, 25 Aug 2006 19:59:18 -0300 (ADT) Received: (qmail 28432 invoked by uid 60001); 25 Aug 2006 22:59:17 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=5DJsMOO4OlXYuc7UOnlOhlp6KU6bosPbgZmk/fIkqiZp8Plr9RsW9W/uUTaje5HeYPvvU5z3V4bWc9J0ZO+MfyLtQ4hUvxV1x9cGTi+0TmN19TWXgBi2kTY6s3yRqDAtmRcCpdcJLt2v0n5/8ozeo3gJkqEh8xUHDtAxMsrnjCw= ; Message-ID: <20060825225917.28430.qmail@web31809.mail.mud.yahoo.com> Received: from [63.203.180.122] by web31809.mail.mud.yahoo.com via HTTP; Fri, 25 Aug 2006 15:59:17 PDT Date: Fri, 25 Aug 2006 15:59:17 -0700 (PDT) From: Richard Broersma Jr Subject: Re: Best way to do this query.. To: Henry Ortega Cc: pgsql-sql@postgresql.org In-Reply-To: <2bffcc330608251343r67a73ab6x51fde94cc74dbdd4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.56 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/205 X-Sequence-Number: 26163 > Yes the data does not change once it is logged. > I am quite new to this whole thing, do you mind elaborating more > about the OLAP data model you mentioned about? Well just to give a generalization using an OLAP as your data model, the data is stored in a denormalized yet defined model. Data integrety is maintained because by definition all records inserted will remain static. Here are some additional links that can be used for getting started: http://en.wikipedia.org/wiki/OLAP http://www.amazon.com/gp/product/0123695120/sr=8-4/qid=1156546075/ref=pd_bbs_4/002-4041472-4877644?ie=UTF8 Another alternative is to create a materialized view that will update itself only when records are inserted or updated. http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html Regards, Richard Broersma Jr.