Skip to content

Instantly share code, notes, and snippets.

@rightfold
Created September 20, 2013 08:18
Show Gist options
  • Save rightfold/5d7601d8545ff29885c5 to your computer and use it in GitHub Desktop.
Save rightfold/5d7601d8545ff29885c5 to your computer and use it in GitHub Desktop.
=# CREATE OR REPLACE VIEW v AS
-# SELECT *
-# FROM t;
CREATE VIEW
=# EXPLAIN ANALYSE
-# SELECT c
-# FROM v
-# WHERE d = 'x';
QUERY PLAN
---------------------------------------------------------------------------------------------
Seq Scan on t (cost=0.00..5.00 rows=199 width=91) (actual time=0.008..0.025 rows=1 loops=1)
Filter: (d = 'x')
Rows Removed by Filter: 200
Total runtime: 0.048 ms
(4 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment