Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7F46C2E005B for ; Thu, 21 Feb 2008 17:11:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 60551-10 for ; Thu, 21 Feb 2008 17:11:17 -0400 (AST) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.185]) by postgresql.org (Postfix) with ESMTP id 3F1D22E00AF for ; Thu, 21 Feb 2008 17:11:17 -0400 (AST) Received: by rv-out-0910.google.com with SMTP id g13so122404rvb.43 for ; Thu, 21 Feb 2008 13:11:16 -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:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=z6DBdv5pKRQ2j26g2CsNIGCbnvfgz2toxUe8502iG9o=; b=Wk6X7eMsMzegeK4vzXcj2i/EbiU3unysOjWmnDgVFiFuG5J6c9IMshmS5bpqFseXS5xthWRRMSP+huoeLjlZzhUZaOUTOnJBOLfCX55xSB/U6bbbYK2hyJ/XP99YVKtX8G1Ugr0msB7UeVyE1kQ8rrk5zFYKJrhC8BHiNGPwZEs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=fv8voM5L48tih4Uj7HAZ3+LW+r6T0qIBERzTGVXyQASN7KZ6zQVpb0dOHEBFKUUwqiHRoiStGxILoccUFwlO9LNgl8nX2k2ahE5mZ1w9BeUHbMZoSN7Obwn0A8spH3uJdTguY4K22vWIEqs6e5qSEMlIYQcRug90sXMYTvPdDM0= Received: by 10.140.207.3 with SMTP id e3mr7038749rvg.262.1203628276133; Thu, 21 Feb 2008 13:11:16 -0800 (PST) Received: by 10.140.171.13 with HTTP; Thu, 21 Feb 2008 13:11:16 -0800 (PST) Message-ID: <8a5d3c890802211311m5fab66d6q865fda1737e47802@mail.gmail.com> Date: Thu, 21 Feb 2008 18:11:16 -0300 From: "Adonias Malosso" To: "Claus Guttesen" Subject: Re: 4s query want to run faster Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6703_33069451.1203628276137" References: <8a5d3c890802211248k7d9dfbb5ndd645358a84130a7@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/274 X-Sequence-Number: 28816 ------=_Part_6703_33069451.1203628276137 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thu, Feb 21, 2008 at 6:10 PM, Claus Guttesen wrote: > > The following query takes about 4s to run in a 16GB ram server. Any > ideas > > why it doesn=B4t use index for the primary keys in the join conditions? > > Maby random_page_cost is set too high? What version are you using? Postgresql v. 8.2.1 > > -- > regards > Claus > > When lenity and cruelty play for a kingdom, > the gentlest gamester is the soonest winner. > > Shakespeare > ------=_Part_6703_33069451.1203628276137 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

On Thu, Feb 21, 2008 at 6:10 PM, Claus G= uttesen <kometen@gmail.com> = wrote:
> The following query takes about 4s to run in a 1= 6GB ram server. Any ideas
> why it doesn=B4t use index for the primary keys in the join conditions= ?

Maby random_page_cost is set too high? What version are you using?

Postgresql v. 8.2.1



--
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare

------=_Part_6703_33069451.1203628276137--