Reply to Re: MySQL Auto Increment

Your name:

Reply:


Posted by Norman Peelman on 08/21/05 17:18

"Smitro" <nospam@myh0use.c0m> wrote in message
news:430860f6$1@quokka.wn.com.au...
> Hey,
>
> I have a site that is about to go into production
> and it has a couple of tables that it uses that
> could get quite large once in full swing, most of
> them have a column called "id" and it auto
> increments every time a new row is added. When
> setting this up, what do you recommend using at
> the column type and size. atm I have gone for a
> big-int with the size of 20. I wonder over time
> will 20 be enough... Should I just think of a big
> number and use it?
>
> Anyone else in this situation and what would you do?

BIGINT = (signed) -2^63-1 to 2^63-1 -or- (unsigned) 2^64-1, which in either
case is more than you'll ever need.
2^32-1 = 4,294,967,295 (4 billion 10 digits)
2^39-1 = 549,755,813,887 (549 billion 12 digits)
2^63-1 = 9,223,372,036,854,775,807 (19 digits)
2^64-1 = 18,446,744,073,709,551,615 (20 digits)

Storage size for BIGINT is 8 bytes, the size you are refering to (20) is the
size that MySQL would use to display the
number in the command line output. I don't beleive it has anything to do
with PHP (could be wrong).


Norm
---
FREE Avatar hosting at www.easyavatar.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация