QUERY PLAN
Sort (cost=99.12..99.17 rows=21 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..98.66 rows=21 width=26)
Filter: (contract_id = ANY ('{2534,2739,2765,2777,2742,2776,2737,2647,2589,2672,2662,2658,2865,2599,2812,2878,2783,2756,2708,2817}'::integer[]))