Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2C8212E00C2 for ; Thu, 21 Feb 2008 17:23:40 -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 65701-05 for ; Thu, 21 Feb 2008 17:23:37 -0400 (AST) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.188]) by postgresql.org (Postfix) with ESMTP id 756E22E00C5 for ; Thu, 21 Feb 2008 17:23:37 -0400 (AST) Received: by rv-out-0910.google.com with SMTP id g13so124927rvb.43 for ; Thu, 21 Feb 2008 13:23:36 -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=R2isRBUA4Jk8Smiv/i9EEAlbfVDm7ah4QDaE4orK5cs=; b=l0jHm7DCS0pdWDC3IxrBq9p3+ru1Pb4pRHP2dp5q8IcLB/H5c1ybPD5cyke2cusCs1/f0bkS3ZxoondTdz3IyF7WVuaXNEgDH+lml6zu1z17GqkC4bhJeDuWSuy4JN83NfQx2aNjF96LpYvDYMGh9qb7isWys6F3LUdPSR7zODg= 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=sHRH5lH4boH122XP8JvelqeUJTQVyb1+RD2U6avgUnWtEmjn8n/vMYCWUJMoh07GparMQD9R9/2Eg6gWfIq1gg/2c+MS3MmdjFkXyoDWp6yChJ4NjpDNBfcUk9QD2Ovq1SSwEmDcrmyc76CrxjUFRTc0xCGd6325efXccDhCGbE= Received: by 10.140.174.18 with SMTP id w18mr7050749rve.227.1203629016458; Thu, 21 Feb 2008 13:23:36 -0800 (PST) Received: by 10.140.171.13 with HTTP; Thu, 21 Feb 2008 13:23:36 -0800 (PST) Message-ID: <8a5d3c890802211323j2a7e2ebdye42f988222046e44@mail.gmail.com> Date: Thu, 21 Feb 2008 18:23:36 -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_6716_24521658.1203629016447" References: <8a5d3c890802211248k7d9dfbb5ndd645358a84130a7@mail.gmail.com> <8a5d3c890802211311m5fab66d6q865fda1737e47802@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/276 X-Sequence-Number: 28818 ------=_Part_6716_24521658.1203629016447 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Set random_page_cost =3D 2 solved the problem. thanks On Thu, Feb 21, 2008 at 6:16 PM, Claus Guttesen wrote: > > > > 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 > > You can try to lower this value. The default (in 8.3) is 4. > > -- > regards > Claus > > When lenity and cruelty play for a kingdom, > the gentlest gamester is the soonest winner. > > Shakespeare > ------=_Part_6716_24521658.1203629016447 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Set random_page_cost =3D 2 solved the problem. thanks

On Thu, Feb 21, 2008 at 6:16 PM, Claus Guttesen <kometen@gmail.com> wrote:
> > > why it doesn=B4t use index for the pri= mary keys in the join conditions?
> >
> > Maby random_page_cost is set too high? What version are you using= ?
>
> Postgresql v. 8.2.1

You can try to lower this value. The default (in 8.3) is 4.

--
regards
Claus

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

Shakespeare

------=_Part_6716_24521658.1203629016447--