Jul 2nd 2012, 18:12:01
kk, did realize it was that resource intensive...
what about a tracking table that is updated via a trigger that is executed only if a country has an active standing order on the market and their cash on hand changes.
---------------------------------------------------------------------------------------------------
country id | resource | ask price | ask qty | cash on hand | active | buy power
---------------------------------------------------------------------------------------------------
update the ask price, ask qty, cash on hand, active and buy power when those change.
buy power = cash on hand / ask price
Deactivate any standing order when buy power = 0 or when ask qty = 0.
what about a tracking table that is updated via a trigger that is executed only if a country has an active standing order on the market and their cash on hand changes.
---------------------------------------------------------------------------------------------------
country id | resource | ask price | ask qty | cash on hand | active | buy power
---------------------------------------------------------------------------------------------------
update the ask price, ask qty, cash on hand, active and buy power when those change.
buy power = cash on hand / ask price
Deactivate any standing order when buy power = 0 or when ask qty = 0.
Happy Hunting
Tigress
Tigress