QUERY PLAN
Sort (cost=36.91..36.92 rows=6 width=26)
Sort Key: id
-> Bitmap Heap Scan on tbl_sales_contract_invoices (cost=21.73..36.83 rows=6 width=26)
Recheck Cond: (contract_id = ANY ('{4481,4462,4457,4467,4476,4504}'::integer[]))
-> Bitmap Index Scan on tbl_sales_contract_invoices_contract_id_idx (cost=0.00..21.73 rows=6 width=0)
Index Cond: (contract_id = ANY ('{4481,4462,4457,4467,4476,4504}'::integer[]))