X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 3EC3A9F9C18 for ; Thu, 18 May 2006 12:58:40 -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 31824-03 for ; Thu, 18 May 2006 12:58:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from r1.mycybernet.net (r1.mycybernet.net [209.5.206.8]) by postgresql.org (Postfix) with ESMTP id 103879FA293 for ; Thu, 18 May 2006 12:58:30 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227]:55437 helo=phlogiston.dydns.org) by r1.mycybernet.net with esmtp (Exim 4.50 (FreeBSD)) id 1FgktS-000Glw-2L for pgsql-sql@postgresql.org; Thu, 18 May 2006 11:58:30 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id A090B4046; Thu, 18 May 2006 11:58:29 -0400 (EDT) Date: Thu, 18 May 2006 11:58:29 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Add column and specify the column position in a table Message-ID: <20060518155829.GE29472@phlogiston.dyndns.org> References: <446B9418.3080700@encs.concordia.ca> <446C0BC0.7050805@gmail.com> <20060518140014.GA3122@surnet.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/145 X-Sequence-Number: 25176 On Thu, May 18, 2006 at 05:43:19PM +0200, Guillaume Lelarge wrote: > Do you mean that, using "alter table test add column" with the "after" > option, MySQL creates a new table, populates it with the old table > data and finally drops the old table ? I mean, there's the same > performance problem with big tables ? MySQL does that for a great deal of its DDL. Yes, the performance is awful for this on big tables. The reason I didn't answer the OP's question, though, is that I can't think of a legitimate reason to do this anyway. The physical layout of the columns should not be of concern to the developer, who should be naming the columns anyway. A -- Andrew Sullivan | ajs@crankycanuck.ca The whole tendency of modern prose is away from concreteness. --George Orwell