Обсуждение: PGSQL Capacity
Hello How can i know a capacity of a pg database ? How many records my table can have ? I saw in a message that someone have 50 000 records it's possible in a table ? (My table have 8 string field (length 32 car)). Thanks for your response. Nanou
bouchia.nazha@free.fr wrote: > Hello > > How can i know a capacity of a pg database ? > How many records my table can have ? > I saw in a message that someone have 50 000 records it's possible in a table ? > (My table have 8 string field (length 32 car)). > Thanks for your response. > > > Nanou The capacity for a PG database is just the limit of how much disk space you have. There are people who have 100 million or even up to a billion rows in one table. If you are in the billions you have to take some care about OID wraparound, but at the very least the maximum number of rows in one table is at least 2Billion. With 8 string fields and 32 chars each, if they are all filled, you will take about (32+4)*8 = 324 + overhead bytes each, so I would estimate about 400 per. If we add a whole lot to be safe, and say 1k per row, you can fit 1Million rows in 1GB of disk space. There is more taken up by indexes, etc. Generally, you are disk limited, not limited by Postgres. John =:->
Вложения
> -----Original Message----- > From: bouchia.nazha@free.fr [mailto:bouchia.nazha@free.fr] > Sent: Monday, May 09, 2005 2:23 PM > To: pgsql-performance@postgresql.org > Subject: [PERFORM] PGSQL Capacity > > How can i know a capacity of a pg database ? > How many records my table can have ? > I saw in a message that someone have 50 000 records it's > possible in a table ? > (My table have 8 string field (length 32 car)). > Thanks for your response. You're basically limited to the size of your hard drive(s). The actual limit is in the terabyte range. __ David B. Held Software Engineer/Array Services Group 200 14th Ave. East, Sartell, MN 56377 320.534.3637 320.253.7800 800.752.8129
On Mon, May 09, 2005 at 09:22:40PM +0200, bouchia.nazha@free.fr wrote: > How can i know a capacity of a pg database ? > How many records my table can have ? > I saw in a message that someone have 50 000 records it's possible in a table ? > (My table have 8 string field (length 32 car)). > Thanks for your response. You can have several million records in a table easily -- I've done 10 million personally, but you can find people doing that many records a _day_. Hitting 1 billion records should probably not be impossible either -- it all depends on your hardware, and perhaps more importantly, what kind of queries you're running against it. 50000 is absolutely no problem at all. /* Steinar */ -- Homepage: http://www.sesse.net/
bouchia.nazha@free.fr writes: > How can i know a capacity of a pg database ? > How many records my table can have ? > I saw in a message that someone have 50 000 records it's possible in a table ? > (My table have 8 string field (length 32 car)). > Thanks for your response. The capacity is much more likely to be limited by the size of the disk drives and filesystems you have available to you than by anything else. If your table consists of 8- 32 character strings, then each tuple will consume around 256 bytes of memory, and you will be able to fit on the order of 30 tuples into each 8K page. By default, you can extend a single table file to up to 1GB before it splits off to another piece. That would mean each file can have about 3.9M tuples. From there, you can have as many 1GB pieces as the disk will support. So you could have (plenty * 3.9M tuples), which could add up to be rather large. If you're expecting 50K records, that will be no big deal at all. -- (format nil "~S@~S" "cbbrowne" "acm.org") http://www.ntlug.org/~cbbrowne/sap.html Rules of the Evil Overlord #78. "I will not tell my Legions of Terror "And he must be taken alive!" The command will be: ``And try to take him alive if it is reasonably practical.''" <http://www.eviloverlord.com/>
http://stats.distributed.net has a table that's 130M rows. http://stats.distributed.net/participant/phistory.php?project_id=8&id=39622 is a page that hits that table, and as you can see it's quite fast. This is on a dual opteron with 4G of memory. Unless you're looking for sub millisecond response times, 50k rows is nothing. On Mon, May 09, 2005 at 09:32:18PM +0200, Steinar H. Gunderson wrote: > On Mon, May 09, 2005 at 09:22:40PM +0200, bouchia.nazha@free.fr wrote: > > How can i know a capacity of a pg database ? > > How many records my table can have ? > > I saw in a message that someone have 50 000 records it's possible in a table ? > > (My table have 8 string field (length 32 car)). > > Thanks for your response. > > You can have several million records in a table easily -- I've done 10 > million personally, but you can find people doing that many records a _day_. > Hitting 1 billion records should probably not be impossible either -- it all > depends on your hardware, and perhaps more importantly, what kind of queries > you're running against it. 50000 is absolutely no problem at all. > > /* Steinar */ > -- > Homepage: http://www.sesse.net/ > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings > -- Jim C. Nasby, Database Consultant decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"