|
GROUP BY比较消耗CPU:
- SQL> select a.employee_id , count(*) from employees a ,employees b, employees c , employees d , employees e group by a.employee_id order by a.employee_id ;
- EMPLOYEE_ID COUNT(*)
- ----------- ----------
- 100 131079601
- 101 131079601
- 102 131079601
- 103 131079601
- 104 131079601
- 105 131079601
- 106 131079601
- 107 131079601
- 108 131079601
- 109 131079601
- 110 131079601
- EMPLOYEE_ID COUNT(*)
- ----------- ----------
- 111 131079601
- 112 131079601
- 113 131079601
- 114 131079601
复制代码
ORDER BY比较消耗临时段(PGA):
- SQL> select a.employee_id from employees a ,employees b, employees c , employees d , employees e order by a.employee_id , b.employee_id , c.employee_id, d.employee_id , e.employee_id;
复制代码
[root@classroom orcl2]# df -h
文件系统 容量 已用 可用 已用% 挂载点
devtmpfs 7.6G 0 7.6G 0% /dev
tmpfs 14G 6.2G 7.9G 44% /dev/shm
tmpfs 7.6G 27M 7.6G 1% /run
tmpfs 7.6G 0 7.6G 0% /sys/fs/cgroup
/dev/mapper/vol0-root 190G 190G 891M 100% /
/dev/sda3 283M 198M 67M 75% /boot
tmpfs 1.6G 16K 1.6G 1% /run/user/42
tmpfs 1.6G 56K 1.6G 1% /run/user/0
/dev/mapper/loop0 9.9G 9.5G 0 100% /file/loop0
|
|