Re: Performace Optimization for Dummies

From: "Carlo Stonebanks" <stonec(dot)register(at)sympatico(dot)ca>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performace Optimization for Dummies
Date: 2006-10-03 09:36:23
Message-ID: eftaus$goe$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> 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
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Arnaud Lesauvage 2006-10-03 11:25:10 Poor performance on very simple query ?
Previous Message Carlo Stonebanks 2006-10-03 09:32:24 Re: Performace Optimization for Dummies