Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 79C879FA47B for ; Tue, 3 Oct 2006 06:36:48 -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 90054-07 for ; Tue, 3 Oct 2006 06:36:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id C34449FA433 for ; Tue, 3 Oct 2006 06:36:44 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id A368E30E1A; Tue, 3 Oct 2006 11:36:42 +0200 (MET DST) From: "Carlo Stonebanks" X-Newsgroups: pgsql.performance Subject: Re: Performace Optimization for Dummies Date: Tue, 3 Oct 2006 05:36:23 -0400 Organization: Hub.Org Networking Services Lines: 32 Message-ID: References: <451D0F67.4040309@logix-tt.com> <45221C1F.3010908@logix-tt.com> X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.066 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200610/28 X-Sequence-Number: 21157 > Maybe "group by", "order by", "distinct on" and hand-written functions > and aggregates (like first() or best()) may help. We use these - we have lexical analysis functions which assign a rating to each row in a set, and the likelyhood that the data is a match, and then we sort our results. I thought this would be the cause of the slowdowns - and it is, but a very small part of it. I have identified the problem code, and the problems are within some very simple joins. I have posted the code under a related topic header. I obviously have a few things to learn about optimising SQL joins. Carlo > > You could combine all relevant columns into an user-defined compund > type, then group by entity, and have a self-defined aggregate generate > the accumulated tuple for each entity. > > Markus > -- > Markus Schaber | Logical Tracking&Tracing International AG > Dipl. Inf. | Software Development GIS > > Fight against software patents in Europe! www.ffii.org > www.nosoftwarepatents.org > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend >