oracle随机取数
select a.machine_name 平台名,
b.mm_pct 内存使用率,
c.mc_pct CPU使用率,
d.md_pct 磁盘使用率
from rt_machine sample ( 5 ) a,
rt_monitor_memory sample ( 5 ) b,
rt_monitor_cpu sample ( 5 ) c,
rt_monitor_disk sample ( 5 ) d
where a.id = b.machine_id
and a.id = c.machine_id
and a.id = d.machine_id
and rownum <2
使用sample()
select * from tablename sample ( 50 ) where rownum<6