On Mon, 20 Jan 2003, Tom Lane wrote:
>
> If I understood correctly, he's tracking webpage hits; so the updates
> are going to correspond to the sequence in which visitors move to
> different webpages.
Ah... I was thinking he was counting banners served within a
single page (perhaps a banner on top and a banner on the bottom),
and doing accounting of which banners were shown. In that case
it might have been interesting to keep some of his information
in a transaction.
start transaction...
insert_a_new_cookie_record_if_it_didn't_exits..
record the top_banner...
record the bottom_banner...
end transaction...
I've done something like that to count how many distinct users saw
particular ads. In this case sorting the small number (2) of banners
in his application logic would be easy.
> I would suggest using a separate transaction for each webpage visited.
> Holding a transaction open across multiple page traversals is widely
> considered bad news for a number of reasons, not only this one.
I understand this part.
Ron