Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WJkqW-0006YK-Cs for pgsql-sql@arkaria.postgresql.org; Sat, 01 Mar 2014 14:24:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WJkqV-0006yP-Pc for pgsql-sql@arkaria.postgresql.org; Sat, 01 Mar 2014 14:24:55 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WJkqU-0006yI-MC for pgsql-sql@postgresql.org; Sat, 01 Mar 2014 14:24:54 +0000 Received: from zimbra.isdd.sk ([91.233.248.204]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WJkqR-0006hz-8i for pgsql-sql@postgresql.org; Sat, 01 Mar 2014 14:24:54 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.isdd.sk (Postfix) with ESMTP id B74B8AC86A7; Sat, 1 Mar 2014 15:24:48 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.isdd.sk Received: from zimbra.isdd.sk ([127.0.0.1]) by localhost (zimbra.isdd.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UjB6TfFZjT9C; Sat, 1 Mar 2014 15:24:48 +0100 (CET) Received: from zimbra.isdd.sk (zimbra.isdd.sk [91.233.248.204]) by zimbra.isdd.sk (Postfix) with ESMTP id 24DACAC85F8; Sat, 1 Mar 2014 15:24:48 +0100 (CET) Date: Sat, 1 Mar 2014 15:24:47 +0100 (CET) From: Jan Ostrochovsky To: David Johnston Cc: pgsql-sql@postgresql.org Message-ID: <893390760.607836.1393683887897.JavaMail.root@mobiletech.sk> In-Reply-To: <1393605189189-5794066.post@n5.nabble.com> Subject: Re: how to effectively SELECT new "customers" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_607835_1014827662.1393683887896" X-Originating-IP: [10.8.253.141] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - GC33 (Win)/7.2.6_GA_2926) X-Pg-Spam-Score: 0.0 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org ------=_Part_607835_1014827662.1393683887896 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit > I'm not sure what you are going for since you keep adding additional > criteria/constraints to your problem. At this point you are faced > with a > series of trade-offs between caching, speed, and flexibilty, > complexity. I > would suggest you break up your requirements into smaller pieces and > not go > looking for some kind of magic bullet that will solve all your > problems in a > single query. It likely does not exist. > I would also suggest that you look into resources on data warehousing > and > the star schema; doing what you are trying directly within the OLTP > is > probably not the best solution - especially not on front-end servers. > My > experience in this area is thin but maybe someone else can make some > suggestions and/or provide some useful resource links. > David J. Probably you are right. It seems, that there is no such single-query solution, just only with PostgreSQL. I will break it up into smaller pieces. There is medium-tern plan for data-warehousing, just this one task I will solve yet without it. Maybe this is the way to go then: http://www.jaspersoft.com/tour. Thanks. Jano ------=_Part_607835_1014827662.1393683887896 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: times new roman,new york,times,serif; font-size: = 12pt; color: #000000'>
I'm not sure what you are going for since you keep adding additional<= br>criteria/constraints to your problem.  At this point you are faced = with a
series of trade-offs between caching, speed, and flexibilty, comp= lexity.  I
would suggest you break up your requirements into smalle= r pieces and not go
looking for some kind of magic bullet that will solv= e all your problems in a
single query.  It likely does not exist.
I would also suggest that you look into resources on data warehousing= and
the star schema; doing what you are trying directly within the OLTP= is
probably not the best solution - especially not on front-end servers= .  My
experience in this area is thin but maybe someone else can ma= ke some
suggestions and/or provide some useful resource links.

Da= vid J.
Probably you are right. It seems, that there is no s= uch single-query solution, just only with PostgreSQL. I will break it up in= to smaller pieces. There is medium-tern plan for data-warehousing, just thi= s one task I will solve yet without it. Maybe this is the way to go then:&n= bsp;http://www.jaspersoft.com/tour.

Thanks.
Jano
------=_Part_607835_1014827662.1393683887896--