当前位置:网站首页>GBASE 8s 通过临时表提升排序性能
GBASE 8s 通过临时表提升排序性能
2022-07-29 21:18:00 【八珍豆腐】
如果涉及任何排序或联接,则可以尝试将查询结果转换为临时表提升性能,在临时表内排序,则可以大幅提升性能。具体结果和实际的数据量和执行SQL有关,下面实例仅供参考。
原语句如下:
SELECT time_records.*, case_name
FROM time_records, OUTER cases
WHERE time_records.client = "AA1000"
AND time_records.case_no = cases.case_no
ORDER BY time_records.case_no测试时返回34条语句,耗时 5 分42.05 秒
修改后
SELECT time_records.*, case_name
FROM time_records, OUTER cases
WHERE time_records.client = "AA1000"
AND time_records.case_no = cases.case_no
INTO temp foo;
SELECT * from foo ORDER BY case_no;测试时返回34条语句,耗时 0.59 秒
边栏推荐
- 1. Promise usage in JS, 2. The concept and usage of closures, 3. The difference between the four methods and areas of object creation, 4. How to declare a class
- install mysql using script
- 【CVPR2022】A Unified Query-based Paradigm for Point Cloud Understanding
- MySQL数据查询 - 联合查询
- 第3章业务功能开发(线索关联市场活动,动态搜索)
- 容器网络硬核技术内幕 (24) 知微知彰,知柔知刚 (上)
- 容器网络硬核技术内幕 (小结-中)
- Break the rules!MongoDB introduces SQL?
- 378. The Kth Smallest Element in an Ordered Matrix
- 数字孪生万物可视 | 联接现实世界与数字空间
猜你喜欢

VSCode配置终端为系统命令行

Second Best PyTorch Beginner Course; Thesis Writing Guide; Using µGo to Develop a Mini Compiler; Super Efficient Use of Transformer's Extension Library; Frontier Papers | ShowMeAI News Daily

给图片左上角加logo标识、左下角加时间和地址、地址到达指定长度换行

2022了你还不会『低代码』?数据科学也能玩转Low-Code啦!

Panorama Tutorial丨How to shoot sunrise and sunset scenes in VR panoramic shooting?

数字孪生万物可视 | 联接现实世界与数字空间
基于PaddleSpeech搭建个人语音听写服务
![[ACTF2020 Freshman Competition]Exec 1](/img/1e/a3c19d514207e6965d09c66b86e519.png)
[ACTF2020 Freshman Competition]Exec 1

ALBERT:A Lite BERT for Self-supervised Learning of Language Representations

干货!联邦学习中的合作均衡
随机推荐
378. The Kth Smallest Element in an Ordered Matrix
容器网络硬核技术内幕 (小结-下)
336. Palindromic Pairs
【Nacos】nacos1.x 单机、内置数据库模式修改密码
使用脚本安装mysql
IDEA 快捷键
1. Promise usage in JS, 2. The concept and usage of closures, 3. The difference between the four methods and areas of object creation, 4. How to declare a class
获取七牛云地址文件保存到本地
02-SDRAM:自动刷新
银河麒麟V10 SP2 x86编译安装 PHP7.4
【Verilog 设计】Verilog 实现偶数、奇数分频和任意小数分频
APM电机输出逻辑(Motors类详解)
一 JS中Promise用法、二闭包的概念与用法、三对象创建的四种方式与区区别、四 如何声明一个类
结合布林线理解现货白银走势图的方法
How to implement your personal knowledge base?
Official announcement!Suzhou Wujiang Development Zone launches electronic labor contract platform
微信小程序 30 自定义模板和获取用户登录凭证
容器网络硬核技术内幕 (25) 知微知彰,知柔知刚 (中)
第3章业务功能开发(线索关联市场活动,插入数据并查询)
HMS Core audio editing service audio source separation and spatial audio rendering, helping to quickly enter the world of 3D audio