Limit (cost=5320.11..5320.11 rows=1 width=207) |
-> Sort (cost=5320.11..5320.11 rows=1 width=207) |
Sort Key: r.created_at DESC |
-> Group (cost=67.95..5320.10 rows=1 width=207) |
Group Key: r.id |
-> Merge Left Join (cost=67.95..373.10 rows=1978800 width=207) |
Merge Cond: (r.id = crvr.punch_overtime_id) |
-> Nested Loop Left Join (cost=0.12..151.77 rows=2040 width=207) |
Join Filter: (rccr.punch_overtime_id = r.id) |
Filter: ((r.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 (rccr.user_id = 1001) OR (rvr.user_id = 1001)) |
-> Nested Loop Left Join (cost=0.12..9.16 rows=1 width=211) |
Join Filter: (rvr.punch_overtime_id = r.id) |
-> Index Scan using tbl_punch_overtimes_pkey on tbl_punch_overtimes r (cost=0.12..8.14 rows=1 width=207) |
Filter: (status = '2'::smallint) |
-> Seq Scan on tbl_punch_overtime_verify_rels rvr (cost=0.00..1.01 rows=1 width=8) |
-> Seq Scan on tbl_punch_overtime_carbon_copy_rels rccr (cost=0.00..30.40 rows=2040 width=8) |
-> Sort (cost=67.82..70.25 rows=970 width=4) |
Sort Key: crvr.punch_overtime_id |
-> Seq Scan on tbl_punch_overtime_cancel_verify_rels crvr (cost=0.00..19.70 rows=970 width=4) |