Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 96F792E0059 for ; Fri, 9 May 2008 11:12:51 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 10315-01 for ; Fri, 9 May 2008 11:12:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by developer.postgresql.org (Postfix) with ESMTP id F38AA2E0050 for ; Fri, 9 May 2008 11:12:47 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m49ECkLV013355; Fri, 9 May 2008 10:12:46 -0400 (EDT) To: Frank Dekervel cc: pgsql-performance@postgresql.org Subject: Re: "append" takes a lot of time in a query In-reply-to: <200805091009.46893.frank.dekervel@smartlounge.be> References: <200805091009.46893.frank.dekervel@smartlounge.be> Comments: In-reply-to Frank Dekervel message dated "Fri, 09 May 2008 10:09:46 +0200" Date: Fri, 09 May 2008 10:12:46 -0400 Message-ID: <13354.1210342366@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/138 X-Sequence-Number: 30106 Frank Dekervel writes: > this turns this query in an append of a whole lot of seq scan/ index scan's. > These scans are predictably quick, but the "append" takes 5 seconds (and the > numbers of the scans do not add up to the append actual time) It says 5 milliseconds, not 5 seconds. > Does someone have an explanation / possible solution for this performance ? Rethink your schema --- this is pushing the inheritance feature far beyond what it's designed to do. regards, tom lane