From: Bruce Momjian Date: Mon, 18 Feb 2002 05:09:01 +0000 (+0000) Subject: Update FAQ. X-Git-Tag: REL7_3~2123 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=865d26fdd632890167035dac905b6379d4383209;p=postgresql Update FAQ. --- diff --git a/doc/FAQ b/doc/FAQ index 20a03f9b15..075bc461d1 100644 --- a/doc/FAQ +++ b/doc/FAQ @@ -1,7 +1,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL - Last updated: Thu Feb 14 12:14:47 EST 2002 + Last updated: Mon Feb 18 00:08:54 EST 2002 Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) @@ -667,26 +667,26 @@ As an example, consider a file of 100,000 lines with an integer and text description on each line. Suppose the text string avergages - twenty characters in length. The flat file would be 2.8 MB. The size - of the PostgreSQL database file containing this data can be estimated - as 6.6 MB: + twenty bytes in length. The flat file would be 2.8 MB. The size of the + PostgreSQL database file containing this data can be estimated as 6.4 + MB: 36 bytes: each row header (approximate) - 26 bytes: two int fields @ 4 bytes each + 24 bytes: one int field and one text filed + 4 bytes: pointer on page to tuple ---------------------------------------- - 66 bytes per row + 64 bytes per row The data page size in PostgreSQL is 8192 bytes (8 KB), so: 8192 bytes per page - ------------------- = 124 rows per database page (rounded down) - 66 bytes per row + ------------------- = 128 rows per database page (rounded down) + 64 bytes per row 100000 data rows - -------------------- = 807 database pages (rounded up) - 124 rows per page + -------------------- = 782 database pages (rounded up) + 128 rows per page -807 database pages * 8192 bytes per page = 6,610,944 bytes (6.6 MB) +782 database pages * 8192 bytes per page = 6,406,144 bytes (6.4 MB) Indexes do not require as much overhead, but do contain the data that is being indexed, so they can be large also. diff --git a/doc/src/FAQ/FAQ.html b/doc/src/FAQ/FAQ.html index 9ad2d5089c..2f5cf11f46 100644 --- a/doc/src/FAQ/FAQ.html +++ b/doc/src/FAQ/FAQ.html @@ -14,7 +14,7 @@ alink="#0000ff">

Frequently Asked Questions (FAQ) for PostgreSQL

-

Last updated: Thu Feb 14 12:14:47 EST 2002

+

Last updated: Mon Feb 18 00:08:54 EST 2002

Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
@@ -855,27 +855,27 @@

As an example, consider a file of 100,000 lines with an integer and text description on each line. Suppose the text string avergages - twenty characters in length. The flat file would be 2.8 MB. The size + twenty bytes in length. The flat file would be 2.8 MB. The size of the PostgreSQL database file containing this data can be - estimated as 6.6 MB:

+ estimated as 6.4 MB:

     36 bytes: each row header (approximate)
-    26 bytes: two int fields @ 4 bytes each
+    24 bytes: one int field and one text filed
    + 4 bytes: pointer on page to tuple
    ----------------------------------------
-    66 bytes per row
+    64 bytes per row
 
    The data page size in PostgreSQL is 8192 bytes (8 KB), so:
 
    8192 bytes per page
-   -------------------   =  124 rows per database page (rounded down)
-     66 bytes per row
+   -------------------   =  128 rows per database page (rounded down)
+     64 bytes per row
 
    100000 data rows
-   --------------------  =  807 database pages (rounded up)
-      124 rows per page
+   --------------------  =  782 database pages (rounded up)
+      128 rows per page
 
-807 database pages * 8192 bytes per page  =  6,610,944 bytes (6.6 MB)
+782 database pages * 8192 bytes per page  =  6,406,144 bytes (6.4 MB)
 

Indexes do not require as much overhead, but do contain the data