Skip site navigation (1) Skip section navigation (2)

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

From: Mathieu Nebra <mateo21(at)siteduzero(dot)com>
To: Chris St Denis <lists(at)on-track(dot)ca>
Cc: Alexander Staubo <alex(at)bengler(dot)no>, pgsql-performance(at)postgresql(dot)org
Subject: Re: How would you store read/unread topic status?
Date: 2009-06-24 08:08:09
Message-ID: (view raw, whole thread or download thread mbox)
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.
>> A few milliseconds would be cool.
>> In fact, defering to another process is a good idea, but I'm not sure if
>> it is easy to implement. It would be great to have some sort of UPDATE
>> ... LOW PRIORITY to make the request non blocking.
>> Thanks.
> I use pg_send_query()
> <> in php to
> achieve this for a views counter. "Script execution is not blocked while
> the queries are executing."
> It looks like this may just be a direct translation of PQsendQuery()
> from libpq. Your preferred language may have a function like this.

I am using PHP. That was one of the thing I was looking for, thank you! :)
We'll combine this with a memcached solution so we just update every
1000 views for example.

In response to

pgsql-performance by date

Next:From: Albe LaurenzDate: 2009-06-24 08:32:19
Subject: Re: Implications of having large number of users
Previous:From: Mathieu NebraDate: 2009-06-24 07:42:30
Subject: Re: How would you store read/unread topic status?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group