Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id AFE6F1337B7F for ; Wed, 1 Dec 2010 13:22:17 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 52868-03 for ; Wed, 1 Dec 2010 17:22:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mh5.mail.rice.edu (mh5.mail.rice.edu [128.42.199.32]) by mail.postgresql.org (Postfix) with ESMTP id D82F71337B47 for ; Wed, 1 Dec 2010 13:22:09 -0400 (AST) Received: from mh5.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh5.mail.rice.edu (Postfix) with ESMTP id EBF1928F763; Wed, 1 Dec 2010 11:22:08 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh5.mail.rice.edu, auth channel Received: from mh5.mail.rice.edu ([127.0.0.1]) by mh5.mail.rice.edu (mh5.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id JcKUtaDIYgZU; Wed, 1 Dec 2010 11:22:08 -0600 (CST) X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.is.rice.edu (aart.is.rice.edu [168.7.56.48]) by mh5.mail.rice.edu (Postfix) with ESMTP id BF5BF28F754; Wed, 1 Dec 2010 11:22:08 -0600 (CST) Received: by aart.is.rice.edu (Postfix, from userid 18612) id 88FD72D5A6; Wed, 1 Dec 2010 11:22:08 -0600 (CST) Date: Wed, 1 Dec 2010 11:22:08 -0600 From: Kenneth Marshall To: Mladen Gogala Cc: Mario Splivalo , "jd@commandprompt.com" , "pgsql-performance@postgresql.org" Subject: Re: SELECT INTO large FKyed table is slow Message-ID: <20101201172208.GS19162@aart.is.rice.edu> References: <4CF24103.8030209@megafon.hr> <1291168052.20631.1963.camel@jd-desktop> <4CF5FF0A.9040605@megafon.hr> <4CF678FC.9050003@vmsinfo.com> <4CF67F2A.4070703@megafon.hr> <4CF682A7.4030109@vmsinfo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CF682A7.4030109@vmsinfo.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/15 X-Sequence-Number: 41467 On Wed, Dec 01, 2010 at 12:15:19PM -0500, Mladen Gogala wrote: > Mario Splivalo wrote: >> I'll try what Pierre suggested, on whole new filesystem. This one did get >> quite filled with thousands of files that I deleted while the database was >> working. >> >> Mario >> > > Yes, that is a good idea. That's the reason why we need a defragmentation > tool on Linux. Unfortunately, the only file system that currently has a > decent defragmentation tool is XFS and that is a paid option, at least with > Red Hat. Greg Smith has recently posted a wonderful review of PostgreSQL on > various file systems: > > http://blog.2ndquadrant.com/en/2010/04/the-return-of-xfs-on-linux.html > > There is a operating system which comes with a very decent extent based > file system and a defragmentation tool, included in the OS. The file system > is called "NTFS" and company is in the land of Redmond, WA where the > shadows lie. One OS to rule them all... > > -- > Mladen Gogala Sr. Oracle DBA > 1500 Broadway > New York, NY 10036 > (212) 329-5251 > http://www.vmsinfo.com The Leader in Integrated Media Intelligence > Solutions > Redhat6 comes with ext4 which is an extent based filesystem with decent performance. Ken