X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B93754758E6 for ; Fri, 7 Feb 2003 12:27:38 -0500 (EST) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id 18125474E4F for ; Fri, 7 Feb 2003 12:27:28 -0500 (EST) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2829200; Fri, 07 Feb 2003 09:26:58 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: dev@archonet.com, val@webtribe.net Subject: Re: which will be faster? w/ or w/o indices Date: Fri, 7 Feb 2003 09:26:22 -0800 User-Agent: KMail/1.4.3 Cc: pgsql-sql@postgresql.org References: <20030207080420.2131718332@cheetah.webtribe.net> <1064.192.168.1.16.1044610614.squirrel@mainbox.archonet.com> In-Reply-To: <1064.192.168.1.16.1044610614.squirrel@mainbox.archonet.com> MIME-Version: 1.0 Message-Id: <200302070926.22649.josh@agliodbs.com> Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/159 X-Sequence-Number: 11557 Val, > Can't really say without testing - it'll depend on the size of the various > tables, X and Y disk speeds etc. The only suggestion I can make is to try > an EXPLAIN (Reference manual, SQL commands) with and without > ENABLE_SEQSCAN off (Admin guide ch 3.2). Please use EXPLAIN ANALYZE instead of just EXPLAIN. That will show you= =20 whether you have performance problems due to things outside of the planner'= s=20 control. Keep in mind, though, that if your system has no special problems and your= =20 planner statistics are up to date, the planner will do a good job of decidi= ng=20 whether or not indexes are faster. You don't need to start out=20 second-guessing the planner ... you're likely to be wrong more often that i= t=20 is. Save that for real problem queries. Also, upgrade to 7.2.4!!! 7.2.1 has several significant bugs, including = two=20 security exploits and one backup-and-restore bug that could make it difficu= lt=20 to recover your database from a backup file. --=20 Josh Berkus Aglio Database Solutions San Francisco