From: Christopher Browne <cbbrowne@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: avoiding seqscan?
Date: Mon, 29 Sep 2003 11:12:55 -0400
Message-ID: <60vfrbzkzs.fsf@dev6.int.libertyrms.info> (raw)
References: <95900000.1064782481@palle.girgensohn.se>
<3F7766B3.4030705@bigfoot.com>
<180710000.1064841936@durian.pingpong.net>
girgen@pingpong.net (Palle Girgensohn) writes:
> Will that make a difference? From what I've seen, it does not make
> much difference, but I have seen queries speed up when rewritten
> explicit joins. I guess it depends on other things, but is it really
> so that the explicit joins are bad somehow? Do you have any pointers
> to documentation about it, if so?
The problem is that if you expressly specify the joins, the query
optimizer can't choose its own paths. And while that may not be
better at the moment, it is quite possible that when you upgrade to a
newer version, those queries, if "not join-specified," could
immediately get faster.
I would expect that the query that uses implicit joins will be clearer
to read, which adds a little further merit to that direction.
That goes along with the usual way that it is preferable to optimize
things, namely that you should start by solving the problem as simply
as you can, and only proceed to further optimization if that actually
proves necessary. Optimization efforts commonly add complexity and
make code more difficult to maintain; that's not the place to start if
you don't even know the effort is necessary.
--
(format nil "~S@~S" "cbbrowne" "libertyrms.info")
<http://dev6.int.libertyrms.com/;
Christopher Browne
(416) 646 3304 x124 (land)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: cbbrowne@libertyrms.info
Subject: Re: avoiding seqscan?
In-Reply-To: <60vfrbzkzs.fsf@dev6.int.libertyrms.info>
References: <95900000.1064782481@palle.girgensohn.se> <3F7766B3.4030705@bigfoot.com> <180710000.1064841936@durian.pingpong.net> <60vfrbzkzs.fsf@dev6.int.libertyrms.info>
* 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