全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
11618 25
2014-01-08
RT,做项目的过程中,有一个数据集有900万条观测(变量为3个),需要使用PROC SORT对其进行排序,且整个处理过程排序次数至少2~3(排序的变量不同)。

实际操作时,实在太慢了,而且占用计算机资源太多,基本上算死机状态,这个有办法破吗?谢谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-1-8 11:03:39
hash表,试试。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-1-8 11:04:27
另外,问一下排序变量多吗,是字符串吗?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-1-8 11:10:12
zhengbo8 发表于 2014-1-8 11:04
另外,问一下排序变量多吗,是字符串吗?
排序的变量不多,只需要对两个变量排序(一个是数值型的,一个是字符型的)。排一次要20分钟,而且计算机基本处于死机状态,我的目的是想尽量“降低硬件资源的占用”,时间长点可以忍受,但是干不了其它事情很杯具。
ps:那个vba中调用sas代码的事情我搞通了,现在就是在excel中调用sas代码进行数据集的排序。多谢之前的帮助哈!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-1-8 11:55:14
If you don't mind efficiency, you can change sortsize option.
......

SORTSIZE=memory-specification
specifies the maximum amount of memory that is available to PROC SORT. Valid values for memory-specification are as follows:

MAX
specifies that all available memory can be used.

n
specifies the amount of memory in bytes, where n is a real number.

nK
specifies the amount of memory in kilobytes, where n is a real number.

nM
specifies the amount of memory in megabytes, where n is a real number.

nG
specifies the amount of memory in gigabytes, where n is a real number.

Specifying the SORTSIZE= option in the PROC SORT statement temporarily overrides the SAS system option SORTSIZE=. For more information about SORTSIZE=, see the chapter on SAS system options in SAS Language Reference: Dictionary.

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-1-8 12:25:32
很常见的问题,期待好的答案!!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群