Aggregate (cost=3490.04..3490.05 rows=1 width=8) |
-> Sort (cost=3341.63..3366.36 rows=9894 width=167) |
Sort Key: s.is_draft DESC, s.end_at DESC, s.updated_at DESC |
-> HashAggregate (cost=2586.10..2685.04 rows=9894 width=167) |
Group Key: s.id |
-> Hash Left Join (cost=2251.16..2561.37 rows=9894 width=21) |
Hash Cond: (s.id = rvr.work_log_id) |
-> Hash Join (cost=2039.56..2265.63 rows=9894 width=21) |
Hash Cond: (s.created_by = u.id) |
-> Hash Right Join (cost=2031.01..2199.85 rows=21158 width=25) |
Hash Cond: (ccr.work_log_id = s.id) |
Filter: ((s.created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1017,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5296,5300,5311,5329,5332,5360,5388,5404,5420,5440,5445,5446}'::integer[])) OR (ccr.user_id = 1000)) |
-> Seq Scan on tbl_work_log_carbon_copy_rels ccr (cost=0.00..144.34 rows=9334 width=8) |
-> Hash (cost=1610.45..1610.45 rows=33645 width=33) |
-> Seq Scan on tbl_work_logs s (cost=0.00..1610.45 rows=33645 width=33) |
-> Hash (cost=7.74..7.74 rows=65 width=4) |
-> Seq Scan on tbl_users u (cost=0.00..7.74 rows=65 width=4) |
Filter: (department_id = 1) |
-> Hash (cost=116.82..116.82 rows=7582 width=4) |
-> Seq Scan on tbl_work_log_verify_rels rvr (cost=0.00..116.82 rows=7582 width=4) |