EXPLAIN SELECT
e.*
FROM
(
SELECT
a.group_id,
a.group_name,
a.target_return,
a.invest_money,
a.create_time,
a.currency_category_rate,
a.bond_category_rate,
a.stock_category_rate,
a.commodity_category_rate,
a.deposit_rate,
a.bank_financial_rate,
a.public_fund_rate,
a.risk,
a.bank_risk,
a.public_risk,
a.invest_duration,
a.group_type,
c.customer_name,
c.sex AS customerSex,
d.group_name AS basicGroupName
FROM
assets_config_wealth_group_base a
LEFT JOIN group_basic d ON a.group_type = d.group_id
LEFT JOIN customer_self_group_relation b ON a.group_id = b.group_id
LEFT JOIN customer_self_base_info c ON b.customer_id = c.customer_id
WHERE
a.customer_id IS NOT NULL
AND a.user_id = 'ht4'
AND a.org_id = 6510021
AND a.target_return IS NULL
AND a.is_del = 0 UNION ALL
SELECT
a.group_id,
a.group_name,
a.target_return,
a.invest_money,
a.create_time,
a.currency_category_rate,
a.bond_category_rate,
a.stock_category_rate,
a.commodity_category_rate,
a.deposit_rate,
a.bank_financial_rate,
a.public_fund_rate,
a.risk,
a.bank_risk,
a.public_risk,
a.invest_duration,
a.group_type,
c.customer_name,
c.sex AS customerSex,
d.group_name AS basicGroupName
FROM
assets_config_wealth_group_base a
LEFT JOIN group_basic d ON a.group_type = d.group_id
LEFT JOIN customer_other_group_relation b ON a.group_id = b.group_id
LEFT JOIN customer_other_base_info c ON b.customer_id = c.customer_id
WHERE
a.customer_id IS NULL
AND a.user_id = 'ht4'
AND a.target_return IS NULL
AND a.org_id = 6510021
AND a.is_del = 0
) e
WHERE
1 = 1
这条sql为什么本地执行很快,压测的时候就慢是什么原因呢
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
悬赏问题
- ¥30 STM32 INMP441无法读取数据
- ¥100 求汇川机器人IRCB300控制器和示教器同版本升级固件文件升级包
- ¥15 用visualstudio2022创建vue项目后无法启动
- ¥15 x趋于0时tanx-sinx极限可以拆开算吗
- ¥500 把面具戴到人脸上,请大家贡献智慧
- ¥15 任意一个散点图自己下载其js脚本文件并做成独立的案例页面,不要作在线的,要离线状态。
- ¥15 各位 帮我看看如何写代码,打出来的图形要和如下图呈现的一样,急
- ¥30 c#打开word开启修订并实时显示批注
- ¥15 如何解决ldsc的这条报错/index error
- ¥15 VS2022+WDK驱动开发环境