Re: How would you store read/unread topic status? - Mailing list pgsql-performance

From Nikolas Everett
Subject Re: How would you store read/unread topic status?
Date
Msg-id d4e11e980906230711x3047acf5lf5a647959fc8af2a@mail.gmail.com
Whole thread Raw
In response to Re: How would you store read/unread topic status?  (Alexander Staubo <alex@bengler.no>)
Responses Re: How would you store read/unread topic status?  (Matthew Wakeling <matthew@flymine.org>)
List pgsql-performance


In our application we defer the updates to a separate asynchronous
process using a simple queue mechanism, but in our case, we found that
the updates are fast enough (in the order of a few milliseconds) not
to warrant batching them into single transactions.

We do a very similar trick for another sort of data and its worked wonders for performance.  We had more frequent updates to fewer rows, though.  If you happen to be using Java, HashMap and TreeMap are perfect for this because they are reentrant so you don't have to worry about synchronizing your sweeper with your web page activities.  As an added bonus, when you do this trick you don't have to query this information from the database unless you have a cache miss.

pgsql-performance by date:

Previous
From: justin
Date:
Subject: Re: How would you store read/unread topic status?
Next
From: Matthew Wakeling
Date:
Subject: Re: How would you store read/unread topic status?