Re: ITYM DROP TABLE

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: David E(dot) Wheeler <david(at)kineticode(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ITYM DROP TABLE
Date: 2011-06-14 14:35:53
Message-ID: 1308061763-sup-6477@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from David E. Wheeler's message of lun jun 13 17:44:05 -0400 2011:
> I was reading the partitioning docs when I spotted this. I think it means to highlight the advantages of DROP TABLE over DELETE rather than ALTER TABLE.

I think the point of the existing wording is to point out
ALTER TABLE / NO INHERIT. I wonder if it's worth expanding the text to
mention both, such as

--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -2320,7 +2320,9 @@ VALUES ('New York', NULL, NULL, 'NY');
<para>
Bulk loads and deletes can be accomplished by adding or removing
partitions, if that requirement is planned into the partitioning design.
- <command>ALTER TABLE</> is far faster than a bulk operation.
+ <command>ALTER TABLE</> (to split out a sub-table from the partitioned
+ table) and <command>DROP TABLE</> (to remove a partition altogether) are
+ both far faster than a bulk operation.
It also entirely avoids the <command>VACUUM</command>
overhead caused by a bulk <command>DELETE</>.
</para>

However, this introductory text is supposed to be very brief; maybe we
should remove mention of specific commands here.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-06-14 14:50:43 Re: PATCH: CreateComments: use explicit indexing for ``values''
Previous Message Tom Lane 2011-06-14 14:30:28 Re: PATCH: CreateComments: use explicit indexing for ``values''