Tuesday, December 4. 2007table size, database sizeComments
Display comments as
(Linear | Threaded)
Every installation has at least two tablespaces, pg_default and pg_global: jurka=# select spcname, pg_size_pretty(pg_tablespace_size(spcname)) from pg_tablespace ; spcname | pg_size_pretty ------------+---------------- pg_default | 20 GB pg_global | 10 MB (2 rows) Comments ()
It was really helpful, thanks. My question is: How can I estimate the maximum size that is supported, row-wise, column-wise, datatype size-wise, tables-wise etc.. so that I can design my tables accordingly... for really really large data? Comments ()
Some of your questions can be answered by the documentation, as example the maximum number rows ect. The size for each data type can also be found in the docs. Size for tables and databases is more or less limited by your filesystem. Oh: and what do you mean with "really really large data"? Comments ()
I am thinking of close to around 200 columns and 200 billion rows. But that is of course a ball park figure Comments ()
The 200 billion rows should not be a real problem if you have good hardware. But 200 columns? Ever heard about normalisation? ;-) Comments ()
Yeah. I have to have a de-normalized DB Comments ()
You will - for sure - run into performance problems. Comments ()
ok.. so what is the safe upper limit of columns I can think about. Keeping hardware out of the picture, for the time being? Comments ()
You can have up to 1500something columns per table. That's the technical limit in PostgreSQL. There are also perfectly legal reasons where you need several dozen columns in one table. But usually relational databases work much better with a normalised database scheme, so you should take this into account. You also have to remember that the column overhead with 200 columns is 1k (or more). So every time you read a single row from your table there is an additional 1k+ I/O overhead. Comments ()
Have fun. Let me know if i can help you further. Andreas Comments ()
Hi could you please point me to the documentation you were referring to earlier? Comments ()
The CREATE TABLE documentation http://www.postgresql.org/docs/current/interactive/sql-createtable.html contains the information about max number columns. Look into the notes. http://www.postgresql.org/docs/current/interactive/functions-admin.html gives you an idea about the available functions for getting information about the size of almost everything in the database. Look into table 9-54. Comments ()
|
QuicksearchBlog AdministrationPostgreSQL BuchCalendar
UBERWACH!BookmarksUpcoming EventsCategoriesLast SearchStatisticsLast entry: 2010-08-31 08:54
721 entries written
490 comments have been made
917 visitor(s) this month
77 visitor(s) today
0 visitor(s) online
Top Refererswww.google.com (3476)
planete.postgresql.fr (3033) www.postgresql.org (2877) www.google.de (2847) google.com (1582) planet.postgresql.org (1509) ak-zensur.de (1358) ads.wars-nicht.de (1168) www.planetpostgresql.org (964) image.youdao.com (377) Recent Entries
Archives |
|||||||||||||||||||||||||||||||||||||||||||||||||
Damit ich es nicht wieder vergesse (und beim nächsten mal die Suchmaschinen mit den falschen Suchbegriffen füttere): Um den physikalischen Speicherplatz einer Datenbank, Tabelle, Indexes usw. zu berechnen stellt PostgreSQL einige Funktionen bereit: System Administration Functions. Um zum Beispiel ergibt... Comments ()
Tracked: Mar 24, 13:58
Vergleich mal die Gr... Comments ()
Tracked: May 02, 09:59
Comments ()
Tracked: Apr 19, 04:18