From: | Nikolas Everett <nik9000(at)gmail(dot)com> |
---|---|
To: | Alexander Staubo <alex(at)bengler(dot)no> |
Cc: | Mathieu Nebra <mateo21(at)siteduzero(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: How would you store read/unread topic status? |
Date: | 2009-06-23 14:11:33 |
Message-ID: | d4e11e980906230711x3047acf5lf5a647959fc8af2a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew Wakeling | 2009-06-23 14:20:19 | Re: How would you store read/unread topic status? |
Previous Message | justin | 2009-06-23 13:57:56 | Re: How would you store read/unread topic status? |