Re: 'View'-performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alexander Priem" <ap(at)cict(dot)nl>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: 'View'-performance
Date: 2003-08-14 12:00:49
Message-ID: 15713.1060862449@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Alexander Priem" <ap(at)cict(dot)nl> writes:
> What I am thinking about is creating two views for this table: Table_View a=
> nd Table_History. Table_View would contain all records where "Deleted is nu=
> ll". Table_History would just contain all records (Select * From Table).

> Would " Select * from Table_View Where Name=3D'xxx' " perform worse than " =
> Select * from Table Where deleted is null and Name=3D'xxx' " ?

They'd be exactly the same (modulo a few extra microseconds/milliseconds
for the query planner to expand the view definition).

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff 2003-08-14 12:30:02 Re: Perfomance Tuning
Previous Message Tom Lane 2003-08-14 11:45:46 Re: 7.4 beta 1 getting out of swap