pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martijn van Oosterhout <kleptog@svana.org>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kelly Burkhart <kelly.burkhart@gmail.com>
Cc: Evgeny Gridasov <eugrid@fpm.kubsu.ru>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] EXPLAIN ANALYZE on 8.2
Date: Fri, 15 Dec 2006 13:30:52 +0100
Message-ID: <20061215123052.GJ958@svana.org> (raw)
In-Reply-To: <1166185247.3882.69.camel@silverbirch.site>
References: <20061214163230.d46f0138.eugrid@fpm.kubsu.ru>
	<21146.1166112702@sss.pgh.pa.us>
	<20061214192920.c75385d6.eugrid@fpm.kubsu.ru>
	<21516.1166114475@sss.pgh.pa.us>
	<fa1e4ce70612141543o8866d7fg417eca88ce9b1344@mail.gmail.com>
	<29450.1166141131@sss.pgh.pa.us>
	<1166178488.3882.56.camel@silverbirch.site>
	<20061215105008.GD958@svana.org>
	<1166185247.3882.69.camel@silverbirch.site>

On Fri, Dec 15, 2006 at 12:20:46PM +0000, Simon Riggs wrote:
> > I
> > wrote a patch that tried statistical sampling, but the figures were too
> > far off for people's liking.
> 
> Well, I like your ideas, so if you have any more...
> 
> Maybe sampling every 10 rows will bring things down to an acceptable
> level (after the first N). You tried less than 10 didn't you?

Yeah, it reduced the number of calls as the count got larger. It broke
somewhere, though I don't quite remember why.

> Maybe we can count how many real I/Os were required to perform each
> particular row, so we can adjust the time per row based upon I/Os. ISTM
> that sampling at too low a rate means we can't spot the effects of cache
> and I/O which can often be low frequency but high impact.

One idea is to sample at fixed interval. Where the I/O cost is high,
there'll be a lot of sampling points. The issue being that the final
result are not totally accurate anymore.

> > I think the best option is setitimer(), but it's not POSIX so
> > platform support is going to be patchy.
> 
> Don't understand that. I thought that was to do with alarms and signals.

On my system the manpage say setitimer() conforms to: SVr4, 4.4BSD. I'm
unsure how many of the supported platforms fall under that
catagorisation.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (24+ messages)  latest in thread

Message-ID: <20061215123052.GJ958@svana.org>
Permalink:  ../20061215123052.GJ958@svana.org/
Also on:    postgresql.org/message-id/20061215123052.GJ958@svana.org

 · 

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: kleptog@svana.org, simon@2ndquadrant.com, tgl@sss.pgh.pa.us, kelly.burkhart@gmail.com, eugrid@fpm.kubsu.ru, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] EXPLAIN ANALYZE on 8.2
  In-Reply-To: <20061215123052.GJ958@svana.org>

* 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