pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Buchan <sbuchan@technicacorp.com>
To: pgsql-performance@postgresql.org
Subject: Large difference between elapsed time and run time for queries
Date: Mon, 10 Mar 2003 13:58:26 -0500
Message-ID: <71F044551C53974EB0735B3737EFE2FC088628@wwwserver> (raw)

Hello,

 

While running benchmarks for my database, I am seeing a large difference in
the elapsed time (from stats collected in the logs) and run time (running
explain analyze on the query using ./psql <database>) for each of my
queries.  The database is being ran on a sunfire 880 with 4 750mhz
processors with 8 G RAM running solaris 8

 

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.  If I reduce the number of concurrent
connections to 100 then the run time and elapsed time for the queries are
the same.

 

I have tried numerous configurations in the postgresql.conf file.  I have
set the shared_buffers with values ranging from 75 MB to 4000MB with no
luck.  I have also tried increasing the sort_mem with no luck.

 

 

When the test is running, the cpu is well over 50% idle and iostat shows
that the processes are not waiting for i/o and disk usage percentage is low.

 

Any help would be appreciated.

 

Thanks.

view thread (8+ messages)  latest in thread

Message-ID: <71F044551C53974EB0735B3737EFE2FC088628@wwwserver>
Permalink:  ../71F044551C53974EB0735B3737EFE2FC088628@wwwserver/
Also on:    postgresql.org/message-id/71F044551C53974EB0735B3737EFE2FC088628@wwwserver

 · 

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: sbuchan@technicacorp.com
  Subject: Re: Large difference between elapsed time and run time for queries
  In-Reply-To: <71F044551C53974EB0735B3737EFE2FC088628@wwwserver>
  References: <71F044551C53974EB0735B3737EFE2FC088628@wwwserver>

* 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