Re: 'View'-performance - Mailing list pgsql-performance

From Tom Lane
Subject Re: 'View'-performance
Date
Msg-id 15713.1060862449@sss.pgh.pa.us
Whole thread Raw
In response to 'View'-performance  ("Alexander Priem" <ap@cict.nl>)
List pgsql-performance
"Alexander Priem" <ap@cict.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

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.4 beta 1 getting out of swap
Next
From: Jeff
Date:
Subject: Re: Perfomance Tuning