From: | Lynna Landstreet <lynna(at)gallery44(dot)org> |
---|---|
To: | Eduardo V=?ISO-8859-1?B?4XpxdWV6IFJvZHLt?=guez <evazquez(at)insys-corp(dot)com(dot)mx>, <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Limit with serial |
Date: | 2004-07-09 17:54:13 |
Message-ID: | BD145405.1593%lynna@gallery44.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
on 7/9/04 1:32 PM, Eduardo Vázquez Rodríguez at evazquez(at)insys-corp(dot)com(dot)mx
wrote:
> Hi I create a field this way
> id_log serial NOT NULL
>
> But my records will increment aproximately 500, 000 everyday
>
> What is the maximum number of serial permits?
>
> The type of my serial is int4.
>
> Thanks in advanced
Wow, a question *I* can actually answer! :-)
According to the table of numeric data types in the PostgreSQL 7.4 docs
(http://www.postgresql.org/docs/7.4/interactive/datatype.html#DATATYPE-NUMER
IC-TABLE), the range for int4 is -2,147,483,648 to +2,147,483,647. So if
you're adding 500,000 new rows every day, you will hit the limit after 4295
days, or a little less than 12 years.
If you expect to be using this database longer than that, go with int8
instead.
Lynna
--
Resource Centre Database Coordinator
Gallery 44: www.gallery44.org
Database Project: www.gallery44db.org
From | Date | Subject | |
---|---|---|---|
Next Message | Ennio-Sr | 2004-07-09 21:18:45 | Re: [LONG] Need help on pg_dump! |
Previous Message | Eduardo Vázquez Rodríguez | 2004-07-09 17:32:35 | Limit with serial |