资源超出错误消息依次 [英] Resource Exceeded error message in order by

查看:77
本文介绍了资源超出错误消息依次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个目标表(作为其他查询的输出创建),
简单的排序在其一列上导致资源超出错误消息。
创建的目的地表格包含850万行和6列(大小约为567 MB)。

I have a destination table(created as an output of some other query), simple order by on one of its column is resulting "resource exceeded" error message. Destination table created has 8.5 million rows and 6 columns (size 567 MB approx).

select col1,col2.....col6 from desttable order by col 5 desc

会导致资源超出错误消息。

is resulting "resource exceeded" error message.

推荐答案

删除ORDER BY并查看错误是否消失!

ORDER BY将整个数据移动到一个worker中 - 因此资源超过

Remove ORDER BY and see if error disappear!
ORDER BY moves WHOLE data into one worker - thus resources exceeded


如果我在
工作后的查询中在查询中添加了LIMIT和OFFSET即使LIMIT子句是最后被评估的。如何在
中工作?

If I am adding "LIMIT" and "OFFSET" clause in the query after order by its working,even though LIMIT clause is the last to be evaluated.How it is working there??

当您将LIMIT N - 查询在多个工作人员上运行。每个工人只获得部分数据进行处理,并只输出相应的N行。那些来自所有工人的N行比获得交付给最终ORDER BY和LIMIT发生的一名工人,并且获胜N行成为整个查询的输出

When you add LIMIT N - query runs on multiple workers. Each worker gets only part of the data to process and outputs only respective N rows. Those N rows from all workers than gets "delivered" to one worker where final ORDER BY and LIMIT occurs and "winning" N rows becomes output of whole query

这篇关于资源超出错误消息依次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆