Re: Single-file databases -- how do they do it? - Mailing list pgsql-general

From Sim Zacks
Subject Re: Single-file databases -- how do they do it?
Date
Msg-id 1696335627.20041011141301@compulab.co.il
Whole thread Raw
In response to Single-file databases -- how do they do it?  (jenjhiz@yahoo.com (Gene Kahn))
List pgsql-general
I'm not an expert on the backend, but here's my best guess. The
database is stored internally as a binary file, not a text file.
Binary files are accessed randomly, not sequentially, so the database
engine opens the file and skips the the portion of the file holding
that table. It then has to hash through the data using the b-tree hash
searching.

So in the end you have a file with a number of entry points, kind of
like a table of contents. The table of contents tells the engine where
in the file to look for the data.

Sim Zacks
IT Manager
CompuLab
04-829-0145 - Office
04-832-5251 - Fax

________________________________________________________________________________

Hello,
How do single-file databases do it? If a database has, say, 10 tables,
does that mean that the single-file is just a trick to hold ten
separate 'boxes' inside, one for each table, or someone has found a
way to store all the tables of a database in one big single table? Can
someone un-curious-ify me?
Thanks,
gk

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


pgsql-general by date:

Previous
From: Marco Colombo
Date:
Subject: Re: Random not so random
Next
From: Michael Fuhr
Date:
Subject: CVS broken?