QUERY PLAN
Aggregate (cost=275.39..275.40 rows=1 width=32)
-> Group (cost=263.40..275.14 rows=9 width=465)
Group Key: r.id
-> Nested Loop Left Join (cost=263.40..275.12 rows=9 width=6)
-> Merge Left Join (cost=263.11..263.17 rows=9 width=6)
Merge Cond: (r.id = rcvr.approve_id)
-> Sort (cost=262.08..262.10 rows=9 width=6)
Sort Key: r.id
-> Hash Right Join (cost=197.56..261.94 rows=9 width=6)
Hash Cond: (rvr.approve_id = r.id)
-> Seq Scan on tbl_approve_verify_rels rvr (cost=0.00..53.03 rows=3003 width=4)
-> Hash (cost=197.46..197.46 rows=8 width=6)
-> Nested Loop (cost=0.28..197.46 rows=8 width=6)
-> Seq Scan on tbl_approve_carbon_copy_rels rccr (cost=0.00..139.05 rows=8 width=4)
Filter: (user_id = 1015)
-> Index Scan using tbl_approves_pkey on tbl_approves r (cost=0.28..7.30 rows=1 width=14)
Index Cond: (id = rccr.approve_id)
Filter: (status <> 0)
-> Sort (cost=1.03..1.03 rows=2 width=4)
Sort Key: rcvr.approve_id
-> Seq Scan on tbl_approve_cancel_verify_rels rcvr (cost=0.00..1.02 rows=2 width=4)
-> Index Only Scan using tbl_term_taxonomy_relationships_object_id_term_id_idx on tbl_term_taxonomy_relationships dt1 (cost=0.29..1.32 rows=1 width=4)
Index Cond: ((object_id = r.id) AND (term_id = 17))