[PERFORM] Simple join optimized badly?

2006-10-07 Thread Craig A. James
I have two tables, SAMPLE and HITLIST that when joined, generate a monsterous sort. HITLIST_ROWS has about 48,000 rows SAMPLE has about 16 million rows The joined column is indexed in SAMPLE HITLIST_ROWS is a scratch table which is used a few times then discarded. HITLIST_ROWS has no

Re: [PERFORM] Simple join optimized badly?

2006-10-07 Thread Tom Lane
Craig A. James [EMAIL PROTECTED] writes: There are two plans below. The first is before an ANALYZE HITLIST_ROWS, and it's horrible -- it looks to me like it's sorting the 16 million rows of the SEARCH table. Then I run ANALYZE HITLIST_ROWS, and the plan is pretty decent. It would be

Re: [PERFORM] Simple join optimized badly?

2006-10-07 Thread Denis Lussier
Wouldn't PG supporting simple optmizer hints get around this kinda problem? Seems to me that at least one customer posting per week would be solved via the use of simple hints. If the community is interested... EnterpriseDB has added support for a few different simple types of hints (optimize