Re: help with query speed

From: "Jason Tesser" <JTesser(at)nbbc(dot)edu>
To:
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: help with query speed
Date: 2004-02-13 00:22:24
Message-ID: 04875CB4331F0240A0AD66F970978651011377EE@paul
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

> Hi
>
> > > I have the below query written. I have removed a lot from the
> select
> > > Statement for simplicity sake. The query takes way too long.
> > > I am moving from an Access backend to a Postgres back with
> > > Access in the front. The below query is taking like 14-20 seconds.
> > > Is their a better way I can write the joins. I would think that
> > > Postgres should be fast than Access. BTW I am writing these as
> > > Pass through queries so it is not a problem with Access. I
> > > have Even ran the query directly against Postgres.
> > >
> > > SELECT
> > > tblroster.transcriptlink
> > > FROM
> > > tblroster
> > > FULL OUTER JOIN testclass ON (tblroster.classlink =
> > > testclass.classid)
> > > FULL OUTER JOIN tblqualitypoint ON (tblroster.lettergrade =
> > > tblqualitypoint.letter)
> > > ORDER BY
> > > tblroster.transcriptlink
> >
> > Is there an index on:
> > tblroster.classlink
> >
> > Is there an index on:
> > testclass.classid
> >
> > Is there an index on:
> > tblroster.lettergrade
> >
> > Is there an index on:
> > tblqualitypoint.letter
> >
> > Is there an index on:
> > tblroster.transcriptlink
>
> 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.

You didn't answer my question about whether they are the same types.
Are
they?

Yes they are. I am going to try to get the analyze and vacuum thing
run.
I got an error when I tried to do it. I am the owner of the tables and
Database but I think I need to be owner of some system tables or
Something. Not sure.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if
your
joining column's datatypes do not match

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2004-02-13 01:48:35 Re: Join 2 aggregate queries?
Previous Message Tom Lane 2004-02-13 00:21:09 Re: Temporary views