X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A327C14B2804 for ; Tue, 10 Aug 2004 15:49:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 28439-09 for ; Tue, 10 Aug 2004 18:49:39 +0000 (GMT) Received: from snowwhite.lulu.com (mail.lulu.com [66.193.5.50]) by svr1.postgresql.org (Postfix) with ESMTP id 7935B14B2800 for ; Tue, 10 Aug 2004 15:49:33 -0300 (ADT) Received: from [10.0.0.32] (meatwad.rdu.lulu.com [10.0.0.32]) (authenticated bits=0) by snowwhite.lulu.com (8.12.8/8.12.8) with ESMTP id i7AInKQR007314 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 10 Aug 2004 14:49:20 -0400 Message-ID: <411918B9.9000707@lulu.com> Date: Tue, 10 Aug 2004 14:49:29 -0400 From: Bill Montgomery User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Column order performance References: <4118D008.1070606@lulu.com> <200408101023.28084.josh@agliodbs.com> In-Reply-To: <200408101023.28084.josh@agliodbs.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/131 X-Sequence-Number: 7767 Josh Berkus wrote: >>Does the order of columns of varying size have any effect on >>SELECT/INSERT/UPDATE/and/or/DELETE performance? Take the example where >>an integer primary key is listed first in the table and alternatively >>listed after some large varchar or text columns? >> >> > >No, the "order" of the columns in the table makes no difference. They are not >physically stored in the metadata order, anyway; on the data pages, >fixed-length fields (e.g. INT, BOOLEAN, etc.) are stored first and >variable-length fields (CHAR, TEXT, NUMERIC) after them, AFAIK. > > Is this true even after a table is altered to "append" say, an integer column, after there are already variable-length columns in the table? -Bill