pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurent Raufaste <analogue@glop.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: PG planning randomly ?
Date: Tue, 26 Feb 2008 16:57:16 -0500
Message-ID: <8617.1204063036@sss.pgh.pa.us> (raw)
In-Reply-To: <669dc9710802261205j42250581w9fcc8b2def694650@mail.gmail.com>
References: <669dc9710802260719h61d846b3hd50b7f547bcb82c3@mail.gmail.com>
	<3637.1204043502@sss.pgh.pa.us>
	<669dc9710802260912y7fe58f9epe42fe7eb360119d8@mail.gmail.com>
	<5296.1204048779@sss.pgh.pa.us>
	<669dc9710802261205j42250581w9fcc8b2def694650@mail.gmail.com>

"Laurent Raufaste" <analogue@glop.org> writes:
> 2008/2/26, Tom Lane <tgl@sss.pgh.pa.us>:
>> ... I'm wondering if you have a definition of operator <@
>> that doesn't specify the new selectivity estimator.  Please try a
>> pg_dump -s and see what it shows as the definition of <@.

> Here's the first definition of the <@ operator in my dump:

> CREATE OPERATOR <@ (
>     PROCEDURE = ltree_risparent,
>     LEFTARG = ltree,
>     RIGHTARG = ltree,
>     COMMUTATOR = @>,
>     RESTRICT = ltreeparentsel,
>     JOIN = contjoinsel
> );

That's the right RESTRICT function, but what exactly did you mean by
"first definition"?  Are there more?

It may be that it's just not possible for the estimator to come up with
accurate rowcount estimates given the amount of info it has available.
The query you are complaining about confuses the issue quite a lot by
involving other issues.  Would you try just "explain analyze select 1
from _commment where path <@ '....';" for various typical path values,
and see if it's coming up with estimated rowcounts that are in the right
ballpark compared to the actual ones?

			regards, tom lane



view thread (12+ messages)  latest in thread

Message-ID: <8617.1204063036@sss.pgh.pa.us>
Permalink:  ../8617.1204063036@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8617.1204063036@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, analogue@glop.org
  Subject: Re: PG planning randomly ?
  In-Reply-To: <8617.1204063036@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