Limit (cost=2189.56..2189.57 rows=1 width=313) |
-> Sort (cost=2189.56..2189.57 rows=1 width=313) |
Sort Key: s.is_draft DESC, s.end_at DESC, s.updated_at DESC |
-> Group (cost=2189.54..2189.55 rows=1 width=313) |
Group Key: s.id |
-> Sort (cost=2189.54..2189.55 rows=1 width=297) |
Sort Key: s.id |
-> Nested Loop (cost=2000.16..2189.53 rows=1 width=297) |
Join Filter: (s.created_by = u.id) |
-> Hash Right Join (cost=2000.16..2179.85 rows=16 width=297) |
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=1999.84..1999.84 rows=26 width=297) |
-> Hash Right Join (cost=1863.11..1999.84 rows=26 width=297) |
Hash Cond: (rvr.work_log_id = s.id) |
-> Seq Scan on tbl_work_log_verify_rels rvr (cost=0.00..116.82 rows=7582 width=4) |
-> Hash (cost=1862.79..1862.79 rows=26 width=297) |
-> Seq Scan on tbl_work_logs s (cost=0.00..1862.79 rows=26 width=297) |
Filter: ((scenario_id = 1) AND (scenario_option_id = 0) AND (status = '1'::smallint)) |
-> Materialize (cost=0.00..7.78 rows=8 width=4) |
-> Seq Scan on tbl_users u (cost=0.00..7.74 rows=8 width=4) |
Filter: (department_id = 9) |