Aggregate (cost=1302.08..1302.09 rows=1 width=8) |
-> Sort (cost=1285.87..1288.57 rows=1081 width=277) |
Sort Key: (CASE WHEN ((rvr.status = 0) AND (r.next_verify_user = 1001)) THEN 1 ELSE 0 END) DESC, (CASE WHEN (r.status = 1) THEN 0 ELSE 1 END), (CASE WHEN (r.status = 1) THEN r.created_at ELSE r.verify_at END) DESC, r.created_at DESC |
-> HashAggregate (cost=1209.78..1231.40 rows=1081 width=277) |
Group Key: r.id, CASE WHEN ((rvr.status = 0) AND (r.next_verify_user = 1001)) THEN 1 ELSE 0 END |
-> Hash Right Join (cost=170.88..1204.37 rows=1081 width=26) |
Hash Cond: (dt1.object_id = r.id) |
-> Seq Scan on tbl_term_taxonomy_relationships dt1 (cost=0.00..1019.58 rows=1620 width=4) |
Filter: (term_id = 17) |
-> Hash (cost=157.36..157.36 rows=1081 width=30) |
-> Hash Join (cost=119.71..157.36 rows=1081 width=30) |
Hash Cond: (rvr.approve_id = r.id) |
-> Seq Scan on tbl_approve_verify_rels rvr (cost=0.00..34.79 rows=1087 width=8) |
Filter: (user_id = 1001) |
-> Hash (cost=98.91..98.91 rows=1664 width=34) |
-> Seq Scan on tbl_approves r (cost=0.00..98.91 rows=1664 width=34) |
Filter: (status <> 0) |