This article is half-done without your Comment! *** Please share your thoughts via Comment ***
If you don’t know what VM and FSM is, I would suggest to read below articles:
PostgreSQL 9.6 introduced a pg_visibility module to get the visibility map information of your table, and it is also giving page level information.
For removing fragmentation, and improve the query performance we should check the visibility map of our table.
For that, you need to create a pg_visibility module in PostgreSQL 9.6 and use it.
Previously, people are checking the suffix _vm files which associate with your relation.
Check the below demonstration on how to use pg_visibility:
Create a pg_visibility extension:
1 |
CREATE EXTENSION pg_visibility; |
Create a sample table with 10000 dummy records:
1 |
CREATE TABLE tbl_checkvmap AS SELECT generate_series(1,10000) AS id; |
Check the visibility map:
1 |
SELECT * FROM pg_visibility('tbl_checkvmap'::regclass); |
Leave a Reply