Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit865d26f

Browse files
committed
Update FAQ.
1 parentab604e8 commit865d26f

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

‎doc/FAQ

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Frequently Asked Questions (FAQ) for PostgreSQL
33

4-
Last updated:Thu Feb14 12:14:47 EST 2002
4+
Last updated:Mon Feb18 00:08:54 EST 2002
55

66
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
77

@@ -667,26 +667,26 @@
667667

668668
As an example, consider a file of 100,000 lines with an integer and
669669
text description on each line. Suppose the text string avergages
670-
twentycharacters in length. The flat file would be 2.8 MB. The size
671-
of thePostgreSQL database file containing this data can be estimated
672-
as 6.6MB:
670+
twentybytes in length. The flat file would be 2.8 MB. The size of the
671+
PostgreSQL database file containing this data can be estimated as 6.4
672+
MB:
673673
36 bytes: each row header (approximate)
674-
26 bytes:two intfields @ 4 bytes each
674+
24 bytes:one intfield and one text filed
675675
+ 4 bytes: pointer on page to tuple
676676
----------------------------------------
677-
66 bytes per row
677+
64 bytes per row
678678

679679
The data page size in PostgreSQL is 8192 bytes (8 KB), so:
680680

681681
8192 bytes per page
682-
------------------- =124 rows per database page (rounded down)
683-
66 bytes per row
682+
------------------- =128 rows per database page (rounded down)
683+
64 bytes per row
684684

685685
100000 data rows
686-
-------------------- =807 database pages (rounded up)
687-
124 rows per page
686+
-------------------- =782 database pages (rounded up)
687+
128 rows per page
688688

689-
807 database pages * 8192 bytes per page = 6,610,944 bytes (6.6 MB)
689+
782 database pages * 8192 bytes per page = 6,406,144 bytes (6.4 MB)
690690

691691
Indexes do not require as much overhead, but do contain the data that
692692
is being indexed, so they can be large also.

‎doc/src/FAQ/FAQ.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
alink="#0000ff">
1515
<H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
1616

17-
<P>Last updated:Thu Feb14 12:14:47 EST 2002</P>
17+
<P>Last updated:Mon Feb18 00:08:54 EST 2002</P>
1818

1919
<P>Current maintainer: Bruce Momjian (<Ahref=
2020
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
@@ -855,27 +855,27 @@ <H4><A name="4.6">4.6</A>) How much database disk space is required
855855

856856
<P>As an example, consider a file of 100,000 lines with an integer
857857
and text description on each line. Suppose the text string avergages
858-
twentycharacters in length. The flat file would be 2.8 MB. The size
858+
twentybytes in length. The flat file would be 2.8 MB. The size
859859
of the PostgreSQL database file containing this data can be
860-
estimated as 6.6 MB:</P>
860+
estimated as 6.4 MB:</P>
861861
<PRE>
862862
36 bytes: each row header (approximate)
863-
26 bytes:two intfields @ 4 bytes each
863+
24 bytes:one intfield and one text filed
864864
+ 4 bytes: pointer on page to tuple
865865
----------------------------------------
866-
66 bytes per row
866+
64 bytes per row
867867

868868
The data page size in PostgreSQL is 8192 bytes (8 KB), so:
869869

870870
8192 bytes per page
871-
------------------- =124 rows per database page (rounded down)
872-
66 bytes per row
871+
------------------- =128 rows per database page (rounded down)
872+
64 bytes per row
873873

874874
100000 data rows
875-
-------------------- =807 database pages (rounded up)
876-
124 rows per page
875+
-------------------- =782 database pages (rounded up)
876+
128 rows per page
877877

878-
807 database pages * 8192 bytes per page = 6,610,944 bytes (6.6 MB)
878+
782 database pages * 8192 bytes per page = 6,406,144 bytes (6.4 MB)
879879
</PRE>
880880

881881
<P>Indexes do not require as much overhead, but do contain the data

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp