Re: How would you store read/unread topic status?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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.


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux