RE: Select most recent record? - Mailing list pgsql-sql

From Marc Sherman
Subject RE: Select most recent record?
Date
Msg-id NFBBIHBOMKCAGGHPKDJHAEKCCFAA.msherman@projectile.ca
Whole thread Raw
In response to RE: Select most recent record?  ("Mark Hamby" <mark@archer.leavenworth.army.mil>)
List pgsql-sql
From: Mark Hamby [mailto:mark@archer.leavenworth.army.mil]
> 
> Marc,
> Did you ever get your problem solved to your satisfaction?
> We have a very simular problem with a historical database
> containing typically 5K id and updates to data every few
> seconds.  We tried unsuccessfully to optimize queries
> such as those already suggested to you.  We found the best
> means to quickly query the data valid at any given time was
> to:
[snip]

By adding an index, I was able to get the performance of the
query within a reasonable threshold; it's still slow, but
acceptable.  I'll bear your suggestion in mind for next time
I run into this kind of problem, though, if my sol'n can't
handle the data.  Thanks,

- Marc



pgsql-sql by date:

Previous
From: Joseph Shraibman
Date:
Subject: Re: select by streak
Next
From: "Josh Berkus"
Date:
Subject: Re: Changing PL/pgSQL triggers