X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AEC7BD1B479 for ; Sat, 29 Nov 2003 18:28:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 38093-10 for ; Sat, 29 Nov 2003 14:27:40 -0400 (AST) Received: from smtp.a1.net (smtp1.a1.net [194.48.125.36]) by svr1.postgresql.org (Postfix) with ESMTP id 989B9D1B47C for ; Sat, 29 Nov 2003 14:27:33 -0400 (AST) Received: from ogwnbia005 (chello213047072098.14.vie.surfer.at [213.47.72.98]) by smtp1.a1.net (A1.net ORGANIZER - Alle Emails und Termine fest im Griff) with ESMTPA id <0HP400MI3LJD5H@smtp1.a1.net> for pgsql-sql@postgresql.org; Sat, 29 Nov 2003 19:18:50 +0100 (MET) Date: Sat, 29 Nov 2003 19:18:46 +0100 From: Andreas Heissenberger Subject: Updating session id based on accesstimeout To: pgsql-sql@postgresql.org Message-id: <002201c3b6a5$3b30aa50$0e0aa8c0@ogwnbia005> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Mailer: Microsoft Outlook Express 6.00.2800.1158 Content-type: multipart/alternative; boundary="Boundary_(ID_I7iQH8/jiRy5VFNaBp/+jA)" X-Priority: 3 X-MSMail-priority: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/347 X-Sequence-Number: 16162 This is a multi-part message in MIME format. --Boundary_(ID_I7iQH8/jiRy5VFNaBp/+jA) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT 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 --Boundary_(ID_I7iQH8/jiRy5VFNaBp/+jA) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT
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
 
--Boundary_(ID_I7iQH8/jiRy5VFNaBp/+jA)--