Indices and time spans

From: Itai Zukerman <zukerman(at)math-hat(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Indices and time spans
Date: 2000-07-31 13:44:18
Message-ID: 87g0oqbej1.fsf@matt.w80.math-hat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-07-31 14:49:20 Re: Indices and time spans
Previous Message dbalazs 2000-07-30 16:23:00 view's rule -> update