15 ms·
> When you do everything on your master instance, any heavy calculation can become a problem pretty quickly. SELECT-only reporting code like this is normally r
by mst 10y ago
> When you do everything on your master instance, any heavy calculation can become a problem pretty quickly.
SELECT-only reporting code like this is normally run against a query slave, and with a bit of automation you can stand up one of those pretty much as easily as another webhead.
- kofejnik 10y agoThen how is it better than simply using another webhead? In any case, we need to do heavy calculations AND transactionally update some state. It's possible to do this on slaves I guess with some trickery, but then what's the advantage over doing it in the app servers?
- mst 10y ago> Then how is it better than simply using another webhead? Data locality. > In any case, we need to do heavy calculations AND transactionally update some state. In that case, I'd have the app server connect to both master and slave, run the heavy calculations on the slave the same way, and then send the updates to the master.