我是 mysql 数据库的新手,我正在尝试创建一个使用连接的查询。我编写的当前查询需要 1 秒的时间来执行,我已经进行了研究并发现连接是减少执行时间的最佳解决方案,
我正在使用的查询是:
SELECT count(1) as total
FROM `mytable`
where pid IN (
SELECT pid FROM `maps`
where `node_id` = (
SELECT nid FROM shop
WHERE value = 'selling'
and parent = '170'
and tid = 1
)
and tid = 1
)
and `pnumber` IN (
select pnumber
FROM users_pro
where value = 'hulo'
and tid = 1
)
and tid = 1
请,我们将不胜感激。
谢谢..