pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: dev@archonet.com
To: val@webtribe.net
Cc: pgsql-sql@postgresql.org
Subject: Re: which will be faster? w/ or w/o indices
Date: Fri, 7 Feb 2003 09:26:22 -0800
Message-ID: <200302070926.22649.josh@agliodbs.com> (raw)
In-Reply-To: <1064.192.168.1.16.1044610614.squirrel@mainbox.archonet.com>
References: <20030207080420.2131718332@cheetah.webtribe.net>
	<1064.192.168.1.16.1044610614.squirrel@mainbox.archonet.com>

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 
whether you have performance problems due to things outside of the planner's 
control.

Keep in mind, though, that if your system has no special problems and your 
planner statistics are up to date, the planner will do a good job of deciding 
whether or not indexes are faster.   You don't need to start out 
second-guessing the planner ... you're likely to be wrong more often that it 
is.   Save that for real problem queries.

Also, upgrade to 7.2.4!!!    7.2.1 has several significant bugs, including two 
security exploits and one backup-and-restore bug that could make it difficult 
to recover your database from a backup file.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (3+ messages)

Message-ID: <200302070926.22649.josh@agliodbs.com>
Permalink:  ../200302070926.22649.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200302070926.22649.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, dev@archonet.com, val@webtribe.net
  Subject: Re: which will be faster? w/ or w/o indices
  In-Reply-To: <200302070926.22649.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox