Optimization Cleartool命令性能:lshistory或find-exec

Optimization Cleartool命令性能:lshistory或find-exec,optimization,clearcase,cleartool,Optimization,Clearcase,Cleartool,我正在寻找查询优化,但是IBM在clearcase文档中对此不是很健谈。 简言之,我们有相当大的vob,我们想列出两个日期之间所做的所有更改,您认为哪个查询最快,您认为有什么改进吗 方法1: cleartool find -avobs -type f -element '(created_since(1-Jun-2016) && !created_since(1-Sep-2016)) && (Element_Type==""Pr

我正在寻找查询优化,但是IBM在clearcase文档中对此不是很健谈。 简言之,我们有相当大的vob,我们想列出两个日期之间所做的所有更改,您认为哪个查询最快,您认为有什么改进吗

方法1:

cleartool find -avobs -type f -element '(created_since(1-Jun-2016) &&                  !created_since(1-Sep-2016))
 && (Element_Type==""Program"" || Element_Type==""Output"" || Element_Type==""Data"")'
-ver 'created_since(1-Jun-2016) && !created_since(1-Sep-2016)' 
-exec 'cleartool describe -fmt ""#Name:%Xn Date:%Nd User:%u Label:%1.400Cl Attributes:%a Version:%Vn Comment:%Nc \n"" $CLEARCASE_XPN' 
>| test.txt
方法2:

cleartool lshistory -avobs -since 1-Jun-2016 -fmt '#Name:%Xn Date:%Nd User:%u Label:%1.400Cl Attributes:%a Version:%Vn Comment:%Nc \n' -nco -pname >| test.txt
谢谢大家!

是关于事件记录的。它提供更少的过滤选项,这意味着你得到了所有东西,然后你自己应用一个过滤器(
grep

通常,搜索速度会更快,因为您可以添加条件来优化搜索

从“”中,为了查看所有更改(不仅是元素级别的创建,而且是版本级别的更改),查询是:

cleartool find . -version "{created_since(date1) && !created_since(date2)}"
-印刷品

事实上,您可以添加:

  • 键入f
    (您只需要文件,不需要文件夹)
  • 任何其他标准(注意:我在中没有看到“元素类型”)
这些将有助于加快查询速度


报告补充说:

根据您的评论,我将查询更改为:

cleartool find -avobs -type f -element '(attr_sub(Element_Type,==,"Output"))' -ver 'created_since(1-Jun-2016) && !created_since(1-Sep-2016)' -exec 'cleartool describe -fmt ""#Name:%Xn Date:%Nd User:%u Label:%1.400Cl Attributes:%a Version:%Vn Comment:%Nc \n"" $CLEARCASE_XPN' >| test.txt
多行:

cleartool find -avobs -type f -element '(attr_sub(Element_Type,==,"Output"))' \
  -ver 'created_since(1-Jun-2016) && !created_since(1-Sep-2016)'  \
  -exec 'cleartool describe -fmt ""#Name:%Xn Date:%Nd User:%u Label:%1.400Cl Attributes:%a Version:%Vn Comment:%Nc \n"" $CLEARCASE_XPN' \
>| test.txt

谢谢你的帮助!根据您的评论,我将查询更改为:cleartool find-avobs-typef-element'(attr_sub(element_type,==,“Output”))-ver'created_自(2016年6月1日)以来&&!自(2016年9月1日)以来创建的“-exec”cleartool description-fmt”“#名称:%Xn日期:%Nd用户:%u标签:%1.400Cl属性:%a版本:%Vn注释:%Nc\n“$CLEARCASE\u XPN”>|测试。txt@M4hd1做得好!我已将您的评论包含在答案中,以提高可视性。