Aggregate (cost=251.53..251.54 rows=1 width=48) |
-> Group (cost=251.25..251.34 rows=5 width=437) |
Group Key: (CASE WHEN ((rvr.status = 0) AND (r.next_verify_user = 1001)) THEN 1 WHEN ((rcvr.status = 0) AND (r.next_cancel_verify_user = 1001)) THEN 2 ELSE 0 END), r.id |
-> Sort (cost=251.25..251.27 rows=5 width=10) |
Sort Key: (CASE WHEN ((rvr.status = 0) AND (r.next_verify_user = 1001)) THEN 1 WHEN ((rcvr.status = 0) AND (r.next_cancel_verify_user = 1001)) THEN 2 ELSE 0 END) DESC, r.id |
-> Nested Loop Left Join (cost=157.40..251.19 rows=5 width=10) |
-> Hash Join (cost=157.11..209.55 rows=5 width=22) |
Hash Cond: (rvr.approve_id = r.id) |
-> Seq Scan on tbl_approve_verify_rels rvr (cost=0.00..47.11 rows=1407 width=8) |
Filter: (user_id = 1001) |
-> Hash (cost=157.02..157.02 rows=7 width=18) |
-> Hash Right Join (cost=134.77..157.02 rows=7 width=18) |
Hash Cond: (rcvr.approve_id = r.id) |
-> Seq Scan on tbl_approve_cancel_verify_rels rcvr (cost=0.00..19.70 rows=970 width=8) |
-> Hash (cost=134.69..134.69 rows=7 width=22) |
-> Seq Scan on tbl_approves r (cost=0.00..134.69 rows=7 width=22) |
Filter: ((status <> 0) AND (status = '5'::smallint)) |
-> Index Only Scan using tbl_term_taxonomy_relationships_object_id_term_id_idx on tbl_term_taxonomy_relationships dt1 (cost=0.29..8.31 rows=1 width=4) |
Index Cond: ((object_id = r.id) AND (term_id = 17)) |