Re: Timing of 'SELECT 1'

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Timing of 'SELECT 1'
Date: 2004-03-10 16:43:48
Message-ID: 200403101643.i2AGhmg16271@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Neil Conway wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I am timing small queries, and found that a PREPARE/EXECUTE of
> > "SELECT 1" takes about 1.2ms on my machine. A normal SELECT doesn't
> > take much longer, so I am wondering why a simpler query isn't
> > faster.
>
> log_executor_stats output isn't really too helpful -- if you can get
> some gprof or oprofile output, we might have a better chance of seeing
> if there is anything we can improve.

The problem with gprof is that I am going to see all the backend startup
stuff too, no? Is there a way to get a dump just the run of the query?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2004-03-10 16:46:29 Re: pgFoundry WAS: On pgweb project
Previous Message Andreas Pflug 2004-03-10 16:43:15 Re: grants