Last active
August 29, 2015 14:17
-
-
Save snaga/82173bd49749ccf0fa6c to your computer and use it in GitHub Desktop.
test_brin.sql
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
-- for more details, visit below. | |
-- http://michael.otacoo.com/postgresql-2/postgres-9-5-feature-highlight-brin-indexes/ | |
\timing | |
CREATE TABLE brin_example AS SELECT generate_series(1,100000000) AS id; | |
CREATE INDEX brin_index ON brin_example USING brin(id); | |
EXPLAIN ANALYZE SELECT id FROM brin_example WHERE id = 52342323; | |
CREATE INDEX btree_index ON brin_example(id); | |
EXPLAIN ANALYZE SELECT id FROM brin_example WHERE id = 52342323; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment