Re: cost of CREATE VIEW ... AS SELECT DISTINCT

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: T E Schmitz <mailreg(at)numerixtechnology(dot)de>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, pgsql-sql(at)postgresql(dot)org
Subject: Re: cost of CREATE VIEW ... AS SELECT DISTINCT
Date: 2005-03-29 15:07:10
Message-ID: 20050329150710.GB32031@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, Mar 29, 2005 at 15:12:24 +0100,
T E Schmitz <mailreg(at)numerixtechnology(dot)de> wrote:
>
> Shall do.
> But am I correct in assuming that I should place an index on the group
> by (TRANSAKTION.ORIGIN) column?

This will mainly help when joining the view to another table. This would
also allow using an index scan instead of a sort in for DISTINCT which
may be faster in some cases.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-03-29 15:54:08 Re: cost of CREATE VIEW ... AS SELECT DISTINCT
Previous Message Bruno Wolff III 2005-03-29 15:04:18 Re: cost of CREATE VIEW ... AS SELECT DISTINCT