pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Scott Buchan <sbuchan@technicacorp.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Large difference between elapsed time and run time for queries
Date: Mon, 10 Mar 2003 15:07:54 -0500
Message-ID: <19604.1047326874@sss.pgh.pa.us> (raw)
In-Reply-To: <71F044551C53974EB0735B3737EFE2FC088628@wwwserver>
References: <71F044551C53974EB0735B3737EFE2FC088628@wwwserver>

"Scott Buchan" <sbuchan@technicacorp.com> writes:
> I am simulating 200 user connections each running 6 select queries on 1
> indexed table with 50,000 records. The elapsed time for the queries average
> around 2.5 seconds while if I run the query using explain analyze while the
> test is running, the run time is around 300 ms although it takes much longer
> (few seconds) to display the results.

How many rows are these queries returning?  AFAICS the differential must
be the cost of transmitting the data to the frontend, which of course
does not happen when you use explain analyze.  (I think, but am not
completely sure, that explain analyze also suppresses the CPU effort of
converting the data to text form, as would normally be done before
transmitting it.  But given that you don't see a problem at 100
connections, that's probably not where the issue lies.)

> The database is being ran on a sunfire 880 with 4 750mhz
> processors with 8 G RAM running solaris 8

We have seen some other weird performance problems on Solaris (their
standard qsort apparently is very bad, for example).  Might be that you
need to be looking at kernel behavior, not at Postgres.

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <19604.1047326874@sss.pgh.pa.us>
Permalink:  ../19604.1047326874@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19604.1047326874@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sbuchan@technicacorp.com
  Subject: Re: Large difference between elapsed time and run time for queries
  In-Reply-To: <19604.1047326874@sss.pgh.pa.us>
  References: <71F044551C53974EB0735B3737EFE2FC088628@wwwserver> <19604.1047326874@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