Re: Postgres performance slowly gets worse over a month

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marc Mitchell" <marcm(at)eisolution(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgres performance slowly gets worse over a month
Date: 2002-07-24 18:06:33
Message-ID: 12704.1027533993@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Marc Mitchell" <marcm(at)eisolution(dot)com> writes:
> 1) Is there any inherit value or "dis-value" to using a partial index in
> this case? Given that 50% of the table has a value the we have no need to
> be supported via an index, is there any reason not to use a partial index?

It probably would be a win, just on the basis of reducing the size and
amount of update activity for the index.

> 2) If we stay in 7.1, would changing the foriegn key field from "NOT NULL"
> (where we currently populate with zero) to nullable (where we would
> populate instead with null) have any effect on performace? The hope would
> be that nulls might be treated differently within the 7.1 stats gathering
> process than non-null values.

In fact they are, and this very likely would be a cleaner solution
anyway. Seems like NULL might be a semantically clearer representation
of the row's status than zero. You could still do something with a
partial index excluding the nulls in 7.2, I think.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Chad R. Larson 2002-07-24 18:30:58 Re: Postgres performance slowly gets worse over a month
Previous Message Marc Mitchell 2002-07-24 18:04:05 Re: Postgres performance slowly gets worse over a month