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 11:31:42 -0500
Message-ID: <3637.1204043502@sss.pgh.pa.us> (raw)
In-Reply-To: <669dc9710802260719h61d846b3hd50b7f547bcb82c3@mail.gmail.com>
References: <669dc9710802260719h61d846b3hd50b7f547bcb82c3@mail.gmail.com>

"Laurent Raufaste" <analogue@glop.org> writes:
> I'm having some issues with this simple query:

> SELECT
>   _comment.*,
>   _article.title AS article_title,
>   _article.reference AS article_reference
> FROM
>   _comment
>   INNER JOIN _article
>     ON _article.id = _comment.parent_id
> WHERE
>   _comment.path <@ '0.1.3557034'
> ORDER BY
>   _comment.date_publishing DESC
> OFFSET 0
> LIMIT 5
> ;

> The varying information here is the ltree path "0.1.3557034"

What PG version is this?

If it's 8.2 or later then increasing the stats target for _comment.path
to 100 or more would likely help.

			regards, tom lane



view thread (12+ messages)  latest in thread

Message-ID: <3637.1204043502@sss.pgh.pa.us>
Permalink:  ../3637.1204043502@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3637.1204043502@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: <3637.1204043502@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