Aggregate (cost=295.03..295.04 rows=1 width=8) |
-> Hash Join (cost=234.80..292.42 rows=1042 width=0) |
Hash Cond: (tbl_purchase_contract_invoices.id = pci.id) |
-> Seq Scan on tbl_purchase_contract_invoices (cost=0.00..51.66 rows=2266 width=4) |
-> Hash (cost=221.78..221.78 rows=1042 width=4) |
-> HashAggregate (cost=200.94..211.36 rows=1042 width=4) |
Group Key: pci.id |
-> Hash Right Join (cost=119.56..198.33 rows=1042 width=4) |
Hash Cond: (pcpp.purchase_invoice_id = pci.id) |
-> Seq Scan on tbl_purchase_invoice_products pcpp (cost=0.00..61.13 rows=2113 width=4) |
-> Hash (cost=106.54..106.54 rows=1042 width=4) |
-> Hash Right Join (cost=70.35..106.54 rows=1042 width=4) |
Hash Cond: (pip.purchase_invoice_id = pci.id) |
-> Seq Scan on tbl_purchase_invoice_projects pip (cost=0.00..30.94 rows=1994 width=8) |
-> Hash (cost=57.33..57.33 rows=1042 width=12) |
-> Seq Scan on tbl_purchase_contract_invoices pci (cost=0.00..57.33 rows=1042 width=12) |
Filter: ((from_date >= '2024-08-01'::date) OR (NOT is_draft)) |