| Aggregate (cost=9521.04..9521.05 rows=1 width=8) |
| -> Sort (cost=9131.13..9196.11 rows=25994 width=175) |
| Sort Key: s.is_draft DESC, s.end_at DESC, s.updated_at DESC NULLS LAST, s.created_at DESC |
| -> HashAggregate (cost=4742.56..5002.50 rows=25994 width=175) |
| Group Key: s.id, lin.id, lout.id |
| -> Hash Left Join (cost=4020.21..4547.61 rows=25994 width=37) |
| Hash Cond: (s.id = rvr.work_log_id) |
| -> Hash Left Join (cost=3791.79..4097.41 rows=25994 width=37) |
| Hash Cond: (s.location_out_id = lout.id) |
| -> Hash Left Join (cost=2975.87..3213.26 rows=25994 width=37) |
| Hash Cond: (s.location_in_id = lin.id) |
| -> Hash Right Join (cost=2159.95..2329.10 rows=25994 width=37) |
| Hash Cond: (ccr.work_log_id = s.id) |
| Filter: ((s.created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5300,5311,5332,5360,5446,5461,5476}'::integer[])) OR (ccr.user_id = 1001)) |
| -> Seq Scan on tbl_work_log_carbon_copy_rels ccr (cost=0.00..144.59 rows=9359 width=8) |
| -> Hash (cost=1713.31..1713.31 rows=35731 width=49) |
| -> Seq Scan on tbl_work_logs s (cost=0.00..1713.31 rows=35731 width=49) |
| -> Hash (cost=556.52..556.52 rows=20752 width=4) |
| -> Seq Scan on tbl_location lin (cost=0.00..556.52 rows=20752 width=4) |
| -> Hash (cost=556.52..556.52 rows=20752 width=4) |
| -> Seq Scan on tbl_location lout (cost=0.00..556.52 rows=20752 width=4) |
| -> Hash (cost=126.52..126.52 rows=8152 width=4) |
| -> Seq Scan on tbl_work_log_verify_rels rvr (cost=0.00..126.52 rows=8152 width=4) |