z**********i 发帖数: 12276 | 1 我有两个很大的datasets,1个1.3G,另一个11G,我正在用SAS来merge这两个datasets.
已经运行了2天多,形成的新dataset已经500多G。
有经验的给说说,还要多久呀?
有什么好的办法来处理这样大的dataset吗?
多谢!! |
c*******o 发帖数: 8869 | 2 怎么会这么大? 把不需要的column去掉看看
【在 z**********i 的大作中提到】 : 我有两个很大的datasets,1个1.3G,另一个11G,我正在用SAS来merge这两个datasets. : 已经运行了2天多,形成的新dataset已经500多G。 : 有经验的给说说,还要多久呀? : 有什么好的办法来处理这样大的dataset吗? : 多谢!!
|
g**r 发帖数: 425 | 3 传说SQL要比DATA STEP快很多?
【在 z**********i 的大作中提到】 : 我有两个很大的datasets,1个1.3G,另一个11G,我正在用SAS来merge这两个datasets. : 已经运行了2天多,形成的新dataset已经500多G。 : 有经验的给说说,还要多久呀? : 有什么好的办法来处理这样大的dataset吗? : 多谢!!
|
h***x 发帖数: 586 | 4 Should be something wrong, post your codes!
Basically, it needs about 20 minutes I/O time for 11G file. It won't take
more than 2 hours to merge these two files.
I guess there might be duplicates in both files. Try dedup first.
【在 z**********i 的大作中提到】 : 我有两个很大的datasets,1个1.3G,另一个11G,我正在用SAS来merge这两个datasets. : 已经运行了2天多,形成的新dataset已经500多G。 : 有经验的给说说,还要多久呀? : 有什么好的办法来处理这样大的dataset吗? : 多谢!!
|
s*r 发帖数: 2757 | 5 可能是什么cartesian merge
都弄出500G来了
【在 h***x 的大作中提到】 : Should be something wrong, post your codes! : Basically, it needs about 20 minutes I/O time for 11G file. It won't take : more than 2 hours to merge these two files. : I guess there might be duplicates in both files. Try dedup first.
|
z**********i 发帖数: 12276 | 6 这个已经做过了。只保留了几个要用的variables,但observation比较多。
【在 c*******o 的大作中提到】 : 怎么会这么大? 把不需要的column去掉看看
|
z**********i 发帖数: 12276 | 7 code只是sort和merge.
duplicates是比较多,从89年到2006年,每个人claims有很多行.我是打算在下一步去
除duplicates.
看来我要想想这样merge到底对不对了。如果先去除,怕要丢掉一些信息。
多谢!!
【在 h***x 的大作中提到】 : Should be something wrong, post your codes! : Basically, it needs about 20 minutes I/O time for 11G file. It won't take : more than 2 hours to merge these two files. : I guess there might be duplicates in both files. Try dedup first.
|
z**********i 发帖数: 12276 | 8 是个好主意,多谢!!
【在 g**r 的大作中提到】 : 传说SQL要比DATA STEP快很多?
|
o****o 发帖数: 8077 | 9 many to many merge?
tell us first what you want to do with this merge
BTW, in reality, PROC SQL is not necessarily faster than a well designed
DATA STEP on a workstation. Dedicated DB is another story
【在 z**********i 的大作中提到】 : code只是sort和merge. : duplicates是比较多,从89年到2006年,每个人claims有很多行.我是打算在下一步去 : 除duplicates. : 看来我要想想这样merge到底对不对了。如果先去除,怕要丢掉一些信息。 : 多谢!!
|
z**********i 发帖数: 12276 | 10 一个dataset是claims file,包括住院期间的、医生的,所以每个病人有几个claims。
另一个dataset是breast cancer file,这些人的乳腺癌确诊情况,包括确诊的日期,可
能每个人也有几行(不确定)。
好象是many to many merge.
我想看的是,病人在确诊癌症前1年的身体综合情况。
多谢大家的帮助!
【在 o****o 的大作中提到】 : many to many merge? : tell us first what you want to do with this merge : BTW, in reality, PROC SQL is not necessarily faster than a well designed : DATA STEP on a workstation. Dedicated DB is another story
|
|
|
o****o 发帖数: 8077 | 11 what is your merge criteria?
do you want all claims exactly within 1 year of breast cancer confirmation
for each patient?
what I don't quite understand is if there are multiple confirmation dates,
are u going to append claim data for each of them? that will be a huge final
data set.
【在 z**********i 的大作中提到】 : 一个dataset是claims file,包括住院期间的、医生的,所以每个病人有几个claims。 : 另一个dataset是breast cancer file,这些人的乳腺癌确诊情况,包括确诊的日期,可 : 能每个人也有几行(不确定)。 : 好象是many to many merge. : 我想看的是,病人在确诊癌症前1年的身体综合情况。 : 多谢大家的帮助!
|
c*******o 发帖数: 8869 | 12 但是 merge不会啊,sql才会产生这种情况
【在 s*r 的大作中提到】 : 可能是什么cartesian merge : 都弄出500G来了
|
c*******o 发帖数: 8869 | 13 多对多 merge是极其不好的programming practice. clinical SAS programmer 做QC一
个重要的依据就是寻找在LOG里面有没有‘more than'。如有, 必改之。
【在 z**********i 的大作中提到】 : 一个dataset是claims file,包括住院期间的、医生的,所以每个病人有几个claims。 : 另一个dataset是breast cancer file,这些人的乳腺癌确诊情况,包括确诊的日期,可 : 能每个人也有几行(不确定)。 : 好象是many to many merge. : 我想看的是,病人在确诊癌症前1年的身体综合情况。 : 多谢大家的帮助!
|
z**********i 发帖数: 12276 | 14 sort cancer by ID, sort claims by id and claim_date.
merge by ID.
claims里面有的人得了几个肿瘤,所以可能会有几个diagnosis date,我在下一步选出
是breast cancer 的diagnosis date.
多谢回复!!
final
【在 o****o 的大作中提到】 : what is your merge criteria? : do you want all claims exactly within 1 year of breast cancer confirmation : for each patient? : what I don't quite understand is if there are multiple confirmation dates, : are u going to append claim data for each of them? that will be a huge final : data set.
|
s*r 发帖数: 2757 | 15 阿
帐单就是你这样的搞错的
【在 z**********i 的大作中提到】 : 一个dataset是claims file,包括住院期间的、医生的,所以每个病人有几个claims。 : 另一个dataset是breast cancer file,这些人的乳腺癌确诊情况,包括确诊的日期,可 : 能每个人也有几行(不确定)。 : 好象是many to many merge. : 我想看的是,病人在确诊癌症前1年的身体综合情况。 : 多谢大家的帮助!
|
o****o 发帖数: 8077 | 16 why not use the subset with Cancer diagnosis date only?
【在 z**********i 的大作中提到】 : sort cancer by ID, sort claims by id and claim_date. : merge by ID. : claims里面有的人得了几个肿瘤,所以可能会有几个diagnosis date,我在下一步选出 : 是breast cancer 的diagnosis date. : 多谢回复!! : : final
|
z**********i 发帖数: 12276 | 17 log里只有几行code.
还在运行,所以还没有提示。
【在 c*******o 的大作中提到】 : 多对多 merge是极其不好的programming practice. clinical SAS programmer 做QC一 : 个重要的依据就是寻找在LOG里面有没有‘more than'。如有, 必改之。
|
z**********i 发帖数: 12276 | 18 sorry. 实际上,code是数据中心提供的。我只是把他们的数据读进去,然后运行而已。
结果,光这merge这一步,就卡了好几天,上周从周一到周五,文件达到450G,还没有要
停的意思。
这个周一,我重新设置了memsize,速度增加了3-4倍,从周一早上到周三晚上,文件达
到500多G,但还是在merge.并且,文件的大小不是一直在增加。周二晚上就500多G,今
天一整天基本没动。但CPU还是40-50%。
所以,上来请教一下。
【在 s*r 的大作中提到】 : 阿 : 帐单就是你这样的搞错的
|
y******0 发帖数: 401 | 19 Something wrong with your code.Maybe it is cartesian merge.
Never merge two large datasets by many-to-many. I update a dataset by
merging 3 medical claims datasets (each about 20-50G) through one-to-many.
It take about 50 minutes. |
y****n 发帖数: 46 | 20 You can try hash table. |
|
|
t***1 发帖数: 18 | 21 Dataset merge can't handle many-to-many, only one-to-many, isn't it?
For large datasets merge, 1. you should run sql on by-variable for each of
them and have a rough idea how many obs are going to be created; 2. index
the data and drop of all other variables except by-variable and index. |
o****o 发帖数: 8077 | 22 why don't u post some sample data and desired output, so that ppl here can
help you more efficiently rather just talk in big
已。
【在 z**********i 的大作中提到】 : sorry. 实际上,code是数据中心提供的。我只是把他们的数据读进去,然后运行而已。 : 结果,光这merge这一步,就卡了好几天,上周从周一到周五,文件达到450G,还没有要 : 停的意思。 : 这个周一,我重新设置了memsize,速度增加了3-4倍,从周一早上到周三晚上,文件达 : 到500多G,但还是在merge.并且,文件的大小不是一直在增加。周二晚上就500多G,今 : 天一整天基本没动。但CPU还是40-50%。 : 所以,上来请教一下。
|
s*r 发帖数: 2757 | 23 it may be confidential info
【在 o****o 的大作中提到】 : why don't u post some sample data and desired output, so that ppl here can : help you more efficiently rather just talk in big : : 已。
|
o****o 发帖数: 8077 | 24 just the structure, ID value can be modified, other variables' values can be
simulated
【在 s*r 的大作中提到】 : it may be confidential info
|
h***x 发帖数: 586 | 25 Her problem is just "many to many". Need to change to "many to one" or "one
to one" by dedup or data roll-up.
【在 o****o 的大作中提到】 : why don't u post some sample data and desired output, so that ppl here can : help you more efficiently rather just talk in big : : 已。
|
z**********i 发帖数: 12276 | 26 我再想想,因为我没有仔细去考虑breast cancer dataset, 或许在merge前,我应该把
它的duplicates去掉.
【在 y******0 的大作中提到】 : Something wrong with your code.Maybe it is cartesian merge. : Never merge two large datasets by many-to-many. I update a dataset by : merging 3 medical claims datasets (each about 20-50G) through one-to-many. : It take about 50 minutes.
|
z**********i 发帖数: 12276 | 27 是的。看来"many to many"是个问题,但code是别人给的,按理说是可以运行的。
多谢大家的提醒。
one
【在 h***x 的大作中提到】 : Her problem is just "many to many". Need to change to "many to one" or "one : to one" by dedup or data roll-up.
|
z**********i 发帖数: 12276 | 28 来更新一下这个问题,其实,是one to many merge,不是many to many. 后来,我把大
的dataset的变量减少到我需要的几个变量,10几分钟就完了。原来有上千个变量。
one
【在 h***x 的大作中提到】 : Her problem is just "many to many". Need to change to "many to one" or "one : to one" by dedup or data roll-up.
|