X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 608C8D7ECA for ; Mon, 10 Oct 2005 09:54:28 -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 10777-07 for ; Mon, 10 Oct 2005 12:54:21 +0000 (GMT) Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by svr1.postgresql.org (Postfix) with ESMTP id 3366FD9B26 for ; Mon, 10 Oct 2005 09:54:22 -0300 (ADT) Received: from trofast.sesse.net ([129.241.93.32]) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1EOxAe-0001WH-F1 for pgsql-performance@postgresql.org; Mon, 10 Oct 2005 14:54:25 +0200 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1EOxAc-00020M-00 for ; Mon, 10 Oct 2005 14:54:22 +0200 Date: Mon, 10 Oct 2005 14:54:22 +0200 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: Text/Varchar performance... Message-ID: <20051010125422.GA7454@uio.no> Mail-Followup-To: pgsql-performance@postgresql.org References: <20051005182803.0E6B0100E5@mail.clickdiario.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Operating-System: Linux 2.6.11.8 on a i686 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.012 required=5 tests=[AWL=0.012] X-Spam-Level: X-Archive-Number: 200510/163 X-Sequence-Number: 14931 On Mon, Oct 10, 2005 at 06:28:23PM +0700, Ahmad Fajar wrote: > than you can index the field and you can gain better > perfomance in searching base on the fields, because the search uses the > index you have been created. That really depends on the queries. An index will help some queries (notably <, = or > comparisons, or LIKE 'foo%' with the C locale), but definitely not all (it will help you nothing for LIKE '%foo%'). > If you do not need to index the field, you can use the text field. Because > text field can store data up to 4 Gbytes. So can varchar. /* Steinar */ -- Homepage: http://www.sesse.net/