Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DC550B5DC04 for ; Thu, 11 Aug 2011 10:56:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 02592-04 for ; Thu, 11 Aug 2011 13:56:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id B407FB5DBDC for ; Thu, 11 Aug 2011 10:56:20 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 11 Aug 2011 08:56:19 -0500 Message-Id: <4E43992E020000250003FD9D@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 11 Aug 2011 08:56:14 -0500 From: "Kevin Grittner" To: "Grzegorz Blinowski" , Subject: Re: poor pefrormance with regexp searches on large tables References: <4E425D2D020000250003FD32@gw.wicourts.gov> <4E4276E8020000250003FD52@gw.wicourts.gov> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.711 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.811 X-Spam-Level: X-Archive-Number: 201108/133 X-Sequence-Number: 44580 Grzegorz Blinowski wrote: > A small followup regarding the suggestion to turn off compression > - I used: > > ALTER TABLE archive_tender ALTER COLUMN subject SET STORAGE > EXTERNAL > > to turn off compression, however I get an impression that "nothing > happend". When exactly this alteration takes effect? Perhaps I > should reload the entire db from backup to change the storage > method? Yeah, the storage option just affects future storage of values; it does not perform a conversion automatically. There are various ways you could cause the rows to be re-written so that they use the new TOAST policy for the column. One of the simplest would be to do a data-only dump of the table, truncate the table, and restore the data. If that table is a big enough portion of the database, a pg_dump of the whole database might be about as simple. -Kevin