Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id F41351337B90 for ; Wed, 1 Dec 2010 13:15:27 -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 22551-01 for ; Wed, 1 Dec 2010 17:15:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lpo-relay-04.vmsinfo.com (lpo-relay-04.vmsinfo.com [216.169.137.115]) by mail.postgresql.org (Postfix) with ESMTP id 832961337B47 for ; Wed, 1 Dec 2010 13:15:20 -0400 (AST) X-IronPort-AV: E=Sophos;i="4.59,284,1288584000"; d="scan'208";a="27294964" Received: from unknown (HELO lpo-mailbox-02.vmsinfo.com) ([216.169.137.251]) by lpo-relay-04.vmsinfo.com with ESMTP; 01 Dec 2010 12:15:20 -0500 Received: from [10.101.43.35] (lpo-autonomy-p03.vmsinfo.com [216.169.135.234]) by lpo-mailbox-02.vmsinfo.com (Postfix) with ESMTP id 0987B56258; Wed, 1 Dec 2010 12:15:20 -0500 (EST) Message-ID: <4CF682A7.4030109@vmsinfo.com> Date: Wed, 01 Dec 2010 12:15:19 -0500 From: Mladen Gogala Organization: VMS User-Agent: Thunderbird 2.0.0.24 (X11/20101027) MIME-Version: 1.0 To: Mario Splivalo CC: "jd@commandprompt.com" , "pgsql-performance@postgresql.org" Subject: Re: SELECT INTO large FKyed table is slow References: <4CF24103.8030209@megafon.hr> <1291168052.20631.1963.camel@jd-desktop> <4CF5FF0A.9040605@megafon.hr> <4CF678FC.9050003@vmsinfo.com> <4CF67F2A.4070703@megafon.hr> In-Reply-To: <4CF67F2A.4070703@megafon.hr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/14 X-Sequence-Number: 41466 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