Odd sum() problem in 7.2.2
От | andreas@sparcy.net (Andreas Forsgren) |
---|---|
Тема | Odd sum() problem in 7.2.2 |
Дата | |
Msg-id | a48a43b7.0210040237.5fd11160@posting.google.com обсуждение исходный текст |
Ответы |
Re: Odd sum() problem in 7.2.2
|
Список | pgsql-general |
I'm stuck. The following two snippets gives me two different results, and I can't figure out why; 1) select abs(0 + int4(sum((int4(ss7_rel_timestamp_sec) - int4 (start_timestamp_sec)) / 60))) from session_billed where (b_nr like '12345678%' and datetime(ss7_rel_timestamp_sec) >= '2002-09-01' and datetime(ss7_rel_timestamp_sec) < '2002-10-01' and session_status_reached >= 20); = 5845507 and count(*) [1] gives me: 286109 2) select int4(sum(ss7_rel_timestamp_sec - start_timestamp_sec) / 60) from session_billed where b_nr like '12345678%' and ss7_rel_timestamp_sec >= '2002-09-01' and ss7_rel_timestamp_sec < '2002-10-01' and session_status_reached >= 20; = 5986420 and count(*) [1] gives me: 286304 ss7_rel_timestamp_sec = abstime start_timestamp_sec = abstime b_nr = character varying(32) session_status_reached = integer There have been no changes in the table between these two queries. PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC 2.95.4. [1] select count(*) from session_billed where <rest of original query> -- This is your life, and it's ending one minute at a time.
В списке pgsql-general по дате отправления: