pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marc Mitchell <marcm@eisolution.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Postgres performance slowly gets worse over a month
Date: Wed, 24 Jul 2002 14:06:33 -0400
Message-ID: <12704.1027533993@sss.pgh.pa.us> (raw)
In-Reply-To: <001301c2333c$8343ace0$3c0aa8c0@nmtransfer.com>
References: <4.2.2.20020723110231.01daf8c0@ecint.ecinet.com>
	<1027448992.25561.25.camel@skymaster>
	<015d01c23281$2ce57380$6f01050a@eisolution.com>
	<11612.1027524101@sss.pgh.pa.us>
	<001301c2333c$8343ace0$3c0aa8c0@nmtransfer.com>

"Marc Mitchell" <marcm@eisolution.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



view thread (31+ messages)  latest in thread

Message-ID: <12704.1027533993@sss.pgh.pa.us>
Permalink:  ../12704.1027533993@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12704.1027533993@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marcm@eisolution.com
  Subject: Re: Postgres performance slowly gets worse over a month
  In-Reply-To: <12704.1027533993@sss.pgh.pa.us>
  References: <4.2.2.20020723110231.01daf8c0@ecint.ecinet.com> <1027448992.25561.25.camel@skymaster> <015d01c23281$2ce57380$6f01050a@eisolution.com> <11612.1027524101@sss.pgh.pa.us> <001301c2333c$8343ace0$3c0aa8c0@nmtransfer.com> <12704.1027533993@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox