Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id C57F39FB62E for ; Fri, 27 Apr 2007 12:56:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 01531-09 for ; Fri, 27 Apr 2007 12:56:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from srv.ioprop3.com (unknown [207.58.142.186]) by postgresql.org (Postfix) with ESMTP id 0F0C09FBA24 for ; Fri, 27 Apr 2007 12:55:39 -0300 (ADT) Received: (qmail 9128 invoked from network); 27 Apr 2007 11:30:51 -0400 Received: from localhost (HELO mailbox.etsy.com) (127.0.0.1) by localhost with SMTP; 27 Apr 2007 11:30:51 -0400 Received: from 209.51.183.100 (SquirrelMail authenticated user sid) by mailbox.etsy.com with HTTP; Fri, 27 Apr 2007 08:30:51 -0700 (PDT) Message-ID: <50431.209.51.183.100.1177687851.squirrel@mailbox.etsy.com> Date: Fri, 27 Apr 2007 08:30:51 -0700 (PDT) Subject: [Fwd: ] How From: "Siddharth Anand" To: pgsql-performance@postgresql.org Reply-To: sid@etsy.com User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal References: In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/471 X-Sequence-Number: 24348 Hi! I read the link below and am puzzled by or curious about something. http://www.postgresql.org/docs/8.1/interactive/datatype-character.html The Tip below is intriguing "Tip: There are no performance differences between these three types, apart from the increased storage size when using the blank-padded type. While character(n) has performance advantages in some other database systems, it has no such advantages in PostgreSQL. In most situations text or character varying should be used instead." How can a field that doesn't have a limit like "text" perform similarly to char varying(128), for example? At some point, we need to write data to disk. The more data that needs to be written, the longer the disk write will take, especially when it requires finding free sectors to write to. Another interesting quote from the same page is the following: "Long values are also stored in background tables so they do not interfere with rapid access to the shorter column values. " If the long values are stored in a separate table, on a different part of the disk, doesn't this imply an extra disk seek? Won't it therefore take longer? Sid