X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 611E1D1B52A for ; Wed, 1 Oct 2003 22:20:31 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 28867-08 for ; Wed, 1 Oct 2003 19:19:47 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 34012D1B50B for ; Wed, 1 Oct 2003 19:19:44 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h91MJhhn010131; Wed, 1 Oct 2003 18:19:43 -0400 (EDT) To: Oleg Lebedev Cc: Josh Berkus , "scott.marlowe" , "pgsql-performance@postgresql.org" Subject: Re: TPC-R benchmarks In-reply-to: <993DBE5B4D02194382EC8DF8554A52731D761E@postoffice.waterford.org> References: <993DBE5B4D02194382EC8DF8554A52731D761E@postoffice.waterford.org> Comments: In-reply-to Oleg Lebedev message dated "Wed, 01 Oct 2003 15:02:43 -0600" Date: Wed, 01 Oct 2003 18:19:43 -0400 Message-ID: <10130.1065046783@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/40 X-Sequence-Number: 3788 Oleg Lebedev writes: > All right, my query just finished running with EXPLAIN ANALYZE. > I show the plan below and also attached it as a file. > Any ideas? Uh, have you done an ANALYZE (or VACUUM ANALYZE) on this database? It sure looks like the planner thinks the tables are a couple of orders of magnitude smaller than they actually are. Certainly the estimated sizes of the joins are way off :-( If you did analyze, it might help to increase the statistics target and re-analyze. regards, tom lane