Re: Optimization via explicit JOINs

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: David Olbersen <dave(at)slickness(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Optimization via explicit JOINs
Date: 2001-03-09 22:13:35
Message-ID: Pine.BSF.4.21.0103091409300.82014-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Fri, 9 Mar 2001, David Olbersen wrote:

> Greetings,
> I've been toying aroudn with postgres 7.1beta5's ability to control the
> planner via explicitely JOINing tables. I then (just for giggles) compare the
> difference in the EXPLAIN results.
>
> I'm no super-mondo-DBA or anything, but in my two attempts so far, the numbers
> I get out of EXPLAIN have been about 1/2 as small.
>
> Below are two EXPLAIN results, am I correct in reading that one is indeed
> "twice as fast" as the other? I say twice as fast because the top-most cost in
> the first query is 58.62, but in the second one it's only 32.09. Am I reading
> this correctly?

Not entirely. Those are only estimates, so they don't entirely line up
with reality. Also, I notice the first estimates 14 rows and the second
1, which is probably why the estimate is higher. In practice it probably
won't be significantly different.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message David Olbersen 2001-03-09 22:47:08 Re: Optimization via explicit JOINs
Previous Message David Olbersen 2001-03-09 22:00:56 Optimization via explicit JOINs