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