X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id F185ED1E820 for ; Mon, 19 Jan 2004 02:21:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 90557-09 for ; Sun, 18 Jan 2004 22:21:03 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id D67BBD1E800 for ; Sun, 18 Jan 2004 22:20:59 -0400 (AST) 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 i0J2L0pH018214; Sun, 18 Jan 2004 21:21:00 -0500 (EST) To: Ceri Storey Cc: Ceri Storey , Stephan Szabo , pgsql-performance@postgresql.org Subject: Re: Join optimisation Quandry In-reply-to: <20040117115826.GD43530@mrtall.compsoc.man.ac.uk> References: <20040114231014.GE53284@mrtall.compsoc.man.ac.uk> <20040116094935.P66040@megazone.bigpanda.com> <20040117010334.GA43530@mrtall.compsoc.man.ac.uk> <20040117115826.GD43530@mrtall.compsoc.man.ac.uk> Comments: In-reply-to Ceri Storey message dated "Sat, 17 Jan 2004 11:58:26 +0000" Date: Sun, 18 Jan 2004 21:21:00 -0500 Message-ID: <18213.1074478860@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/192 X-Sequence-Number: 5366 Ceri Storey writes: > Although, as I've just found, another bottleneck is the title table. > PostgreSQL seems to inst on doing a Seq Scan on the entire table. > -> Seq Scan on tid (cost=0.00..20.00 rows=1000 width=8) (actual time=0.028..10.457 rows=17 loops=1) It doesn't look like you've ever vacuumed or analyzed "tid" --- those are the default cost and rows estimates. Although I'm unsure whether the plan would change much if you had. regards, tom lane