Tablesample In PostgreSQL 9.5

In this example our aim is to retrieve the same number of samples as the table gets bigger in each test. We will be observing the amount of increase in the time it takes to retrieve 1000 samples with the SYSTEM sampling method.


SELECT * FROM ts_test TABLESAMPLE SYSTEM(percentage)