• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

急union all 施用出错?

mysql 搞代码 7年前 (2018-06-04) 103次浏览 已收录 0个评论

急,union all 使用出错???
SELECT min(fromm5time(starttime)),max(fromm5time(endtime)), inet_btoa(tunsrc),GTPTEID,
tunsrcport,tundstport, 
sum(octets/1000000)as ULthroughput,
max(octets/((endtime-starttime)/1000000000)/1000000) as "max_rate(MByte/s)",
inet_btoa(src),inet_btoa(dst) 
from(
select starttime,endtime,tunsrc,GTPTEID,tunsrcport,tundstport,octets,src,dst,packets from flow_agent8_job23
union all
select starttime,endtime,tunsrc,GTPTEID,tunsrcport,tundstport,octets,src,dst,packets from flow_agent8_job24
union all
select starttime,endtime,tunsrc,GTPTEID,tunsrcport,tundstport,octets,src,dst,packets from flow_agent8_job25
union all
select starttime,endtime,tunsrc,GTPTEID,tunsrcport,tundstport,octets,src,dst,packets from flow_agent8_job26
) as c
where 
starttime > tom5time(‘2012-07-09 00:00:01’ )
and endtime < tom5time(‘2012-07-09 23:59:59’ ) 
and inet_btoa(dst) like ‘10.247%’ 
and ((endtime-starttime)/1000000>100)
and (packets>100)
group by GTPTEID,dst

在几个表中按时间取数据,但是运行时遇到了错误 SQL Error (126): Incorrect key file for table ‘/tmp/#sql_db6_0.MYI’; try to repair it */

能帮我解决么?????,不用union all 却可以取数据

——解决方案——————–
还有多少磁盘空间?
——解决方案——————–
临时表存放空间不足 

 
show variables like ‘%tmp%’;

看看此目录是否已经没有足够空间用于临时表的排序
——解决方案——————–
没有足够的表空间造成的,检查。


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:急union all 施用出错?
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址