pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: Roman Fail <rfail@posportal.com>
Cc: sszabo@megazone23.bigpanda.com
Cc: pgsql-performance@postgresql.org
Subject: Re: 7.3.1 New install, large queries are slow
Date: Thu, 16 Jan 2003 13:40:32 -0500
Message-ID: <26146.1042742432@sss.pgh.pa.us> (raw)
In-Reply-To: <web-2316240@davinci.ethosmedia.com>
References: <web-2316240@davinci.ethosmedia.com>

"Josh Berkus" <josh@agliodbs.com> writes:
>> but at least for these WHERE conditions, it looks like the best bet
>> would to join m to b (I'm assuming m.merchid is unique), then to t,
>> then to d, then add on the others.

> I realize that I've contributed nothing other than bug reports to the
> parser design.  But shouldn't Postgres, given a free hand, figure out
> the above automatically?

I believe it will.  So far I've not seen an EXPLAIN from a query that
was structured to give it a free hand.

As noted elsewhere, the fact that we allow JOIN syntax to constrain the
planner is a real pain if you are accustomed to databases that don't do
that.  On the other hand, it's a real lifesaver for people who need to
pare the planning time for dozen-way joins; it was only a day or two
back in this same mailing list that we last had a discussion about that
end of the problem.  So even though it started out as an implementation
shortcut rather than an intended feature, I'm loathe to just disable the
behavior entirely.

			regards, tom lane



view thread (66+ messages)  latest in thread

Message-ID: <26146.1042742432@sss.pgh.pa.us>
Permalink:  ../26146.1042742432@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26146.1042742432@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, josh@agliodbs.com, rfail@posportal.com, sszabo@megazone23.bigpanda.com
  Subject: Re: 7.3.1 New install, large queries are slow
  In-Reply-To: <26146.1042742432@sss.pgh.pa.us>
  References: <web-2316240@davinci.ethosmedia.com> <26146.1042742432@sss.pgh.pa.us>

* 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