mysql 多表联合查询优化
来源:互联网 发布:泰豪软件 编辑:程序博客网 时间:2024/05/01 21:37
$sqlCompanyName = "select f.remark as cust_company from tb_group a
inner join tb_user_group b
on a.group_id = b.group_id
and a.type = 0
inner join tb_user c
on b.user_id = c.user_id
left join tb_group_detail b1
on b.group_id = b1.group_id
left join tb_user e
on concat(a.group_name,'_') = e.user_name
left join tb_user_detail f
on e.user_id = f.user_id
where c.user_id = '".$UID."'
inner join tb_user_group b
on a.group_id = b.group_id
and a.type = 0
inner join tb_user c
on b.user_id = c.user_id
left join tb_group_detail b1
on b.group_id = b1.group_id
left join tb_user e
on concat(a.group_name,'_') = e.user_name
left join tb_user_detail f
on e.user_id = f.user_id
where c.user_id = '".$UID."'
and a.group_id = ".$v['group_id'];
重点在于在联合查询内添加查询条件
迪卡尔乘积定律
0 0
- mysql 多表联合查询优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql 多表联合查询效率分析及优化
- Mysql多表联合查询效率分析优化
- Mysql 多表联合查询效率分析及优化
- 比较牛的控件 猎豹 iCarousel
- 关于ViewPager和Fragment
- 汇编入门学习笔记 (六)—— si、di,双重循环
- ArrayList源码详解
- php取到的时间总是差8小时的解决方法
- mysql 多表联合查询优化
- java web 学习总结之 Servlet/JSP 编码问题
- 函数指针和指针函数的区别
- C红黑树统计英文单词数量
- 我的算法学习之路
- android经典DEMO
- 好久没更新博客了呢~~
- 整理了一些免费的编程中文书籍
- Spark大师之路:广播变量(Broadcast)源码分析