From: Kevin Keith <kkeith@borderware.com>
To: pgsql-admin@postgresql.org
Subject: Alter table set statistics with partitioned tables
Date: Mon, 24 Jul 2006 12:27:25 -0400
Message-ID: <44C4F4ED.2090900@borderware.com> (raw)
I have had to bump the stats on a partitioned table in order to get the
planner to use an index over a seqscan. This has worked well in making
the system perform where it needs to as it reduced one query's execution
from > 45 seconds to < 1 second.
The one problem I have run into is that when I create a new child table
/ table partition, the stats value (attstattarget in pg_attribute) does
not get carried over from the parent - instead the system default (-1)
is set. Is it supposed to behave this way - meaning that I need to
explicitly define the custom value for each child table? Or is there a
way for this to be implicitly copied when the child table is created?
I prefer not to change the system default on all the tables in the
database because the value needs to be increased for one case.
Thanks,
Kevin
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: kkeith@borderware.com
Subject: Re: Alter table set statistics with partitioned tables
In-Reply-To: <44C4F4ED.2090900@borderware.com>
References: <44C4F4ED.2090900@borderware.com>
* 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