Views, indexes and date stamps - Mailing list pgsql-novice

From Todd Lewis
Subject Views, indexes and date stamps
Date
Msg-id 432A6878.7020805@sbcglobal.net
Whole thread Raw
List pgsql-novice
I've recently broken down one of my larger tables into 2 tables for
performance reasons. One table contains current information and the
second table contains older historical information. I've created a view
that unions the two tables together. I created the view with a Select *
from table_1 union select * from table_2. I have the same columns
indexed in each table. Does a query using the view take advantage of the
indexes on a table? I'm currently using 7.4.7.

Also one of the queries I run repeatedly uses one indexed column and a
date stamp column. I retrieve the max date stamp for a particular type
of transaction so that I can retrieve the items last activity. Is there
any benefit from indexing a date stamp column? These tables combined
have about 13 million records. It grows about 1 million records a month.
Will I get better performance with a second view that only contains the
columns that this query needs?

pgsql-novice by date:

Previous
From: "Walker, Jed S"
Date:
Subject: Re: Is a table temporary
Next
From: Ennio-Sr
Date:
Subject: pg_dump: relation "..." already exists warning