Re: Query performance question
От | Lukas Ertl |
---|---|
Тема | Re: Query performance question |
Дата | |
Msg-id | 20010328230413.M13216-100000@localhost.localdomain обсуждение исходный текст |
Ответ на | Re: Query performance question (David Olbersen <dave@slickness.org>) |
Список | pgsql-novice |
On Wed, 28 Mar 2001, David Olbersen wrote: > There are two things you should do first: > > 1) VACUUM ANALYZE hits; > 2) VACUUM ANALYZE referrer; I did that before, too. > If it's still running slowly, try EXPLAINing your SELECT to us. Ok, VACUUMing the tables didn't increase performance. This is the EXPLAIN output: httplog=# EXPLAIN SELECT count(*), url FROM hits, referrer WHERE referrer.id = referrer_id GROUP BY url ORDER BY count DESC LIMIT 10; NOTICE: QUERY PLAN: Sort (cost=912.81..912.81 rows=678 width=20) -> Aggregate (cost=846.98..880.90 rows=678 width=20) -> Group (cost=846.98..863.94 rows=6785 width=20) -> Sort (cost=846.98..846.98 rows=6785 width=20) -> Hash Join (cost=10.46..415.17 rows=6785 width=20) -> Seq Scan on hits (cost=0.00..128.85 rows=6785 width=4) -> Hash (cost=9.57..9.57 rows=357 width=16) -> Seq Scan on referrer (cost=0.00..9.57 rows=357 width=16) EXPLAIN I hope someone can explain this to me :) Thanks for your quick answer, regards, le -- Lukas Ertl eMail: l.ertl@univie.ac.at WWW-Redaktion Tel.: (+43 1) 4277-14073 Zentraler Informatikdienst (ZID) Fax.: (+43 1) 4277-9140 der Universität Wien
В списке pgsql-novice по дате отправления: