Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 386B12E00C2 for ; Thu, 21 Feb 2008 17:16:27 -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 64210-03-3 for ; Thu, 21 Feb 2008 17:16:22 -0400 (AST) Received: from hs-out-0708.google.com (hs-out-0708.google.com [64.233.178.249]) by postgresql.org (Postfix) with ESMTP id A29F42E00C5 for ; Thu, 21 Feb 2008 17:16:21 -0400 (AST) Received: by hs-out-0708.google.com with SMTP id k27so118818hsc.3 for ; Thu, 21 Feb 2008 13:16:20 -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:content-transfer-encoding:content-disposition:references; bh=WbBj9KEUm/VjWudM7OpIT+WuFqlgNzFlIixDURCd3w0=; b=R6coYWS4qEBTdBad+FocGgQcpnz9clXTPVbnqjsl5ES+DYPQl3oOPmQLICRgNq5znfRPCndhRzN3O7Q30YOOngx04YE/tdY8bxFfkc3eVVs5A2QdO987TJziuSMVUOZoWTO24lHtaZuk8XYYYD0e1wCw/8at0B2Bk9RoC4Xqb+M= 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:content-transfer-encoding:content-disposition:references; b=Z61NcQtLsmBMN+c7XzLrY7Bxhoj1TcK6PxMbeuqZIW+TGfbiJTz44z1izvx8+4xM+J/xC6pEcvqNM3SZ59LVDpCFKezDff6wsYs4iELTzFy94k0esp+/iX5E5wnUv1ouFxxFmHoLxnGzGHlFOebS++edSrTQKaS1wTwckqxhTHU= Received: by 10.100.4.1 with SMTP id 1mr21010186and.103.1203628580463; Thu, 21 Feb 2008 13:16:20 -0800 (PST) Received: by 10.100.228.15 with HTTP; Thu, 21 Feb 2008 13:16:20 -0800 (PST) Message-ID: Date: Thu, 21 Feb 2008 22:16:20 +0100 From: "Claus Guttesen" To: "Adonias Malosso" Subject: Re: 4s query want to run faster Cc: pgsql-performance@postgresql.org In-Reply-To: <8a5d3c890802211311m5fab66d6q865fda1737e47802@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <8a5d3c890802211248k7d9dfbb5ndd645358a84130a7@mail.gmail.com> <8a5d3c890802211311m5fab66d6q865fda1737e47802@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/275 X-Sequence-Number: 28817 > > > why it doesn=B4t use index for the primary keys in the join condition= s? > > > > 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. --=20 regards Claus When lenity and cruelty play for a kingdom, the gentlest gamester is the soonest winner. Shakespeare