Re: Opptimizing projections containing unused columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus" <kobruleht2(at)hot(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Opptimizing projections containing unused columns
Date: 2008-10-15 17:36:33
Message-ID: 24244.1224092193@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus" <kobruleht2(at)hot(dot)ee> writes:
> Is it OK to put all filters to outer query WHERE clase?
> Or should I move as many filter conditions as possible to inner query so
> that inner query returns 10000 records instead of 500000 records.

> Is there difference in perfomance if inner query returs large number of rows
> which are filtered only by outer query ?

This question is too vague to be answerable --- especially if you want
an answer that applies across all 8.x releases. I'd suggest
experimenting a bit using EXPLAIN ANALYZE to see what happens in your
actual application.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2008-10-15 18:07:28 Re: Optimizing projections containing unused columns
Previous Message Scott Marlowe 2008-10-15 17:22:14 Re: Backup strategies