From: Laurent Raufaste <analogue@glop.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: PG planning randomly ?
Date: Tue, 26 Feb 2008 21:05:24 +0100
Message-ID: <669dc9710802261205j42250581w9fcc8b2def694650@mail.gmail.com> (raw)
In-Reply-To: <5296.1204048779@sss.pgh.pa.us>
References: <669dc9710802260719h61d846b3hd50b7f547bcb82c3@mail.gmail.com>
<3637.1204043502@sss.pgh.pa.us>
<669dc9710802260912y7fe58f9epe42fe7eb360119d8@mail.gmail.com>
<5296.1204048779@sss.pgh.pa.us>
2008/2/26, Tom Lane <tgl@sss.pgh.pa.us>:
> "Laurent Raufaste" <analogue@glop.org> writes:
>
> > 2008/2/26, Tom Lane <tgl@sss.pgh.pa.us>:
>
> >> If it's 8.2 or later then increasing the stats target for _comment.path
> >> to 100 or more would likely help.
>
> > I'm using PG 8.2.4.
> > We are using 100 as default_statistics_target by default and all our
> > column are using this value:
>
>
> Hmm, that ought to be enough to activate the better selectivity
> estimator.
>
> Unless ... did you update this database from a pre-8.2 DB that already
> had contrib/ltree in it? If so, did you just load the existing old
> definition of ltree as part of your dump, or did you install 8.2's
> version fresh? 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 <@.
>
> regards, tom lane
>
Here's the first definition of the <@ operator in my dump:
--
-- Name: <@; Type: OPERATOR; Schema: public; Owner: postgres
--
CREATE OPERATOR <@ (
PROCEDURE = ltree_risparent,
LEFTARG = ltree,
RIGHTARG = ltree,
COMMUTATOR = @>,
RESTRICT = ltreeparentsel,
JOIN = contjoinsel
);
ALTER OPERATOR public.<@ (ltree, ltree) OWNER TO postgres;
Our data was created on an older PG (8.1.x) but we installed 8.2.x
from scratch, only dumping the schema and the data in it. I used ltree
found in the 8.2.4 source.
Do you think an update of ltree, or better of the database will fix
the problem ?
We plan on upgrading to the 8.3 branch in the next weeks, but this
behavior can't wait this much as our servers are overburned from time
to time =(
Thanks for your help ;)
--
Laurent Raufaste
<http://www.glop.org/;
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: analogue@glop.org, tgl@sss.pgh.pa.us
Subject: Re: PG planning randomly ?
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>
* 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