QUERY PLAN
Sort (cost=82.15..82.16 rows=1 width=16)
Sort Key: created_at DESC, id DESC
-> Seq Scan on tbl_purchase_contracts (cost=0.00..82.14 rows=1 width=16)
Filter: ((created_by = 1001) AND (cost_type = 2))