Grouping logs by ip and time

Поиск
Список
Период
Сортировка
От Alex Thurlow
Тема Grouping logs by ip and time
Дата
Msg-id 4EB96E17.9060804@blastro.com
обсуждение исходный текст
Ответы Re: Grouping logs by ip and time  (Raymond O'Donnell <rod@iol.ie>)
Re: Grouping logs by ip and time  (Thomas Markus <t.markus@proventis.net>)
Список pgsql-general
Hello all,
     I have a table which stores action logs from users.  It looks
something like this:
log_type text,
date date,
"time" time without time zone,
ip inet

The log type can be action1, action2, action3, action4, or action5.  I
know that each user session will have a max of one of each log and it
will always start with action1.  It may not have every action though.  I
also know that each session will take no longer than one minute.

What I'd like to do is be able to group these logs by sessions based on
the IP and the time range so I can figure out the time taken between
each action.

I know how to script it, although it's very slow.  I was hoping there
was some way to do this in SQL.  I'm running Postgresql 8.3.7 on this
machine right now, but if there's something that would make this easier
and doesn't exist there yet, I would be willing to upgrade.

Thanks,
Alex

В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Postgres vs other Postgres based MPP implementations
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Grouping logs by ip and time