From: Rod Taylor <rbt@rbt.ca>
To: Ang Chin Han <angch@bytecraft.com.my>
Cc: michael.mattox@verideon.com, Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: How to optimize monstrous query, sorts instead of
Date: 03 Jul 2003 08:26:13 -0400
Message-ID: <1057235173.30368.32.camel@jester> (raw)
In-Reply-To: <3F038DF5.70602@bytecraft.com.my>
References: <CJEBLDCHAADCLAGIGCOOKEALCLAA.michael.mattox@verideon.com>
<3F038DF5.70602@bytecraft.com.my>
> CREATE VIEW foo AS {complex_slow_query};
>
> SET random_page_cost = 1.5; EXPLAIN ANALYZE SELECT * FROM foo;
>
> Note the time taken. Repeat a few times to get the average.
You pulled everything off disk and tossed it into memory with the first
run so the results will NOT match your normal situation (some data on
disk, some cached in memory) for your second run and further runs unless
there is a LONG timeframe between runs.
That said, if you test with several other queries and get the same
results, it's probably good enough for your system.
Attachments:
signature.asc (application/pgp-signature, 186B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: rbt@rbt.ca, angch@bytecraft.com.my
Subject: Re: How to optimize monstrous query, sorts instead of
In-Reply-To: <1057235173.30368.32.camel@jester>
References: <CJEBLDCHAADCLAGIGCOOKEALCLAA.michael.mattox@verideon.com> <3F038DF5.70602@bytecraft.com.my> <1057235173.30368.32.camel@jester>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox