U
U
un1t2015-09-17 17:36:01
SQL Server
un1t, 2015-09-17 17:36:01

Django - balancing MySQL master-slave?

Previously, django-replicated was used for this purpose, but this project has not been supported for a long time.
How do you live with it? Do you use any other libraries or custom solutions everywhere? Or maybe balancing is not at the application level like mysql-proxy?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Tsvetkov, 2019-04-23
@tsklab

The request should return me multiple counts depending on the ActionTypeId
And will return:
SELECT 
(SELECT COUNT(ActionTypeId) FROM MatchupLog WHERE (ActionTypeId = 3)) AS FGmade,
(SELECT COUNT(ActionTypeId) FROM MatchupLog WHERE (ActionTypeId = 4)) AS FGMissed

D
d-stream, 2019-04-23
@d-stream

subqueries should be named
and it's better to use the style:
[name] = (select ...)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question