Re: time series data

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Khalil Khamlichi <khamlichi(dot)khalil(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: time series data
Date: 2017-10-14 14:23:34
Message-ID: 378a1c45-9b0f-0e26-5fe6-d622d3838279@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/01/2017 01:17 AM, Khalil Khamlichi wrote:
> Hi everyone,

Take a look at TimescaleDB they have an extension to Postgres that makes
this awesome (and yes its free and open source).

jD

>
> I have a data stream of a call center application coming in  to postgres
> in this format :
>
> user_name, user_status, event_time
>
> 'user1', 'ready', '2017-01-01 10:00:00'
> 'user1', 'talking', '2017-01-01 10:02:00'
> 'user1', 'after_call', '2017-01-01 10:07:00'
> 'user1', 'ready', '2017-01-01 10:08:00'
> 'user1', 'talking', '2017-01-01 10:10:00'
> 'user1', 'after_call', '2017-01-01 10:15:00'
> 'user1', 'paused', '2017-01-01 10:20:00'
> ...
> ...
>
> so as you see each new insert of an "event" is in fact the start_time of
> that event and also the end_time of the previous one so should be used
> to calculate the duration of this previous one.
>
> What is the best way to get user_status statistics like total duration,
> frequency, avg ...etc , does any body have an experience with this sort
> of data streams ?
>
>
> Thanks in advance.

--
Command Prompt, Inc. http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Khalil Khamlichi 2017-10-14 14:25:46 Re: time series data
Previous Message legrand legrand 2017-10-14 07:32:39 Re: Delete Duplicates with Using