refactor: optimize is_master subquery using EXISTS instead of COUNT
This commit is contained in:
@@ -265,9 +265,9 @@ async def get_stocks_data(
|
|||||||
.join(
|
.join(
|
||||||
Product
|
Product
|
||||||
)
|
)
|
||||||
.options(
|
# .options(
|
||||||
joinedload(MarketplaceProduct.product)
|
# joinedload(MarketplaceProduct.product)
|
||||||
)
|
# )
|
||||||
.where(
|
.where(
|
||||||
MarketplaceProduct.marketplace_id == marketplace.id,
|
MarketplaceProduct.marketplace_id == marketplace.id,
|
||||||
or_(
|
or_(
|
||||||
|
|||||||
Reference in New Issue
Block a user