Ross,
Thanx to Stephan's help, I found out that after loading the tables w/
data, I had to run vacuum analyze to inform the optimizer of the amount
of data in the table (amongst other things, I imagine). After running
that on all the tables, the query performs fine.
-Brice
"Ross J. Reedstrom"
Brice,
This sounds like a problem with you postgresql install or your HDD
rather than a problem with your query ... which appears to be fine.
I would reccomend taking it up with PGSQL Inc. (or Great Bridge)
pay-for support if this is a commercial project.
Brice -
What does EXPLAIN say for that query? With empty tables, I get two index scans,
a merge join, and two sorts. I'm guessing wildly that you've got a non-optimal
sort strategy happening somehow, given the four fold ORDER BY clause.
Ross
Here's the empty version:
NOTICE: QUERY PLAN:
Sort