reindex

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: pgsql-general(at)postgresql(dot)org
Subject: reindex
Date: 2009-12-23 10:00:59
Message-ID: 4B31EA5B.7090208@compulab.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have an aggregate table which is constantly being overwritten. Every
10 minutes or so, the table is erased and populated with new data, most
of which is the same.

Basically a materialized view.

I have been going through some queries that use this table and noticed
that the explain looked different from our test database (a backup of
the prod db) which has the same number of rows and the same type of
data. vacuum analyze did not change anything.

One specific difference I noticed was that it was doing a sequential
scan instead of an index scan.

reindex table changed the prod one to look like the test one.

The indexes are all btree.

After an hour or so the old explain had returned.

Does this make any sense? Should I be doing something different?

Thanks

Sim

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2009-12-23 10:09:54 Re: How to add month.year column validation
Previous Message Raimon Fernandez 2009-12-23 09:24:42 Re: Extended Query, flush or sync ?