QUERY PLAN
HashAggregate (cost=17.60..17.79 rows=19 width=48)
Group Key: dg.id
-> Hash Left Join (cost=1.43..15.35 rows=450 width=286)
Hash Cond: (d.document_type_id = dg.id)
-> Seq Scan on tbl_documents d (cost=0.00..12.50 rows=450 width=12)
-> Hash (cost=1.19..1.19 rows=19 width=278)
-> Seq Scan on tbl_document_types dg (cost=0.00..1.19 rows=19 width=278)