Re: Timing a query

Поиск
Список
Период
Сортировка
От Tielman J de Villiers
Тема Re: Timing a query
Дата
Msg-id E1F206EC93DCD4119A05009027A41359064A3C@sbssvr.bondnet.co.za
обсуждение исходный текст
Ответ на Timing a query  ("Elizabeth O'Neill" <elizabeth.oneill@abcmail.co.uk>)
Список pgsql-general
This is fantastic patch.

Thank you very much.

(For "rookies" (such as myself), to apply the patch you will need "patch",
which is not included in the boxed RedHat 7.1 distribution. I got
patch-2.5.4-9.i386.rpm from ftp.rpmfind.net.)

Regards

Tielman J de Villiers
BondNet Pty Ltd

-----Original Message-----
From: Greg Sabino Mullane [mailto:greg@turnstep.com]
Sent: Wednesday, November 28, 2001 5:52 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Timing a query



-----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@turnstep.com
PGP Key: 0x14964AC8 200111281041



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

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



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

В списке pgsql-general по дате отправления:

Предыдущее
От: Kirk Strauser
Дата:
Сообщение: Could be a FAQ: prepare/execute in PHP?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Cancelled Vacuum Leaving Tables Locked?