Limit (cost=445.23..447.48 rows=20 width=211) |
-> Unique (cost=445.23..475.60 rows=270 width=211) |
-> Sort (cost=445.23..445.90 rows=270 width=211) |
Sort Key: s.updated_at DESC, s.id, s.sales_order_id, s.product_id, s.parent, s.sn, s.supplier_id, s."order", s.created_by, s.created_at, s.pn, s.product_type, s.product_component, s.product_brand, s.product_serie, s.product_misc, s.hardware_from, s.software_from, s.maintenance_from, s.hardware_to, s.software_to, s.maintenance_to, s.new_hardware_deadline, s.new_software_deadline, s.new_maintenance_deadline, s.client_id, s.project_id, s.sales_rep, s.sales_date, s.description, s.software_reminded, s.hardware_reminded, s.maintenance_reminded, s.software_advance_reminded, s.hardware_advance_reminded, s.maintenance_advance_reminded, s.is_system, s.amount, s.cost, s.is_renew, s.renew_to_sales_order_item_id, s.number, s.is_merge, s.need_sn |
-> HashAggregate (cost=431.62..434.32 rows=270 width=211) |
Group Key: s.id |
-> Hash Left Join (cost=99.72..430.95 rows=270 width=211) |
Hash Cond: (s.id = log.sales_order_item_id) |
-> Nested Loop (cost=87.76..416.85 rows=270 width=211) |
-> Seq Scan on tbl_sales_group_relationships sgr (cost=0.00..1.73 rows=1 width=4) |
Filter: ((sales_id = 1001) AND (group_id = 1)) |
-> Hash Join (cost=87.76..412.41 rows=270 width=215) |
Hash Cond: (s.client_id = client.id) |
-> Seq Scan on tbl_sales_order_items s (cost=0.00..300.77 rows=9077 width=211) |
-> Hash (cost=87.03..87.03 rows=58 width=8) |
-> Bitmap Heap Scan on tbl_clients client (cost=4.73..87.03 rows=58 width=8) |
Recheck Cond: (sales_rep = 1001) |
Filter: (NOT deleted) |
-> Bitmap Index Scan on tbl_clients_sales_rep_idx (cost=0.00..4.71 rows=58 width=0) |
Index Cond: (sales_rep = 1001) |
-> Hash (cost=7.54..7.54 rows=354 width=4) |
-> Seq Scan on tbl_sales_order_item_renew_logs log (cost=0.00..7.54 rows=354 width=4) |