Skip to content

Instantly share code, notes, and snippets.

@posulliv
Created April 7, 2009 04:10
Show Gist options
  • Save posulliv/91095 to your computer and use it in GitHub Desktop.
Save posulliv/91095 to your computer and use it in GitHub Desktop.
A query plan in PostgreSQL with a hash join
padraig=# explain select t2.text from t1, t2 where t1.id = t2.id;
QUERY PLAN
--------------------------------------------------------------
Hash Join (cost=1.07..2.16 rows=4 width=21)
Hash Cond: (t2.id = t1.id)
-> Seq Scan on t2 (cost=0.00..1.04 rows=4 width=25)
-> Hash (cost=1.03..1.03 rows=3 width=4)
-> Seq Scan on t1 (cost=0.00..1.03 rows=3 width=4)
(5 rows)
padraig=#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment