Created
March 22, 2021 12:26
-
-
Save artemeff/a09e9dffdcf7b3944f12250bade19982 to your computer and use it in GitHub Desktop.
debug sql indexes performance in production using transactions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN; | |
drop index <IDX_NAME>; | |
create index test_1 on <TABLE> (...); | |
create index test_2 on <TABLE> (...) where field = true; | |
EXPLAIN ANALYZE <QUERY> | |
ROLLBACK; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment