QUERY PLAN
Aggregate (cost=32.67..32.68 rows=1 width=8)
-> Sort (cost=32.43..32.47 rows=16 width=588)
Sort Key: cd.created_at DESC
-> Group (cost=32.03..32.11 rows=16 width=588)
Group Key: cd.id
-> Sort (cost=32.03..32.07 rows=16 width=12)
Sort Key: cd.id
-> Seq Scan on tbl_client_documents cd (cost=0.00..31.71 rows=16 width=12)
Filter: (client_id = 2128)