dbTalk Databases Forums  

Re: Limit with serial

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Re: Limit with serial in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lynna Landstreet
 
Posts: n/a

Default Re: Limit with serial - 07-09-2004 , 12:54 PM






on 7/9/04 1:32 PM, Eduardo Vázquez Rodríguez at evazquez (AT) insys-corp (DOT) com.mx
wrote:

Quote:
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/i...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



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.