QUERY PLAN
Limit (cost=30.10..30.15 rows=20 width=110)
-> Sort (cost=30.10..31.22 rows=450 width=110)
Sort Key: d.updated_at DESC
-> HashAggregate (cost=13.62..18.12 rows=450 width=110)
Group Key: d.id
-> Seq Scan on tbl_documents d (cost=0.00..12.50 rows=450 width=110)