pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Arjen van der Meijden <acmmailing@tweakers.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Inefficient queryplan for query with intersectable
Date: Sat, 27 Aug 2005 10:27:01 -0400
Message-ID: <1116.1125152821@sss.pgh.pa.us> (raw)
In-Reply-To: <4310456F.8040303@tweakers.net>
References: <430EF844.70905@tweakers.net>
	<430F1393.5040704@archonet.com>
	<430F8699.3030400@tweakers.net>
	<26436.1125096976@sss.pgh.pa.us>
	<4310456F.8040303@tweakers.net>

Arjen van der Meijden <acmmailing@tweakers.net> writes:
> But appareantly there is a bug in the explain mechanism of the 8.1devel 
> I'm using (I downloaded a nightly 25 august somewhere in the morning 
> (CEST)), since it returned:
> ERROR:  bogus varno: 9

Yeah, someone else sent in a test case for this failure (or at least one
with a similar symptom) yesterday.  I'll try to fix it today.

> Is a nested loop normally so much (3x) more costly than a hash join? Or 
> is it just this query that gets estimated wronly?

There's been some discussion that we are overestimating the cost of
nestloops in general, because we don't take into account that successive
scans of the inner relation are likely to find many pages already in
cache from the earlier scans.  So far no one's come up with a good cost
model to use for this, though.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <1116.1125152821@sss.pgh.pa.us>
Permalink:  ../1116.1125152821@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1116.1125152821@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, acmmailing@tweakers.net
  Subject: Re: Inefficient queryplan for query with intersectable
  In-Reply-To: <1116.1125152821@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