From: Itai Zukerman <zukerman@math-hat.com>
To: pgsql-sql@postgresql.org
Subject: Indices and time spans
Date: 31 Jul 2000 09:44:18 -0400
Message-ID: <87g0oqbej1.fsf@matt.w80.math-hat.com> (raw)
I have this:
SELECT ...
FROM trade, entry
WHERE AGE( CURRENT_TIMESTAMP, posted ) <= '5 minutes'::TIMESPAN
AND trade.entryId = entry.entryId
That is, fetch all trades executed in the last 5 minutes.
This query seems to run pretty slowly when trade is filled. Putting
an index on trade ( posted ) doesn't seem to help any (the same query
plan is generated). Any suggestions?
-itai
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-sql@postgresql.org
Cc: zukerman@math-hat.com
Subject: Re: Indices and time spans
In-Reply-To: <87g0oqbej1.fsf@matt.w80.math-hat.com>
References: <87g0oqbej1.fsf@matt.w80.math-hat.com>
* 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