| Aggregate (cost=5955.88..5955.89 rows=1 width=200) |
| -> Unique (cost=5074.81..5494.36 rows=8391 width=118) |
| -> Sort (cost=5074.81..5095.79 rows=8391 width=118) |
| Sort Key: (CASE WHEN ((rvr.status = 0) AND (r.next_verify_user = 1001)) THEN 1 ELSE 0 END) DESC, r.id, r.status, r.amount, r.occurrence_at, r.settle_accounts_at, r.settle_accounts_by, r.description, r.created_by, r.created_at, 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=4402.08..4527.94 rows=8391 width=118) |
| Group Key: CASE WHEN ((rvr.status = 0) AND (r.next_verify_user = 1001)) THEN 1 ELSE 0 END, r.id |
| -> Hash Join (cost=2543.32..4360.12 rows=8391 width=118) |
| Hash Cond: (r.id = rvr.reimbursement_id) |
| -> Hash Left Join (cost=2027.08..3655.77 rows=8384 width=114) |
| Hash Cond: (r.id = rsr.reimbursement_id) |
| -> Hash Right Join (cost=1792.26..3295.21 rows=8379 width=114) |
| Hash Cond: (dt2.object_id = r.id) |
| -> Seq Scan on tbl_term_taxonomy_relationships dt2 (cost=0.00..1473.24 rows=2192 width=4) |
| Filter: ((term_id = 18) AND (object_type = 7)) |
| -> Hash (cost=1687.52..1687.52 rows=8379 width=114) |
| -> Hash Right Join (cost=354.58..1687.52 rows=8379 width=114) |
| Hash Cond: (dt1.object_id = r.id) |
| -> Seq Scan on tbl_term_taxonomy_relationships dt1 (cost=0.00..1310.86 rows=8409 width=4) |
| Filter: (term_id = 15) |
| -> Hash (cost=249.84..249.84 rows=8379 width=114) |
| -> Seq Scan on tbl_reimbursements r (cost=0.00..249.84 rows=8379 width=114) |
| Filter: (status <> 0) |
| -> Hash (cost=129.92..129.92 rows=8392 width=4) |
| -> Seq Scan on tbl_reimbursement_settle_rels rsr (cost=0.00..129.92 rows=8392 width=4) |
| -> Hash (cost=411.31..411.31 rows=8394 width=8) |
| -> Seq Scan on tbl_reimbursement_verify_rels rvr (cost=0.00..411.31 rows=8394 width=8) |
| Filter: (user_id = 1001) |