Re: [SQL] time interval math

2012-02-08 Thread Tim Landscheidt
"Edward W. Rouse" wrote: > Hehe, thanks, I played around and ended up with this: > round(SUM(extract('epoch' from (time_out - time_in > I will have to do the division outside of the query, but that's really a > minor issue. You can always use subqueries. > Knowing the total i

Re: [SQL] time interval math

2012-02-08 Thread Edward W. Rouse
Hehe, thanks, I played around and ended up with this: round(SUM(extract('epoch' from (time_out - time_in I will have to do the division outside of the query, but that's really a minor issue. Knowing the total in seconds was the big roadblock. And converting back is easier (a / 3600 + ":" + a

Re: [SQL] time interval math

2012-02-08 Thread Steve Crawford
On 02/08/2012 12:01 PM, Edward W. Rouse wrote: I'm still working on getting this to work, but the summary is this: I am getting several (many) intervals of hour, minutes and seconds. I need a sum of the absolute value these intervals, similar to the SUM(ABS()) function for numbers; and I need to

[SQL] time interval math

2012-02-08 Thread Edward W. Rouse
I'm still working on getting this to work, but the summary is this: I am getting several (many) intervals of hour, minutes and seconds. I need a sum of the absolute value these intervals, similar to the SUM(ABS()) function for numbers; and I need to divide this sum by an integer (bigint). Getting

Re: [SQL] Concurrent Reindex on Primary Key for large table

2012-02-08 Thread Thomas Kellerer
rverghese wrote on 08.02.2012 19:07: I have a large table with about 60 million rows, everyday I add 3-4 million, remove 3-4 million and update 1-2 million. I have a script that reindexes concurrently a couple of times a week, since I see significant bloat. I have autovac on and the settings are

[SQL] Concurrent Reindex on Primary Key for large table

2012-02-08 Thread rverghese
I have a large table with about 60 million rows, everyday I add 3-4 million, remove 3-4 million and update 1-2 million. I have a script that reindexes concurrently a couple of times a week, since I see significant bloat. I have autovac on and the settings are below. I can't concurrently reindex the