Re: which will be faster? w/ or w/o indices

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: dev(at)archonet(dot)com, val(at)webtribe(dot)net
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: which will be faster? w/ or w/o indices
Date: 2003-02-07 17:26:22
Message-ID: 200302070926.22649.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Crawford 2003-02-07 18:54:32 Re: bytea
Previous Message Alexander Stanier 2003-02-07 17:07:18 On delete cascade not working