|
10 | 10 | alink="#0000ff"> |
11 | 11 | <H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1> |
12 | 12 |
|
13 | | - <P>Last updated: Tue Feb 6 22:16:17 EST 2007</P> |
| 13 | + <P>Last updated: Thu Feb 8 22:43:13 EST 2007</P> |
14 | 14 |
|
15 | 15 | <P>Current maintainer: Bruce Momjian (<A href= |
16 | 16 | "mailto:bruce@momjian.us">bruce@momjian.us</A>) |
@@ -720,25 +720,25 @@ <H3 id="item4.5">4.5) How much database disk space is required |
720 | 720 | and text description on each line. Suppose the text string |
721 | 721 | avergages twenty bytes in length. The flat file would be 2.8 MB. |
722 | 722 | The size of the PostgreSQL database file containing this data can |
723 | | - be estimated as 5.6 MB:</P> |
| 723 | + be estimated as 5.2 MB:</P> |
724 | 724 | <PRE> |
725 | | - 28 bytes: each row header (approximate) |
| 725 | + 24 bytes: each row header (approximate) |
726 | 726 | 24 bytes: one int field and one text field |
727 | 727 | + 4 bytes: pointer on page to tuple |
728 | 728 | ---------------------------------------- |
729 | | - 56 bytes per row |
| 729 | + 52 bytes per row |
730 | 730 |
|
731 | 731 | The data page size in PostgreSQL is 8192 bytes (8 KB), so: |
732 | 732 |
|
733 | 733 | 8192 bytes per page |
734 | | - ------------------- = 146 rows per database page (rounded down) |
735 | | - 56 bytes per row |
| 734 | + ------------------- = 158 rows per database page (rounded down) |
| 735 | + 52 bytes per row |
736 | 736 |
|
737 | 737 | 100000 data rows |
738 | | - -------------------- = 685 database pages (rounded up) |
739 | | - 146 rows per page |
| 738 | + -------------------- = 633 database pages (rounded up) |
| 739 | + 158 rows per page |
740 | 740 |
|
741 | | -685 database pages * 8192 bytes per page = 5,611,520 bytes (5.6 MB) |
| 741 | +633 database pages * 8192 bytes per page = 5,185,536 bytes (5.2 MB) |
742 | 742 | </PRE> |
743 | 743 |
|
744 | 744 | <P>Indexes do not require as much overhead, but do contain the data |
|
0 commit comments