You are here: Re: MySQL Auto Increment « PHP Programming Language « IT news, forums, messages
Re: MySQL Auto Increment

Posted by Marcin Dobrucki on 08/22/05 00:52

Smitro wrote:

> 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?

Define "could get quite large"? If you have a system with, say, 100
queries/s (not a bad load already), then:

100 * 3600 * 24 = 8'640'000 records / day

An unsigned int (which I usually use myself for these kinds of
fields) is 4294967295, so with that kind of load you will run out of
id's in... about 1.4 years. However, 4 billion rows is already quite a
large table. Are you really going to get anywhere close to that?

/Marcin

 

Navigation:

[Reply to this 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

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