CREATE TABLE tbl (c1 int, c2 int, c3 int); CREATE INDEX tbl_idx1 ON tbl(c1); INSERT INTO tbl SELECT * FROM generate_series(1, 100) A, generate_series(1, 100) B, generate_series(1, 100); まずは、以下のSQLのように、ORDER BY句のc2、c3にインデックスを利用し...
(generate_series(2000,10000),'Fragment','Confirmation'); INSERT 0 8001 app=# SELECT relpages, reltuples, reltuples/relpages as pagedata FROM pg_class WHERE relname = 'memo'; relpages | reltuples | pagedata ---+---+--- 11 | 1406 | 127.81818181818181 (1 行) app=# analyze memo;...