]> granicus.if.org Git - postgresql/commitdiff
Update FAQ for new 24-byte header, down from 28.
authorBruce Momjian <bruce@momjian.us>
Fri, 9 Feb 2007 03:43:22 +0000 (03:43 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 9 Feb 2007 03:43:22 +0000 (03:43 +0000)
doc/FAQ
doc/src/FAQ/FAQ.html

diff --git a/doc/FAQ b/doc/FAQ
index 0f4e45b269c74933fdb39c1b407dbb1992f05528..9754fe8127f97e81a2e010866123dcd09887c514 100644 (file)
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -1,7 +1,7 @@
 
                 Frequently Asked Questions (FAQ) for PostgreSQL
                                        
-   Last updated: Tue Feb 6 22:16:17 EST 2007
+   Last updated: Thu Feb 8 22:43:13 EST 2007
    
    Current maintainer: Bruce Momjian (bruce@momjian.us)
    
    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 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 5.6
+   PostgreSQL database file containing this data can be estimated as 5.2
    MB:
-    28 bytes: each row header (approximate)
+    24 bytes: each row header (approximate)
     24 bytes: one int field and one text field
    + 4 bytes: pointer on page to tuple
    ----------------------------------------
-    56 bytes per row
+    52 bytes per row
 
    The data page size in PostgreSQL is 8192 bytes (8 KB), so:
 
    8192 bytes per page
-   -------------------   =  146 rows per database page (rounded down)
-     56 bytes per row
+   -------------------   =  158 rows per database page (rounded down)
+     52 bytes per row
 
    100000 data rows
-   --------------------  =  685 database pages (rounded up)
-      146 rows per page
+   --------------------  =  633 database pages (rounded up)
+      158 rows per page
 
-685 database pages * 8192 bytes per page  =  5,611,520 bytes (5.6 MB)
+633 database pages * 8192 bytes per page  =  5,185,536 bytes (5.2 MB)
 
    Indexes do not require as much overhead, but do contain the data that
    is being indexed, so they can be large also.
index fdcced96bf9032af285516ae23b255c46050b927..61e386aa3de29ceb9fc90be0c14caa4ebe623cff 100644 (file)
@@ -10,7 +10,7 @@
   alink="#0000ff">
     <H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
 
-    <P>Last updated: Tue Feb  6 22:16:17 EST 2007</P>
+    <P>Last updated: Thu Feb  8 22:43:13 EST 2007</P>
 
     <P>Current maintainer: Bruce Momjian (<A href=
     "mailto:bruce@momjian.us">bruce@momjian.us</A>)
@@ -720,25 +720,25 @@ table?</TD><TD>unlimited</TD></TR>
     and text description on each line. Suppose the text string
     avergages 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 5.6 MB:</P>
+    be estimated as 5.2 MB:</P>
 <PRE>
-    28 bytes: each row header (approximate)
+    24 bytes: each row header (approximate)
     24 bytes: one int field and one text field
    + 4 bytes: pointer on page to tuple
    ----------------------------------------
-    56 bytes per row
+    52 bytes per row
 
    The data page size in PostgreSQL is 8192 bytes (8 KB), so:
 
    8192 bytes per page
-   -------------------   =  146 rows per database page (rounded down)
-     56 bytes per row
+   -------------------   =  158 rows per database page (rounded down)
+     52 bytes per row
 
    100000 data rows
-   --------------------  =  685 database pages (rounded up)
-      146 rows per page
+   --------------------  =  633 database pages (rounded up)
+      158 rows per page
 
-685 database pages * 8192 bytes per page  =  5,611,520 bytes (5.6 MB)
+633 database pages * 8192 bytes per page  =  5,185,536 bytes (5.2 MB)
 </PRE>
 
     <P>Indexes do not require as much overhead, but do contain the data