Re: Timing a query

From: Francisco Reyes <lists(at)natserv(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Francisco Reyes <lists(at)natserv(dot)com>, "Elizabeth O'Neill" <elizabeth(dot)oneill(at)abcmail(dot)co(dot)uk>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Timing a query
Date: 2001-11-30 22:15:11
Message-ID: 20011130171355.B5095-100000@zoraida.natserv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Tue, 27 Nov 2001, Tom Lane wrote:
> You can get more info than you probably want by setting show_query_stats
> to true (either with SET, or in postgresql.conf if you want it across
> all backends). Also set debug_print_query to true. Now you'll get
> stuff like this in the postmaster log:
>
> DEBUG: query: select count(*) from tenk1 a, tenk1 b where a.unique1=b.unique2;
> DEBUG: QUERY STATISTICS

Is this available on 7.1.3?
I did:
drf=# set show_query_stats = TRUE;
drf=# set debug_print_query = TRUE;
drf=# select horse,fd from horses limit 1;
horse | fd
-------------------+----
a big kahuna* | d

drf=# show debug_print_query;
NOTICE: debug_print_query is on
drf=# show show_query_stats;
NOTICE: show_query_stats is on

The variables were on, yet I didn't get the debug output.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-11-30 23:13:00 Re: Timing a query
Previous Message sara_software 2001-11-30 21:32:39 function from rule