Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 393FE2E009D for ; Tue, 26 Feb 2008 11:35:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 07354-08 for ; Tue, 26 Feb 2008 11:34:56 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by postgresql.org (Postfix) with ESMTP id 66C5B2E0049 for ; Tue, 26 Feb 2008 11:35:05 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d37so3981151pye.29 for ; Tue, 26 Feb 2008 07:35:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=MayfYHY9sL5X2wl6mglVAqeej1T1YeYHQjtI9c4uOu8=; b=fqrgWSHaZS51HTWyt2AyBYYjGHNGABe8hdqogKglRiS/Ejs7MEoG8gFOohKm7PLtNQflTrv0+KKQ47HPvZMjqVyYU3WTo7Vm74kh+i7KrcnYgwxrSwk2LhyGtLOpcuRLOWV+yCCRrjqwrYs4bFkShwdL3veg61pcgYtNgxDeBoo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=hrCSF3NjClwbNVny1pkGQXc9mk9ufpZO+cbsalELgMQPqMoz9egLK0bBHq8hqXRJ86GHPRiswYjd2UAjP4RWFjWoGRYJN+uYUkwtW7xe9JxvH9h4ruUbI7mcgUcEWjE+tX8mpXkmU9b3x+g3syH0JWLjgwZAioOdD2zoW6RG9/g= Received: by 10.65.234.2 with SMTP id l2mr9445199qbr.37.1204040103756; Tue, 26 Feb 2008 07:35:03 -0800 (PST) Received: by 10.65.38.3 with HTTP; Tue, 26 Feb 2008 07:35:03 -0800 (PST) Message-ID: <669dc9710802260735y2fb72ec9l2aa70c12c6636ea0@mail.gmail.com> Date: Tue, 26 Feb 2008 16:35:03 +0100 From: "Laurent Raufaste" To: pgsql-performance@postgresql.org Subject: Re: PG planning randomly ? In-Reply-To: <669dc9710802260719h61d846b3hd50b7f547bcb82c3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <669dc9710802260719h61d846b3hd50b7f547bcb82c3@mail.gmail.com> X-Google-Sender-Auth: 28db33cf4cba54ff X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200802/341 X-Sequence-Number: 28883 2008/2/26, Laurent Raufaste : > 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