Aggregate (cost=4318.28..4318.29 rows=1 width=8) |
-> Unique (cost=3882.96..4231.21 rows=6965 width=119) |
-> Sort (cost=3882.96..3900.38 rows=6965 width=119) |
Sort Key: (CASE WHEN ((rvr.status = 0) AND (r.next_verify_user = 1001)) THEN 1 ELSE 0 END) DESC, r.created_at DESC, r.id, r.status, r.amount, r.occurrence_at, r.settle_accounts_at, r.settle_accounts_by, r.description, r.created_by, r.updated_at, r.refuse_description, r.client_id, r.project_id, r.next_verify_user, r.is_resubmited, r.work_log_id, r.pre_sales_id, r.implement_record_id |
-> HashAggregate (cost=3333.92..3438.39 rows=6965 width=119) |
Group Key: r.id, CASE WHEN ((rvr.status = 0) AND (r.next_verify_user = 1001)) THEN 1 ELSE 0 END |
-> Hash Left Join (cost=1982.69..3299.09 rows=6965 width=119) |
Hash Cond: (r.id = rsr.reimbursement_id) |
-> Hash Join (cost=1787.58..2973.38 rows=6965 width=119) |
Hash Cond: (r.id = rvr.reimbursement_id) |
-> Hash Right Join (cost=1369.99..2433.81 rows=6977 width=115) |
Hash Cond: (dt1.object_id = r.id) |
-> Seq Scan on tbl_term_taxonomy_relationships dt1 (cost=0.00..969.88 rows=6984 width=4) |
Filter: (term_id = 15) |
-> Hash (cost=1282.78..1282.78 rows=6977 width=115) |
-> Hash Right Join (cost=294.50..1282.78 rows=6977 width=115) |
Hash Cond: (dt2.object_id = r.id) |
-> Seq Scan on tbl_term_taxonomy_relationships dt2 (cost=0.00..969.88 rows=7006 width=4) |
Filter: (term_id = 18) |
-> Hash (cost=207.29..207.29 rows=6977 width=115) |
-> Seq Scan on tbl_reimbursements r (cost=0.00..207.29 rows=6977 width=115) |
Filter: (status <> 0) |
-> Hash (cost=330.45..330.45 rows=6971 width=8) |
-> Seq Scan on tbl_reimbursement_verify_rels rvr (cost=0.00..330.45 rows=6971 width=8) |
Filter: (user_id = 1001) |
-> Hash (cost=107.83..107.83 rows=6983 width=4) |
-> Seq Scan on tbl_reimbursement_settle_rels rsr (cost=0.00..107.83 rows=6983 width=4) |