Re: help with query speed - Mailing list pgsql-general

From Richard Huxton
Subject Re: help with query speed
Date
Msg-id 200402122050.48083.dev@archonet.com
Whole thread Raw
In response to Re: help with query speed  ("Jason Tesser" <JTesser@nbbc.edu>)
List pgsql-general
On Thursday 12 February 2004 19:32, Jason Tesser wrote:
> Hi
>
> > Is there an index on:
> > testclass.classid

> I created the indexes and it speed up a little.  Still a little slower
> than Access though.  Which I think should not be.  The testclass is a view
> not A query so I cannot make an index there.

But you can make one on the underlying table.

> What is the best way to index this stuff? Should I make one index
> (b-tree)
> And add all fkeys and pkey from that table?

You should apply indexes on columns where you need to discriminate amongst
different values quickly.

Anyway - what you need to do here is:
1. Run "VACUUM ANALYZE"
2. Run "EXPLAN ANALYZE SELECT tblroster.transcriptlink ..."
   and post the output here.
   Then we can see what query-plan PG is using.
3. Are you happy that your configuration is well tuned?
   See http://www.varlena.com/varlena/GeneralBits/Tidbits/index.php
   There is a performance tuning article and a breakdown of the config file
there.

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: help with query speed
Next
From: "scott.marlowe"
Date:
Subject: Re: help with query speed