X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7770353F99 for ; Fri, 15 Apr 2005 10:55:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18887-01 for ; Fri, 15 Apr 2005 13:55:21 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6C72553CCA for ; Fri, 15 Apr 2005 10:55:20 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3FDtGu4002699; Fri, 15 Apr 2005 09:55:16 -0400 (EDT) To: Richard van den Berg Cc: Christopher Kings-Lynne , PFC , pgsql-performance@postgresql.org Subject: Re: Foreign key slows down copy/insert In-reply-to: <425FB73F.8080903@trust-factory.com> References: <425E6045.4060201@trust-factory.com> <425F77E4.7030504@trust-factory.com> <425FA403.9030007@trust-factory.com> <425FA758.8080304@familyhealth.com.au> <425FB73F.8080903@trust-factory.com> Comments: In-reply-to Richard van den Berg message dated "Fri, 15 Apr 2005 14:44:47 +0200" Date: Fri, 15 Apr 2005 09:55:16 -0400 Message-ID: <2697.1113573316@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/342 X-Sequence-Number: 11739 Richard van den Berg writes: > Christopher Kings-Lynne wrote: >> No explain analyze is done on the server... > Yes, but the psql \timing is calculated on the client, right? That is > the value that PFC was refering to. You didn't show us any \timing. The 94.109 ms figure is all server-side. As an example: regression=# \timing Timing is on. regression=# explain analyze select * from tenk1; QUERY PLAN ------------------------------------------------------------------------------------------------------------- Seq Scan on tenk1 (cost=0.00..458.00 rows=10000 width=244) (actual time=0.050..149.615 rows=10000 loops=1) Total runtime: 188.518 ms (2 rows) Time: 210.885 ms regression=# Here, 188.5 is at the server, 210.8 is at the client. The difference is not all network delay, either --- parse/plan overhead is in there too. regards, tom lane