Not in ,in替换解决文字not EXISTS,EXISTS
来源:互联网 发布:phpdisk无法连接数据库 编辑:程序博客网 时间:2024/06/05 06:02
set statistics time onselect * from t_jiejiansheet where 1=1 and ( jiejiansheet_id in (select jiejiansheet_id_list from t_invoice_payment where invoice = '未开具') or ( jiejiansheet_id not in (select jiejiansheet_id_list from t_invoice_payment) and invoice = '未开具'))set statistics time off
SQL Server 执行时间:
CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。
(所影响的行数为 303 行)
SQL Server 执行时间:
CPU 时间 = 859 毫秒,耗费时间 = 1054 毫秒。
SQL Server 执行时间:
CPU 时间 = 859 毫秒,耗费时间 = 1061 毫秒。
SQL Server 执行时间:
CPU 时间 = 859 毫秒,耗费时间 = 1061 毫秒。
set statistics time onselect * from t_jiejiansheet where 1=1 and ( EXISTS (select jiejiansheet_id_list from t_invoice_payment where invoice = '未开具' and t_invoice_payment.jiejiansheet_id_list=t_jiejiansheet.jiejiansheet_id) or ( not EXISTS (select jiejiansheet_id_list from t_invoice_payment where t_invoice_payment.jiejiansheet_id_list=t_jiejiansheet.jiejiansheet_id ) and invoice = '未开具'))set statistics time off
SQL Server 执行时间:
CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。
(所影响的行数为 303 行)
SQL Server 执行时间:
CPU 时间 = 16 毫秒,耗费时间 = 203 毫秒。
SQL Server 执行时间:
CPU 时间 = 16 毫秒,耗费时间 = 215 毫秒。
SQL Server 执行时间:
CPU 时间 = 16 毫秒,耗费时间 = 215 毫秒。
- Not in ,in替换解决文字not EXISTS,EXISTS
- mySql:in,exists,not exists
- IN, EXISTS, NOT IN, NOT EXISTS
- in、not in、exists、not exists
- exists,in 和 not in ,not exists
- IN/NOT IN---EXISTS/NOT EXISTS理解
- in、exists、not in、not exists
- oracle in,exists,not in,not exists
- in,exists,not in ,not exists效率
- Exists,not Exists,in,not in
- in、exists、not in、not exists
- 数据库查询优化之用exists替换in,not exists替换not in
- not in/not exists+null
- not in不等于not exists
- not exists不等于not in
- not exists 和not in
- not in 和 not exists
- IN&EXISTS与NOT IN&NOT EXISTS 的优化
- EJB3.0 有状态会话bean无状态会话bean详解
- The Skin surface
- HPCC系统需求
- memcopy, memset, strcopy, strncpy用法总结
- linux内核研究-8-块设备I/O层
- Not in ,in替换解决文字not EXISTS,EXISTS
- JS中document.createElement()用法及注意事项
- C# enum判断是否包含某项及按位运算
- Android学习札记8:对TextView中的文字中间加上横线
- crontab定期执行命令详解,以及实例
- 关于tableWidget的列宽拖动和滚动条设置
- HDU 2846 字典树
- 避免出现bitmap内存限制OUT OF MEMORY的一种方法
- stm32的时钟系统