From: Andreas Heissenberger <aheissen@a1.net>
To: pgsql-sql@postgresql.org
Subject: Updating session id based on accesstimeout
Date: Sat, 29 Nov 2003 19:18:46 +0100
Message-ID: <002201c3b6a5$3b30aa50$0e0aa8c0@ogwnbia005> (raw)
Hi,
I want to set a session id based on a session timeout per user. I have a very large logfile with more than 1.3 Mio records and look for a very efficient solution - maybe with PL/pgSQL .
The important columns in the table are: access timestamp and userid sorted by userid and access time.
The logic for the session id is: when ever the userid changes or the time between two following records is greater than 60 sec create a new session id and update the record with this id.
I tried to solve this problem with Perl and the DBI interface - but it took about 12 hours to update all records.
The fastes solution I found until now was not to use any data base, sort the data with the unix command sort and process the logfile text directly with perl.
Thanks in advance!
Andreas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: aheissen@a1.net
Subject: Re: Updating session id based on accesstimeout
In-Reply-To: <002201c3b6a5$3b30aa50$0e0aa8c0@ogwnbia005>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox