From: | Hannes Dorbath <light(at)theendofthetunnel(dot)de> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Yet another question on LIMIT performance :/ |
Date: | 2006-11-06 14:13:10 |
Message-ID: | einfmm$r41$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Though I've read recent threads, I'm unsure if any matches my case.
We have 2 tables: revisions and revisions_active. revisions contains
117707 rows, revisions_active 17827 rows.
DDL: http://hannes.imos.net/ddl.sql.txt
Joining the 2 tables without an additional condition seems ok for me
(given our outdated hardware): http://hannes.imos.net/query_1.sql.txt
What worries me is the performance when limiting the recordset:
http://hannes.imos.net/query_2.sql.txt
Though it should only have to join a few rows it seems to scan all rows.
From experience I thought that adding an ORDER BY on the index columns
should speed it up. But no effect: http://hannes.imos.net/query_3.sql.txt
I'm on 8.1.5, statistics (ANALYZE) are up to date, the tables have each
been CLUSTERed by PK, statistic target for the join columns has been set
to 100 (without any effect).
Thanks in advance!
--
Regards,
Hannes Dorbath
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2006-11-06 14:13:19 | Re: Yet another question on LIMIT performance :/ |
Previous Message | Tobias Brox | 2006-11-06 14:11:49 | Re: Setting "nice" values |