Indices and time spans - Mailing list pgsql-sql

From Itai Zukerman
Subject Indices and time spans
Date
Msg-id 87g0oqbej1.fsf@matt.w80.math-hat.com
Whole thread Raw
Responses Re: Indices and time spans  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-sql by date:

Previous
From: dbalazs@homemail.com
Date:
Subject: view's rule -> update
Next
From: Tom Lane
Date:
Subject: Re: Indices and time spans