楼主: dolphinfish
2414 3

[原创博文] 请教:set & append [推广有奖]

  • 0关注
  • 0粉丝

已卖:703份资源

讲师

24%

还不是VIP/贵宾

-

威望
0
论坛币
2768 个
通用积分
0.6353
学术水平
1 点
热心指数
4 点
信用等级
1 点
经验
13027 点
帖子
150
精华
0
在线时间
679 小时
注册时间
2009-8-26
最后登录
2021-5-29

楼主
dolphinfish 发表于 2010-3-6 22:03:12 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
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)。所以不明白为什么书上这样说。

谢谢!
二维码

扫码加我 拉你入群

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

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

关键词:append App End Pen Set efficient general

回帖推荐

soporaeternus 发表于3楼  查看完整内容

我想意思是work.orders is just a smaller subset 不读它带来的efficient不显著...... 多说一句,某种意义上说,proc append的本质就是sql的insert(看用append往数据库插数据就知道了) 这里是不是还涉及到一个data步和proc sql效率的问题啊.....老生常谈,不知道有没有高人有什么想法

本帖被以下文库推荐

沙发
bobguy 发表于 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.

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

多说一句,某种意义上说,proc append的本质就是sql的insert(看用append往数据库插数据就知道了)
这里是不是还涉及到一个data步和proc sql效率的问题啊.....老生常谈,不知道有没有高人有什么想法
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

Let them be hard, but never unjust

板凳
dolphinfish 发表于 2010-3-6 23:45:54
谢谢。明白了!

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-6 09:24