Aggregate (cost=1207.17..1207.18 rows=1 width=8) |
-> Sort (cost=1207.07..1207.09 rows=7 width=998) |
Sort Key: c.signed_at DESC, c.created_at DESC |
-> Group (cost=1205.11..1206.97 rows=7 width=998) |
Group Key: c.id |
-> Nested Loop (cost=1205.11..1206.95 rows=7 width=16) |
-> Merge Left Join (cost=1196.81..1196.95 rows=7 width=20) |
Merge Cond: (c.id = vs.object_id) |
-> Sort (cost=819.87..819.88 rows=7 width=20) |
Sort Key: c.id |
-> Hash Right Join (cost=439.49..819.77 rows=7 width=20) |
Hash Cond: (rs.object_id = c.id) |
-> Seq Scan on tbl_attachement_relationships rs (cost=0.00..376.24 rows=1074 width=4) |
Filter: (object_type = 106) |
-> Hash (cost=439.40..439.40 rows=7 width=20) |
-> Hash Right Join (cost=59.14..439.40 rows=7 width=20) |
Hash Cond: (cs.object_id = c.id) |
-> Seq Scan on tbl_attachement_relationships cs (cost=0.00..376.24 rows=1535 width=4) |
Filter: (object_type = 105) |
-> Hash (cost=59.05..59.05 rows=7 width=24) |
-> Seq Scan on tbl_sales_contracts c (cost=0.00..59.05 rows=7 width=24) |
Filter: (client_id = 2094) |
-> Sort (cost=376.94..377.01 rows=29 width=4) |
Sort Key: vs.object_id |
-> Seq Scan on tbl_attachement_relationships vs (cost=0.00..376.24 rows=29 width=4) |
Filter: (object_type = 107) |
-> Materialize (cost=8.31..9.92 rows=1 width=4) |
-> Hash Right Join (cost=8.31..9.91 rows=1 width=4) |
Hash Cond: (sgr.sales_id = client.sales_rep) |
-> Seq Scan on tbl_sales_group_relationships sgr (cost=0.00..1.47 rows=47 width=4) |
-> Hash (cost=8.29..8.29 rows=1 width=8) |
-> Index Scan using tbl_clients_pkey on tbl_clients client (cost=0.28..8.29 rows=1 width=8) |
Index Cond: (id = 2094) |