QUERY PLAN
Sort (cost=67.83..67.91 rows=31 width=26)
Sort Key: id
-> Bitmap Heap Scan on tbl_sales_contract_invoices (cost=40.35..67.06 rows=31 width=26)
Recheck Cond: (contract_id = ANY ('{4493,4494,4349,4495,4481,4480,4433,4248,4235,4257,4291,4285,4324,4323,4373,4112,4106,4144,4388,4446,4453,4399,4467,4476,4462,4479,4457,4478,4486}'::integer[]))
-> Bitmap Index Scan on tbl_sales_contract_invoices_contract_id_idx (cost=0.00..40.34 rows=31 width=0)
Index Cond: (contract_id = ANY ('{4493,4494,4349,4495,4481,4480,4433,4248,4235,4257,4291,4285,4324,4323,4373,4112,4106,4144,4388,4446,4453,4399,4467,4476,4462,4479,4457,4478,4486}'::integer[]))