Plugin runs “ALTER TABLE … CHANGE COLUMN” on every page view
-
I work for a hosting company and one of our customers uses this plugin. We’ve noticed it causes high database lock contention, which is because it sends these database commands on every page view:
ALTER TABLE wp_church_tithe_wp_transactions CHANGE COLUMN
charged_amount
charged_amount int NOT NULL
ALTER TABLE wp_church_tithe_wp_transactions CHANGE COLUMNgateway_fee_hc
gateway_fee_hc int NOT NULL
ALTER TABLE wp_church_tithe_wp_transactions CHANGE COLUMNearnings_hc
earnings_hc int NOT NULL
ALTER TABLE wp_church_tithe_wp_arrangements CHANGE COLUMNinitial_amount
initial_amount int NOT NULL
ALTER TABLE wp_church_tithe_wp_arrangements CHANGE COLUMNrenewal_amount
renewal_amount int NOT NULLThis makes it pretty slow (ALTER TABLE commands are not efficient). This appears to be because it runs this whenever the object is instantiated:
church_tithe_wp()->transactions_db->create_table();
church_tithe_wp()->arrangements_db->create_table()Things like that should only be done when the plugin is activated, not on every page view. It would be great if you could fix that.
The topic ‘Plugin runs “ALTER TABLE … CHANGE COLUMN” on every page view’ is closed to new replies.