Re: PG planning randomly ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/2/26, Laurent Raufaste <analogue@xxxxxxxx>:
> Hi,
>
>  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
>  ;

I forgot the table definition, here it is ;)

                                              Table "ob2._comment"
      Column       |            Type             |
     Modifiers
-------------------+-----------------------------+--------------------------------------------------------------
 id                | bigint                      | not null default
nextval('element_id_sequence'::regclass)
 parent_id         | bigint                      |
 path              | ltree                       |
 data              | text                        |
 date_creation     | timestamp without time zone | not null default now()
 date_publishing   | timestamp without time zone | not null default now()
 date_modification | timestamp without time zone | not null default now()
 counters          | hstore                      |
 reference         | integer                     | not null default
nextval('_comment_reference_seq'::regclass)
 text              | text                        |
Indexes:
    "_comment_pkey" PRIMARY KEY, btree (id), tablespace "indexspace"
    "gist_idx_comment_path" gist (path), tablespace "indexspace"
    "idx_comment_date_creation" btree (date_creation), tablespace "indexspace"
    "idx_comment_date_publishing" btree (date_publishing), tablespace
"indexspace"
    "idx_comment_parent_id" btree (parent_id), tablespace "indexspace"
    "idx_comment_reference" btree (reference), tablespace "indexspace"
Inherits: _element

Thanks for looking into ou problem !

-- 
Laurent Raufaste
<http://www.glop.org/>

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux