Обсуждение: Nothing larger then int8?

Поиск
Список
Период
Сортировка

Nothing larger then int8?

От
The Hermit Hacker
Дата:
I'm logging traffic to a database, so that I can do analysis on usage and
whatnot, and I need something bigger then int8 :(

/tmp/psql.edit.70.79087: 6 lines, 222 characters.     ip       |  maxbytes   | port |        runtime
---------------+-------------+------+------------------------216.126.84.28 |  2169898055 |   80 | 2001-01-16
00:00:00-05216.126.84.28|   160579228 |  873 | 2001-01-16 00:00:00-05216.126.84.28 |      365270 |   20 | 2001-01-16
00:00:00-05216.126.84.28|      196256 |   21 | 2001-01-16 00:00:00-05216.126.84.28 |      195238 |   22 | 2001-01-16
00:00:00-05216.126.84.28|      182492 | 1024 | 2001-01-16 00:00:00-05216.126.84.28 |      171155 |  143 | 2001-01-16
00:00:00-05216.126.84.28| -1392384544 |   80 | 2001-01-13 00:00:00-05216.126.84.28 | -1392384544 |   80 | 2001-01-04
00:00:00-05216.126.84.28| -1392384544 |   80 | 2001-01-05 00:00:00-05216.126.84.28 | -1392384544 |   80 | 2001-01-06
00:00:00-05216.126.84.28| -1392384544 |   80 | 2001-01-07 00:00:00-05216.126.84.28 | -1392384544 |   80 | 2001-01-08
00:00:00-05216.126.84.28| -1392384544 |   80 | 2001-01-14 00:00:00-05216.126.84.28 | -1452855018 |   80 | 2001-01-15
00:00:00-05216.126.84.28| -1452855018 |   80 | 2001-01-10 00:00:00-05216.126.84.28 | -1452855018 |   80 | 2001-01-09
00:00:00-05216.126.84.28| -1513325492 |   80 | 2001-01-03 00:00:00-05216.126.84.28 | -1694736914 |   80 | 2001-01-12
00:00:00-05216.126.84.28| -1815677862 |   80 | 2001-01-11 00:00:00-05
 

hub_traf_stats=# \d daily_stats      Table "daily_stats"Attribute |   Type    | Modifier
-----------+-----------+----------ip        | inet      |port      | integer   |bytes     | bigint    |runtime   |
timestamp|
 

do we have anything larger to work with?  I've checked docs, but that
looks like about it :(

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org



Re: Nothing larger then int8?

От
The Hermit Hacker
Дата:
hrrmm ... ignore this ... I'm suspecting that what I did was copied in
sum() data from an old table that had bytes declared as int4, without
casting it to int8 before storing it to the new table ...

if anyone is interested, here is one days worth of http traffic for the
main PostgreSQL.Org server ... this doesn't include the traffic that the
mirror sites absorb:

1160643846 / ( 1024 * 1024 * 1024 )
1.08gig



On Thu, 18 Jan 2001, The Hermit Hacker wrote:

>
> I'm logging traffic to a database, so that I can do analysis on usage and
> whatnot, and I need something bigger then int8 :(
>
> /tmp/psql.edit.70.79087: 6 lines, 222 characters.
>       ip       |  maxbytes   | port |        runtime
> ---------------+-------------+------+------------------------
>  216.126.84.28 |  2169898055 |   80 | 2001-01-16 00:00:00-05
>  216.126.84.28 |   160579228 |  873 | 2001-01-16 00:00:00-05
>  216.126.84.28 |      365270 |   20 | 2001-01-16 00:00:00-05
>  216.126.84.28 |      196256 |   21 | 2001-01-16 00:00:00-05
>  216.126.84.28 |      195238 |   22 | 2001-01-16 00:00:00-05
>  216.126.84.28 |      182492 | 1024 | 2001-01-16 00:00:00-05
>  216.126.84.28 |      171155 |  143 | 2001-01-16 00:00:00-05
>  216.126.84.28 | -1392384544 |   80 | 2001-01-13 00:00:00-05
>  216.126.84.28 | -1392384544 |   80 | 2001-01-04 00:00:00-05
>  216.126.84.28 | -1392384544 |   80 | 2001-01-05 00:00:00-05
>  216.126.84.28 | -1392384544 |   80 | 2001-01-06 00:00:00-05
>  216.126.84.28 | -1392384544 |   80 | 2001-01-07 00:00:00-05
>  216.126.84.28 | -1392384544 |   80 | 2001-01-08 00:00:00-05
>  216.126.84.28 | -1392384544 |   80 | 2001-01-14 00:00:00-05
>  216.126.84.28 | -1452855018 |   80 | 2001-01-15 00:00:00-05
>  216.126.84.28 | -1452855018 |   80 | 2001-01-10 00:00:00-05
>  216.126.84.28 | -1452855018 |   80 | 2001-01-09 00:00:00-05
>  216.126.84.28 | -1513325492 |   80 | 2001-01-03 00:00:00-05
>  216.126.84.28 | -1694736914 |   80 | 2001-01-12 00:00:00-05
>  216.126.84.28 | -1815677862 |   80 | 2001-01-11 00:00:00-05
>
> hub_traf_stats=# \d daily_stats
>        Table "daily_stats"
>  Attribute |   Type    | Modifier
> -----------+-----------+----------
>  ip        | inet      |
>  port      | integer   |
>  bytes     | bigint    |
>  runtime   | timestamp |
>
> do we have anything larger to work with?  I've checked docs, but that
> looks like about it :(
>
> Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
> Systems Administrator @ hub.org
> primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org
>
>

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org



Re: Nothing larger then int8?

От
Tom Lane
Дата:
The Hermit Hacker <scrappy@hub.org> writes:
> I'm logging traffic to a database, so that I can do analysis on usage and
> whatnot, and I need something bigger then int8 :(

Those "maxbytes" values shure look like they're only int4.  How are
you calculating 'em, exactly?
        regards, tom lane


Re: Nothing larger then int8?

От
Lamar Owen
Дата:
The Hermit Hacker wrote:
> if anyone is interested, here is one days worth of http traffic for the
> main PostgreSQL.Org server ... this doesn't include the traffic that the
> mirror sites absorb:
> 1160643846 / ( 1024 * 1024 * 1024 )
> 1.08gig

Not a bad day.

I've seen 100MB per day out of my http (backed by PostgreSQL since late
1997!), but the 2.5GB a day out the RealServer is the big hit....
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


Re: Nothing larger then int8?

От
The Hermit Hacker
Дата:
On Thu, 18 Jan 2001, Lamar Owen wrote:

> The Hermit Hacker wrote:
> > if anyone is interested, here is one days worth of http traffic for the
> > main PostgreSQL.Org server ... this doesn't include the traffic that the
> > mirror sites absorb:
>
> > 1160643846 / ( 1024 * 1024 * 1024 )
> > 1.08gig
>
> Not a bad day.
>
> I've seen 100MB per day out of my http (backed by PostgreSQL since late
> 1997!), but the 2.5GB a day out the RealServer is the big hit....

my *big* site:

11395533772/ ( 1024 * 1024 * 1024 )
10.61gig/day :)
   bytes    | port
-------------+------11298475398 |   81   94925095 |   80    1982130 |   20     122043 |   21      26766 |   22
2340|  137
 

just a small site :)



Re: Nothing larger then int8?

От
Alex Pilosov
Дата:
To answer your question, wouldn't numeric(30,0) be the correct?

-alex
On Thu, 18 Jan 2001, The Hermit Hacker wrote:

> 
> hrrmm ... ignore this ... I'm suspecting that what I did was copied in
> sum() data from an old table that had bytes declared as int4, without
> casting it to int8 before storing it to the new table ...
> 
> if anyone is interested, here is one days worth of http traffic for the
> main PostgreSQL.Org server ... this doesn't include the traffic that the
> mirror sites absorb:
> 
> 1160643846 / ( 1024 * 1024 * 1024 )
> 1.08gig
> 
> 
> 
> On Thu, 18 Jan 2001, The Hermit Hacker wrote:
> 
> >
> > I'm logging traffic to a database, so that I can do analysis on usage and
> > whatnot, and I need something bigger then int8 :(
> >
> > /tmp/psql.edit.70.79087: 6 lines, 222 characters.
> >       ip       |  maxbytes   | port |        runtime
> > ---------------+-------------+------+------------------------
> >  216.126.84.28 |  2169898055 |   80 | 2001-01-16 00:00:00-05
> >  216.126.84.28 |   160579228 |  873 | 2001-01-16 00:00:00-05
> >  216.126.84.28 |      365270 |   20 | 2001-01-16 00:00:00-05
> >  216.126.84.28 |      196256 |   21 | 2001-01-16 00:00:00-05
> >  216.126.84.28 |      195238 |   22 | 2001-01-16 00:00:00-05
> >  216.126.84.28 |      182492 | 1024 | 2001-01-16 00:00:00-05
> >  216.126.84.28 |      171155 |  143 | 2001-01-16 00:00:00-05
> >  216.126.84.28 | -1392384544 |   80 | 2001-01-13 00:00:00-05
> >  216.126.84.28 | -1392384544 |   80 | 2001-01-04 00:00:00-05
> >  216.126.84.28 | -1392384544 |   80 | 2001-01-05 00:00:00-05
> >  216.126.84.28 | -1392384544 |   80 | 2001-01-06 00:00:00-05
> >  216.126.84.28 | -1392384544 |   80 | 2001-01-07 00:00:00-05
> >  216.126.84.28 | -1392384544 |   80 | 2001-01-08 00:00:00-05
> >  216.126.84.28 | -1392384544 |   80 | 2001-01-14 00:00:00-05
> >  216.126.84.28 | -1452855018 |   80 | 2001-01-15 00:00:00-05
> >  216.126.84.28 | -1452855018 |   80 | 2001-01-10 00:00:00-05
> >  216.126.84.28 | -1452855018 |   80 | 2001-01-09 00:00:00-05
> >  216.126.84.28 | -1513325492 |   80 | 2001-01-03 00:00:00-05
> >  216.126.84.28 | -1694736914 |   80 | 2001-01-12 00:00:00-05
> >  216.126.84.28 | -1815677862 |   80 | 2001-01-11 00:00:00-05
> >
> > hub_traf_stats=# \d daily_stats
> >        Table "daily_stats"
> >  Attribute |   Type    | Modifier
> > -----------+-----------+----------
> >  ip        | inet      |
> >  port      | integer   |
> >  bytes     | bigint    |
> >  runtime   | timestamp |
> >
> > do we have anything larger to work with?  I've checked docs, but that
> > looks like about it :(
> >
> > Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
> > Systems Administrator @ hub.org
> > primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org
> >
> >
> 
> Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
> Systems Administrator @ hub.org
> primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org
> 
>