pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard van den Berg <richard.vandenberg@trust-factory.com>
Cc: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: PFC <lists@boutiquenumerique.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Foreign key slows down copy/insert
Date: Fri, 15 Apr 2005 09:55:16 -0400
Message-ID: <2697.1113573316@sss.pgh.pa.us> (raw)
In-Reply-To: <425FB73F.8080903@trust-factory.com>
References: <425E6045.4060201@trust-factory.com>
	<op.so8fvhlwth1vuj@localhost>
	<425F77E4.7030504@trust-factory.com>
	<op.so9q4exeth1vuj@localhost>
	<425FA403.9030007@trust-factory.com>
	<425FA758.8080304@familyhealth.com.au>
	<425FB73F.8080903@trust-factory.com>

Richard van den Berg <richard.vandenberg@trust-factory.com> 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



view thread (24+ messages)  latest in thread

Message-ID: <2697.1113573316@sss.pgh.pa.us>
Permalink:  ../2697.1113573316@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2697.1113573316@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, richard.vandenberg@trust-factory.com, chriskl@familyhealth.com.au, lists@boutiquenumerique.com
  Subject: Re: Foreign key slows down copy/insert
  In-Reply-To: <2697.1113573316@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox