X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3BF659DC999 for ; Tue, 21 Mar 2006 08:22:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59368-01 for ; Tue, 21 Mar 2006 08:22:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id C84969DC885 for ; Tue, 21 Mar 2006 08:22:08 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id 9A56056427; Tue, 21 Mar 2006 06:22:11 -0600 (CST) Received: (hashcash-sendmail, from uid 1001); Tue, 21 Mar 2006 06:22:11 -0600 Date: Tue, 21 Mar 2006 06:22:11 -0600 From: "Jim C. Nasby" To: pgsql-performance@postgresql.org Subject: WAL logging of SELECT ... INTO command Message-ID: <20060321122211.GU15742@pervasive.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060321:pgsql-performance@postgresql.org::L4pn30mZkw2t6YIa:00000 0000000000000000000000000Nvw X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.108 required=5 tests=[AWL=0.108] X-Spam-Score: 0.108 X-Spam-Level: X-Archive-Number: 200603/393 X-Sequence-Number: 17830 Currently, it appears that SELECT * INTO new_table FROM old_table logs each page as it's written to WAL. Is this actually needed? Couldn't the database simply log that the SELECT ... INTO statement was executed instead? Doing so would likely result in a large performance improvement in most installs. Is there no provision for writing anything but data page changes (or whole pages) to WAL? -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461