From kraj@illumen.com Wed Jun 14 16:34:51 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 616339F9FE3 for ; Wed, 14 Jun 2006 13:34:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 38391-01 for ; Wed, 14 Jun 2006 13:34:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stash.illumen.com (unknown [64.207.29.137]) by postgresql.org (Postfix) with ESMTP id 2E7D89F9CAA for ; Wed, 14 Jun 2006 13:34:37 -0300 (ADT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C68FD0.6A46BDEB" Subject: Table truncate question X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Wed, 14 Jun 2006 10:34:32 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Table truncate question Thread-Index: AcaPu6TLcS+3aEhETKyGV9o/0qW5TAAFGQ8Q From: "Benjamin Krajmalnik" To: "postgres" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/121 X-Sequence-Number: 22083 This is a multi-part message in MIME format. ------_=_NextPart_001_01C68FD0.6A46BDEB Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable I recently truncated a partitioned table. When I look at the statistics for the table, it shows tuples inserted as zero (which I would expect), but it did not clear the value for tuples updated and tuples deleted. Is this the expected behavior? I would assume that the updated/deleted stats should also get cleared. =20 I am running PG 8.1.4 on Windows. =20 ------_=_NextPart_001_01C68FD0.6A46BDEB Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

I recently truncated a partitioned = table.

When I look at the statistics for = the table, it shows tuples inserted as zero (which I would expect), but it = did not clear the value for tuples updated and tuples = deleted.

Is this the expected = behavior?  I would assume that the updated/deleted stats should also get = cleared.

 

I am running PG 8.1.4 on = Windows.

 

------_=_NextPart_001_01C68FD0.6A46BDEB-- From bnichols@ca.afilias.info Wed Jun 14 21:02:37 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 965AE9FA5C8 for ; Wed, 14 Jun 2006 18:02:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 71263-07 for ; Wed, 14 Jun 2006 18:02:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.libertyrms.com (vgateway.libertyrms.info [207.219.45.62]) by postgresql.org (Postfix) with ESMTP id 0F4FB9FA3D7 for ; Wed, 14 Jun 2006 18:02:28 -0300 (ADT) Received: from dba5.int.libertyrms.com ([10.1.3.44]) by mail.libertyrms.com with esmtp (Exim 4.22) id 1FqcVO-0007m8-4u; Wed, 14 Jun 2006 17:02:26 -0400 Message-ID: <44907961.9030809@ca.afilias.info> Date: Wed, 14 Jun 2006 17:02:25 -0400 From: Brad Nicholson User-Agent: Thunderbird 1.5.0.4 (X11/20060516) MIME-Version: 1.0 To: Benjamin Krajmalnik CC: postgres Subject: Re: Table truncate question References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SA-Exim-Mail-From: bnichols@ca.afilias.info X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/124 X-Sequence-Number: 22086 Benjamin Krajmalnik wrote: > I recently truncated a partitioned table. > > When I look at the statistics for the table, it shows tuples inserted as > zero (which I would expect), but it did not clear the value for tuples > updated and tuples deleted. > > Is this the expected behavior? I would assume that the updated/deleted > stats should also get cleared. > > > > I am running PG 8.1.4 on Windows. Stats get updated by the ANALYZE command. Run it on the table and check again. -- Brad Nicholson 416-673-4106 Database Administrator, Afilias Canada Corp.