That seems to help :). The query takes about 2-5 seconds now (on the linux box with all indexes and fk's). Any tips on further improvement (to make it as fast as MySQL ;) )?
John
Justin Clift <justin@postgresql.org> wrote:
Hi John,
Noticed that you said you hadn't tuned the memory a whole lot.
Have you raised the sort_mem and shared_buffers variables?
For a "quick fix" amount, raising sort_mem to 8192 and shared_buffers to say 500 should help. Not optimal, but better than the defaults.
You'll need to restart PostgreSQL after changing those for them to become effective too.
Hope that helps.
Regards and best wishes,
Justin Clift
-- "My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - Indira Gandhi