Re: Query performance question - Mailing list pgsql-novice

From David Olbersen
Subject Re: Query performance question
Date
Msg-id Pine.LNX.4.31.0103281252320.10824-100000@bubbles.electricutopia.net
Whole thread Raw
In response to Query performance question  (Lukas Ertl <l.ertl@univie.ac.at>)
Responses Re: Query performance question
List pgsql-novice
On Wed, 28 Mar 2001, Lukas Ertl wrote:

There are two things you should do first:

1) VACUUM ANALYZE hits;
2) VACUUM ANALYZE referrer;

If it's still running slowly, try EXPLAINing your SELECT to us.

Also, it's been my experience that LIMIT's slow down a query, though I could be
dead wrong.


> SELECT count(*), url FROM hits, referrer WHERE referrer.id = referrer_id
> GROUP BY url ORDER BY count DESC LIMIT 10;
>
> And this query takes almost five seconds to complete, and that seems to me
> quite slow. The database is running on a Duron 700 with 256 MB RAM and
> ATA-66 disks. Operating system is FreeBSD-4.2.
>
> Are there some tuning knobs I could turn?

-- Dave


pgsql-novice by date:

Previous
From: Lukas Ertl
Date:
Subject: Query performance question
Next
From: Lukas Ertl
Date:
Subject: Re: Query performance question