Hallo,
ich bin neu hier. Ich bin Informatik Student und beschäftige mich im Rahmen meines Studiums mit PostgreSQL.
Ich habe eine Frage.
Kann man herausfinden auf welchen Pages ein Datensatz gespeichert ist.
Vielen Dank
Mandel83
Hallo,
ich bin neu hier. Ich bin Informatik Student und beschäftige mich im Rahmen meines Studiums mit PostgreSQL.
Ich habe eine Frage.
Kann man herausfinden auf welchen Pages ein Datensatz gespeichert ist.
Vielen Dank
Mandel83
test=*# select * from foo;
s
----
1
2
6
7
8
9
10
20
40
60
(10 rows)
test=*# select ctid, * from foo;
ctid | s
--------+----
(0,1) | 1
(0,2) | 2
(0,6) | 6
(0,7) | 7
(0,8) | 8
(0,9) | 9
(0,10) | 10
(0,11) | 20
(0,12) | 40
(0,13) | 60
(10 rows)
Die Doku sagt dazu:
ctid
The physical location of the row version within its table. Note that although the ctid can be used to locate the row version very quickly, a row's ctid will change if it is updated or moved by VACUUM FULL. Therefore ctid is useless as a long-term row identifier. The OID, or even better a user-defined serial number, should be used to identify logical rows.