全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2357 3
2010-03-06
From SAS documentation:
As a general recommendation: use a DATA step rather than PROC APPEND to re-create a large data set from smaller subsets.

这里 DATA是例如:
set work.one work.two work.three;

PROC例如:
proc append base=work.orders data=work.one;
run;
proc append base=work.orders data=work.two;
run;
proc append base=work.orders data=work.three;
run;

我不明白的是:append 不是应该比set 更efficient么(因为前者不需要读work.orders)。所以不明白为什么书上这样说。

谢谢!
二维码

扫码加我 拉你入群

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

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

全部回复
2010-3-6 22:33:31
dolphinfish 发表于 2010-3-6 22:03
From SAS documentation:
As a general recommendation: use a DATA step rather than PROC APPEND to re-create a large data set from smaller subsets.

这里 DATA是例如:
set work.one work.two work.three;

PROC例如:
proc append base=work.orders data=work.one;
run;
proc append base=work.orders data=work.two;
run;
proc append base=work.orders data=work.three;
run;

我不明白的是:append 不是应该比set 更efficient么(因为前者不需要读work.orders)。所以不明白为什么书上这样说。

谢谢!
There is an assumption here. For example, you have many data sets say (50) and each of them is small. Using set with all data sets once is better in the sense you can save a lot of compiling time(many append processes). Append is used when you have a BIGGER base data set and smaller appended data set.

Botton line is that set opens all data sets in set statement while append only opens appended data sets. If the data sets is small, 'set approach' is an easy way.
二维码

扫码加我 拉你入群

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

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

2010-3-6 22:34:49
我想意思是work.orders is just a smaller subset
不读它带来的efficient不显著......

多说一句,某种意义上说,proc append的本质就是sql的insert(看用append往数据库插数据就知道了)
这里是不是还涉及到一个data步和proc sql效率的问题啊.....老生常谈,不知道有没有高人有什么想法
二维码

扫码加我 拉你入群

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

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

2010-3-6 23:45:54
谢谢。明白了!
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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