QUERY PLAN
Aggregate (cost=43.02..43.03 rows=1 width=8)
-> Sort (cost=36.56..37.63 rows=431 width=611)
Sort Key: d.updated_at DESC
-> HashAggregate (cost=13.39..17.70 rows=431 width=611)
Group Key: d.id
-> Seq Scan on tbl_documents d (cost=0.00..12.31 rows=431 width=12)