Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-23 Thread Pavel Stehule
2011/12/23 Tom Lane : > Pavel Stehule writes: >> 2011/12/23 Tom Lane : >>> Tomas Vondra writes: The motivation for this patch was that collection timing data often causes performance issues and in some cases it's not needed. But is this true for row counts? > >>> Perhaps more to th

Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-23 Thread Tomas Vondra
Dne 23.12.2011 22:37, Pavel Stehule napsal(a): 2011/12/23 Tom Lane: Tomas Vondra writes: The motivation for this patch was that collection timing data often causes performance issues and in some cases it's not needed. But is this true for row counts? Perhaps more to the point, is there a use

Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-23 Thread Tom Lane
Pavel Stehule writes: > 2011/12/23 Tom Lane : >> Tomas Vondra writes: >>> The motivation for this patch was that collection timing data often >>> causes performance issues and in some cases it's not needed. But is this >>> true for row counts? >> Perhaps more to the point, is there a use case fo

Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-23 Thread Pavel Stehule
2011/12/23 Tom Lane : > Tomas Vondra writes: >> The motivation for this patch was that collection timing data often >> causes performance issues and in some cases it's not needed. But is this >> true for row counts? > > Perhaps more to the point, is there a use case for collecting timing > data wi

Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-23 Thread Tom Lane
Tomas Vondra writes: > The motivation for this patch was that collection timing data often > causes performance issues and in some cases it's not needed. But is this > true for row counts? Perhaps more to the point, is there a use case for collecting timing data without row counts? I find it har

Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-23 Thread Tomas Vondra
On 23.12.2011 16:14, Tom Lane wrote: > Tomas Vondra writes: >> One thing I'm wondering about is that the InstrumentOptions are not >> exclusive - INSTRUMENT_TIMER means 'collect timing and row counts' while >> INSTRUMENT_ROWS means 'collect row counts'. Wouldn't it be better to >> redefine the INS

Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-23 Thread Alvaro Herrera
Excerpts from Tomas Vondra's message of vie dic 23 11:45:40 -0300 2011: > One thing I'm wondering about is that the InstrumentOptions are not > exclusive - INSTRUMENT_TIMER means 'collect timing and row counts' while > INSTRUMENT_ROWS means 'collect row counts'. Wouldn't it be better to > redefin

Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-23 Thread Tom Lane
Tomas Vondra writes: > One thing I'm wondering about is that the InstrumentOptions are not > exclusive - INSTRUMENT_TIMER means 'collect timing and row counts' while > INSTRUMENT_ROWS means 'collect row counts'. Wouldn't it be better to > redefine the INSTRUMENT_TIMER so that it collects just timi

Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-23 Thread Tomas Vondra
On 23.12.2011 14:57, Robert Haas wrote: > 2011/12/22 Tomas Vondra : >> The gettimeofday() calls are not exactly cheap in some cases, so why to >> pay that price when all you need is the number of rows? > > Fair point. > >> The patch attached does this: >> >> 1) adds INSTRUMENT_ROWS, a new Instrum

Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-23 Thread Robert Haas
2011/12/22 Tomas Vondra : > The gettimeofday() calls are not exactly cheap in some cases, so why to > pay that price when all you need is the number of rows? Fair point. > The patch attached does this: > > 1) adds INSTRUMENT_ROWS, a new InstrumentOption > >   - counts rows without timing (no gett

Re: [HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-22 Thread Pavel Stehule
Hello 2011/12/23 Tomas Vondra : > Hi all, > > most of the time I use auto_explain, all I need is duration of the query > and the plan with estimates and actual row counts. And it would be handy > to be able to catch long running queries with estimates that are > significantly off (say 100x lower o

[HACKERS] WIP: explain analyze with 'rows' but not timing

2011-12-22 Thread Tomas Vondra
Hi all, most of the time I use auto_explain, all I need is duration of the query and the plan with estimates and actual row counts. And it would be handy to be able to catch long running queries with estimates that are significantly off (say 100x lower or higher compared to actual row numbers). T