| Aggregate (cost=2187.26..2187.27 rows=1 width=8) |
| -> Sort (cost=2180.95..2182.00 rows=421 width=477) |
| 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 |
| -> Group (cost=2158.38..2162.59 rows=421 width=477) |
| Group Key: r.id |
| -> Sort (cost=2158.38..2159.44 rows=421 width=22) |
| Sort Key: r.id |
| -> Hash Right Join (cost=1970.23..2140.03 rows=421 width=22) |
| Hash Cond: (rccr.approve_id = r.id) |
| Filter: ((r.created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5300,5311,5332,5360,5446,5461,5476,5499,5500}'::integer[])) OR (rccr.user_id = 1001) OR (rvr.user_id = 1001) OR (rcvr.user_id = 1001)) |
| -> Seq Scan on tbl_approve_carbon_copy_rels rccr (cost=0.00..119.64 rows=7764 width=8) |
| -> Hash (cost=1968.39..1968.39 rows=147 width=34) |
| -> Hash Right Join (cost=1902.63..1968.39 rows=147 width=34) |
| Hash Cond: (rvr.approve_id = r.id) |
| -> Seq Scan on tbl_approve_verify_rels rvr (cost=0.00..53.03 rows=3003 width=8) |
| -> Hash (cost=1900.97..1900.97 rows=133 width=30) |
| -> Hash Left Join (cost=564.01..1900.97 rows=133 width=30) |
| Hash Cond: (r.id = rcvr.approve_id) |
| -> Hash Left Join (cost=562.97..1899.41 rows=133 width=26) |
| Hash Cond: (r.project_id = project.id) |
| Filter: ((r.title ~~* '%红%'::text) OR ((client.name)::text ~~* '%红%'::text) OR (client.pinyin_shortcut ~~* '%红%'::text) OR ((project.project_title)::text ~~* '%红%'::text) OR (r.description ~~* '%红%'::text) OR ((tt1.name)::text ~~* '%红%'::text)) |
| -> Hash Left Join (cost=344.38..1673.73 rows=2692 width=367) |
| Hash Cond: (dt1.taxonomy_id = tt1.id) |
| -> Hash Left Join (cost=333.47..1655.65 rows=2692 width=359) |
| Hash Cond: (r.client_id = client.id) |
| -> Hash Right Join (cost=199.51..1514.62 rows=2692 width=308) |
| Hash Cond: (dt1.object_id = r.id) |
| -> Seq Scan on tbl_term_taxonomy_relationships dt1 (cost=0.00..1308.03 rows=2698 width=8) |
| Filter: (term_id = 17) |
| -> Hash (cost=165.86..165.86 rows=2692 width=304) |
| -> Seq Scan on tbl_approves r (cost=0.00..165.86 rows=2692 width=304) |
| Filter: (status <> 0) |
| -> Hash (cost=108.98..108.98 rows=1998 width=59) |
| -> Seq Scan on tbl_clients client (cost=0.00..108.98 rows=1998 width=59) |
| Filter: (NOT deleted) |
| -> Hash (cost=7.07..7.07 rows=307 width=16) |
| -> Seq Scan on tbl_term_taxonomies tt1 (cost=0.00..7.07 rows=307 width=16) |
| -> Hash (cost=178.82..178.82 rows=3182 width=26) |
| -> Seq Scan on tbl_projects project (cost=0.00..178.82 rows=3182 width=26) |
| -> Hash (cost=1.02..1.02 rows=2 width=8) |
| -> Seq Scan on tbl_approve_cancel_verify_rels rcvr (cost=0.00..1.02 rows=2 width=8) |