From: Dawid Kuroczko <qnex42@gmail.com>
To: weigelt@metux.de
To: pgsql-performance@postgresql.org
Subject: Re: immutable functions vs. join for lookups ?
Date: Fri, 22 Apr 2005 12:08:50 +0200
Message-ID: <758d5e7f0504220308453c0dbc@mail.gmail.com> (raw)
In-Reply-To: <20050421192357.GC16548@nibiru.borg.metux.de>
References: <6EE64EF3AB31D5448D0007DD34EEB3415C2596@Herge.rcsinc.local>
<22219.1113839449@sss.pgh.pa.us>
<87u0m4j5p0.fsf@stark.xeocode.com>
<25151.1113853826@sss.pgh.pa.us>
<20050421192357.GC16548@nibiru.borg.metux.de>
On 4/21/05, Enrico Weigelt <weigelt@metux.de> wrote:
> * Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> <snip>
> > Yeah, I was actually thinking about a two-step process: inline the
> > function to produce somethig equivalent to a handwritten scalar
> > sub-SELECT, and then try to convert sub-SELECTs into joins.
>
> ... back to my original question ...
>
> What kind of query should I use ?
> Is a join better than a function ?
It appears that JOINs are usually faster. So if performance is an
important issue, go with JOIN (and VIEWs probably). Functions are nicer
(in terms off look and feel).
Regards,
Dawid
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: qnex42@gmail.com, weigelt@metux.de
Subject: Re: immutable functions vs. join for lookups ?
In-Reply-To: <758d5e7f0504220308453c0dbc@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox