QUERY PLAN
Limit (cost=27.99..28.04 rows=20 width=109)
-> Sort (cost=27.99..29.01 rows=407 width=109)
Sort Key: d.updated_at DESC
-> HashAggregate (cost=13.09..17.16 rows=407 width=109)
Group Key: d.id
-> Seq Scan on tbl_documents d (cost=0.00..12.07 rows=407 width=109)