pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Kevin Brown <kevin@sysexperts.com>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: Joel's Performance Issues WAS : Opteron vs Xeon
Date: Sat, 23 Apr 2005 11:27:42 -0700
Message-ID: <200504231127.42389.josh@agliodbs.com> (raw)
In-Reply-To: <20050423063044.GI19518@filer>
References: <4266F7B3.7050004@arbash-meinel.com>
	<20050423020151.GW58835@decibel.org>
	<20050423063044.GI19518@filer>

Jim, Kevin,

> > Hrm... I was about to suggest that for timing just the query (and not
> > output/data transfer time) using explain analyze, but then I remembered
> > that explain analyze can incur some non-trivial overhead with the timing
> > calls. Is there a way to run the query but have psql ignore the output?
> > If so, you could use \timing.
>
> Would timing "SELECT COUNT(*) FROM (query)" work?

Just \timing would work fine; PostgreSQL doesn't return anything until it has 
the whole result set.  That's why MSSQL vs. PostgreSQL timing comparisons are 
deceptive unless you're careful:  MSSQL returns the results on block at a 
time, and reports execution time as the time required to return the *first* 
block, as opposed to Postgres which reports the time required to return the 
whole dataset.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (41+ messages)  latest in thread

Message-ID: <200504231127.42389.josh@agliodbs.com>
Permalink:  ../200504231127.42389.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200504231127.42389.josh@agliodbs.com

 · 

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: josh@agliodbs.com, kevin@sysexperts.com
  Subject: Re: Joel's Performance Issues WAS : Opteron vs Xeon
  In-Reply-To: <200504231127.42389.josh@agliodbs.com>

* 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