<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Oliver,<br>
<br>
I think you question is more for the postgres user list, since it
hasn't got anything to do with postgis.<br>
<br>
Nevertheless, you can look into window functions of postgres where
you are able to get the value of the 'next' row, based on a
sorting with 'lead(rowname,1)'. Once you calculated the interval
between every row you can store that in a new column and do stats
on that column.<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.postgresql.org/docs/current/static/functions-window.html">http://www.postgresql.org/docs/current/static/functions-window.html</a><br>
<br>
I have no idea what this does with speed on millions of records,
but you better use an index on your timestamp for the sorting.<br>
<br>
Best, Tom<br>
<br>
<br>
On 28-12-2014 10:41, Oliver Burgfeld wrote:<br>
</div>
<blockquote
cite="mid:1ed904d5-4fb8-44c2-82d7-e2b8c4fe6fdb@googlegroups.com"
type="cite">
<div dir="ltr">Hi,<br>
<br>
I have a table with millions of rows including one column
'timestamp'. Is it possible to calculate the mean time interval
of all those entries?<br>
I do know how to do it theoretically but don't really know how
to convert it to SQL.<br>
<br>
Thanks!<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a></pre>
</blockquote>
<br>
</body>
</html>