Açıklaması şöyle
We all know how indexes can optimize query plans if used carefully. Since index creation requires resources, it would have been nice to have a way to know beforehand whether postgres will use those indexes or not.HypoPg, a postgres extension lets you do just that. It can be used to create a hypothetical index without costing you resources and enables you to analyse the index performance.
Şöyle yaparız. Sequence Scan veya Index Scan kullanıldığını gösterir
SELECT * FROM hypopg_create_index('CREATE INDEX ON mytable (id)');EXPLAIN SELECT * FROM mytable WHERE id = 1;
Diğer
Açıklaması şöyle
hypopg_reset() — to clear the previous effects of other indexeshypopg_drop_index(indexrelid) — to remove your backend’s hypothetical indexeshypopg_hide_index(oid) — to hide an indexhypopg_unhide_index(oid) — to restore the index
Hiç yorum yok:
Yorum Gönder