Limit (cost=2276.41..2276.46 rows=20 width=398) |
-> Sort (cost=2276.41..2281.56 rows=2062 width=398) |
Sort Key: (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=2190.61..2221.54 rows=2062 width=398) |
Group Key: r.id |
-> Hash Right Join (cost=1723.14..2173.18 rows=6973 width=386) |
Hash Cond: (rccr.approve_id = r.id) |
Filter: ((r.created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1017,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5300,5311,5332,5360,5388,5446,5449}'::integer[])) OR (rccr.user_id = 1000) OR (rvr.user_id = 1000)) |
-> Seq Scan on tbl_approve_carbon_copy_rels rccr (cost=0.00..96.78 rows=6278 width=8) |
-> Hash (cost=1693.70..1693.70 rows=2355 width=390) |
-> Hash Right Join (cost=622.06..1693.70 rows=2355 width=390) |
Hash Cond: (dt1.object_id = r.id) |
-> Seq Scan on tbl_term_taxonomy_relationships dt1 (cost=0.00..1058.18 rows=1965 width=4) |
Filter: (term_id = 17) |
-> Hash (cost=592.62..592.62 rows=2355 width=390) |
-> Hash Right Join (cost=544.70..592.62 rows=2355 width=390) |
Hash Cond: (rvr.approve_id = r.id) |
-> Seq Scan on tbl_approve_verify_rels rvr (cost=0.00..41.69 rows=2369 width=8) |
-> Hash (cost=518.92..518.92 rows=2062 width=386) |
-> Seq Scan on tbl_approves r (cost=0.00..518.92 rows=2062 width=386) |
Filter: (status <> 0) |