QUERY PLAN
Limit (cost=37.62..37.67 rows=20 width=77)
-> Sort (cost=37.62..38.00 rows=151 width=77)
Sort Key: created_at DESC
-> HashAggregate (cost=32.09..33.60 rows=151 width=77)
Group Key: id
-> Seq Scan on tbl_client_documents cd (cost=0.00..31.71 rows=151 width=77)
Filter: (client_id = 149)