Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
bc6fb543
Commit
bc6fb543
authored
Feb 09, 2007
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update FAQ for new 24-byte header, down from 28.
parent
1ad2f04b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
doc/FAQ
doc/FAQ
+9
-9
doc/src/FAQ/FAQ.html
doc/src/FAQ/FAQ.html
+9
-9
No files found.
doc/FAQ
View file @
bc6fb543
Frequently Asked Questions (FAQ) for PostgreSQL
Frequently Asked Questions (FAQ) for PostgreSQL
Last updated: T
ue Feb 6 22:16:17
EST 2007
Last updated: T
hu Feb 8 22:43:13
EST 2007
Current maintainer: Bruce Momjian (bruce@momjian.us)
Current maintainer: Bruce Momjian (bruce@momjian.us)
...
@@ -547,25 +547,25 @@
...
@@ -547,25 +547,25 @@
As an example, consider a file of 100,000 lines with an integer and
As an example, consider a file of 100,000 lines with an integer and
text description on each line. Suppose the text string avergages
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
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:
MB:
2
8
bytes: each row header (approximate)
2
4
bytes: each row header (approximate)
24 bytes: one int field and one text field
24 bytes: one int field and one text field
+ 4 bytes: pointer on page to tuple
+ 4 bytes: pointer on page to tuple
----------------------------------------
----------------------------------------
5
6
bytes per row
5
2
bytes per row
The data page size in PostgreSQL is 8192 bytes (8 KB), so:
The data page size in PostgreSQL is 8192 bytes (8 KB), so:
8192 bytes per page
8192 bytes per page
------------------- = 1
46
rows per database page (rounded down)
------------------- = 1
58
rows per database page (rounded down)
5
6
bytes per row
5
2
bytes per row
100000 data rows
100000 data rows
-------------------- = 6
85
database pages (rounded up)
-------------------- = 6
33
database pages (rounded up)
1
46
rows per page
1
58
rows per page
6
85 database pages * 8192 bytes per page = 5,611,520 bytes (5.6
MB)
6
33 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
Indexes do not require as much overhead, but do contain the data that
is being indexed, so they can be large also.
is being indexed, so they can be large also.
...
...
doc/src/FAQ/FAQ.html
View file @
bc6fb543
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
alink=
"#0000ff"
>
alink=
"#0000ff"
>
<H1>
Frequently Asked Questions (FAQ) for PostgreSQL
</H1>
<H1>
Frequently Asked Questions (FAQ) for PostgreSQL
</H1>
<P>
Last updated: T
ue Feb 6 22:16:17
EST 2007
</P>
<P>
Last updated: T
hu Feb 8 22:43:13
EST 2007
</P>
<P>
Current maintainer: Bruce Momjian (
<A
href=
<P>
Current maintainer: Bruce Momjian (
<A
href=
"mailto:bruce@momjian.us"
>
bruce@momjian.us
</A>
)
"mailto:bruce@momjian.us"
>
bruce@momjian.us
</A>
)
...
@@ -720,25 +720,25 @@ table?</TD><TD>unlimited</TD></TR>
...
@@ -720,25 +720,25 @@ table?</TD><TD>unlimited</TD></TR>
and text description on each line. Suppose the text string
and text description on each line. Suppose the text string
avergages twenty bytes in length. The flat file would be 2.8 MB.
avergages twenty bytes in length. The flat file would be 2.8 MB.
The size of the PostgreSQL database file containing this data can
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>
<PRE>
2
8
bytes: each row header (approximate)
2
4
bytes: each row header (approximate)
24 bytes: one int field and one text field
24 bytes: one int field and one text field
+ 4 bytes: pointer on page to tuple
+ 4 bytes: pointer on page to tuple
----------------------------------------
----------------------------------------
5
6
bytes per row
5
2
bytes per row
The data page size in PostgreSQL is 8192 bytes (8 KB), so:
The data page size in PostgreSQL is 8192 bytes (8 KB), so:
8192 bytes per page
8192 bytes per page
------------------- = 1
46
rows per database page (rounded down)
------------------- = 1
58
rows per database page (rounded down)
5
6
bytes per row
5
2
bytes per row
100000 data rows
100000 data rows
-------------------- = 6
85
database pages (rounded up)
-------------------- = 6
33
database pages (rounded up)
1
46
rows per page
1
58
rows per page
6
85 database pages * 8192 bytes per page = 5,611,520 bytes (5.6
MB)
6
33 database pages * 8192 bytes per page = 5,185,536 bytes (5.2
MB)
</PRE>
</PRE>
<P>
Indexes do not require as much overhead, but do contain the data
<P>
Indexes do not require as much overhead, but do contain the data
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment