Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Nested Loop (cost=130721753.16..130722012.31 rows=2631308 width=4)
- CTE x
- -> Nested Loop Anti Join (cost=3.46..130721149.43 rows=26813 width=456)
- -> Nested Loop Anti Join (cost=3.02..130704606.05 rows=27503 width=456)
- -> Hash Join (cost=2.59..130691482.38 rows=28875 width=456)
- Hash Cond: (au.profile = grp.id)
- Join Filter: (((grp.name = ANY ('{"Digital Only",GLS,Homebound,NonResident,OutOfState,Patron,Quipu,Restricted,Temp,TempRes12,TempRes6,Trustee}'::text[])) AND (date(au.expire_date) < (date(now()) - '4 years'::interval)) AND (NOT (alternatives: SubPlan 1 or hashed SubPlan 2)) AND (NOT (SubPlan 3)) AND (date(au.create_date) < (date(now()) - '4 years'::interval))) OR ((grp.name = 'PLAY Card'::text) AND (NOT (alternatives: SubPlan 4 or hashed SubPlan 5)) AND (date(au.expire_date) < (date(now()) - '1 year'::interval))))
- -> Seq Scan on usr au (cost=0.00..130687427.88 rows=561085 width=456)
- Filter: ((NOT deleted) AND (((date(expire_date) < (date(now()) - '4 years'::interval)) AND (NOT (alternatives: SubPlan 1 or hashed SubPlan 2)) AND (NOT (SubPlan 3)) AND (date(create_date) < (date(now()) - '4 years'::interval))) OR ((NOT (alternatives: SubPlan 4 or hashed SubPlan 5)) AND (date(expire_date) < (date(now()) - '1 year'::interval)))))
- SubPlan 1
- -> Index Scan using money_mat_summary_usr_idx on materialized_billable_xact_summary mmbxs (cost=0.57..323.94 rows=122 width=0)
- Index Cond: (usr = au.id)
- Filter: ((balance_owed <> 0.00) OR ((now() - last_payment_ts) < '4 years'::interval))
- SubPlan 2
- -> Seq Scan on materialized_billable_xact_summary mmbxs_1 (cost=0.00..3522859.80 rows=31431011 width=4)
- Filter: ((balance_owed <> 0.00) OR ((now() - last_payment_ts) < '4 years'::interval))
- SubPlan 3
- -> Index Scan using usr_activity_usr_idx on usr_activity aua (cost=0.57..1335.83 rows=524 width=0)
- Index Cond: (usr = au.id)
- Filter: ((now() - event_time) < '4 years'::interval)
- SubPlan 4
- -> Index Scan using money_mat_summary_usr_idx on materialized_billable_xact_summary mmbxs_2 (cost=0.57..321.48 rows=18 width=0)
- Index Cond: (usr = au.id)
- Filter: (balance_owed <> 0.00)
- SubPlan 5
- -> Gather (cost=1000.00..2748361.02 rows=4778796 width=4)
- Workers Planned: 2
- -> Parallel Seq Scan on materialized_billable_xact_summary mmbxs_3 (cost=0.00..2269481.42 rows=1991165 width=4)
- Filter: (balance_owed <> 0.00)
- -> Hash (cost=2.43..2.43 rows=13 width=13)
- -> Seq Scan on grp_tree grp (cost=0.00..2.43 rows=13 width=13)
- Filter: ((name = ANY ('{"Digital Only",GLS,Homebound,NonResident,OutOfState,Patron,Quipu,Restricted,Temp,TempRes12,TempRes6,Trustee}'::text[])) OR (name = 'PLAY Card'::text))
- -> Index Only Scan using circ_open_xacts_idx on circulation circ (cost=0.43..0.84 rows=20 width=4)
- Index Cond: (usr = au.id)
- -> Index Scan using actor_usr_standing_penalty_usr_idx on usr_standing_penalty usp (cost=0.43..0.60 rows=1 width=4)
- Index Cond: (usr = au.id)
- Filter: (standing_penalty = 30)
- -> HashAggregate (cost=603.29..605.29 rows=200 width=4)
- Group Key: x.id
- -> CTE Scan on x (cost=0.00..536.26 rows=26813 width=4)
- -> Index Only Scan using usr_pkey on usr u (cost=0.43..1.46 rows=1 width=4)
- Index Cond: (id = x.id)
- (42 rows)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement