Skip site navigation (1) Skip section navigation (2)

Re: Timing a query

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Timing a query
Date: 2001-11-28 15:52:00
Message-ID: E1696vE-0002k8-00@maynard.mail.mindspring.net (view raw or flat)
Thread:
Lists: pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> this looks superb.
> 
> one small question though; how do i apply the patch ?

I'll assume you have the sources for 7.1.3. I'll rewrite the 
patch for 7.2b3 in a little bit.

Change to the top level of the postgresql source tree. 

> cd postgresql-7.1.3

Save the file at 
http://www.gtsm.com/postgres/microtiming.patch
to a local file, perhaps named "microtiming.patch"

> wget http://www.gtsm.com/postgres/microtiming.patch

Patch the source with the file:

> patch -bp0 < microtiming.patch

If all goes well, you should see:

patching file ./src/bin/psql/command.c
patching file ./src/bin/psql/common.c
patching file ./src/bin/psql/help.c
patching file ./src/bin/psql/print.h
patching file ./src/bin/psql/startup.c
patching file ./src/bin/psql/tab-complete.c
patching file ./doc/src/sgml/ref/psql-ref.sgml

You can then run make from the top-level directory, or 
to avoid some output, cd to src/bin/psql and run 
make from there:

>cd src/bin/psql; make

When finished, you'll have a new psql binary in the 
src/bin/psql directory, which should have the microtiming 
stuff. Test it out before copying it over to anywhere 
permanent:

>./psql

template1=# select version();
                           version
- - --------------------------------------------------------------
 PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 3.0.1
(1 row)

template1=# \m
Microsecond timing is on.
template1=# select version();
                           version
- - --------------------------------------------------------------
 PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 3.0.1
(1 row)

TOTAL TIME: 0.001660
template1=#



Greg Sabino Mullane
greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200111281041



-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iQA/AwUBPAUIGrybkGcUlkrIEQK8BACcCpmnGT0u99QE+lLxhAyujiEDExgAoJ1C
8GpR/1FBwfHvO0u0P0G7tK2d
=JqYc
-----END PGP SIGNATURE-----



Responses

pgsql-general by date

Next:From: Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=Date: 2001-11-28 16:15:55
Subject: Re: Locale and C Locale
Previous:From: Francisco ReyesDate: 2001-11-28 15:23:03
Subject: Re: Troublesome handling of dropped connection

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group