Changeset 18760


Ignore:
Timestamp:
02/18/17 13:46:29 (8 years ago)
Author:
Daniela Dorner
Message:
optimized status/processing queries and settings
Location:
trunk/DataCheck
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Setup/steps_fact_isdc.rc

    r17062 r18760  
    4747Callisto.MainTable: Callisto
    4848Callisto.Primaries: fNight, fSequenceID
    49 Callisto.Needs: RawFileAvailISDC SequenceFileAvailISDC
    50 Callisto.SpecialJoin: LEFT JOIN RunInfo USING(fNight, fSequenceID)
     49#Callisto.Needs: RawFileAvailISDC SequenceFileAvailISDC
     50Callisto.Needs: SequenceFileAvailISDC
     51#Callisto.SpecialJoin: LEFT JOIN RunInfo USING(fNight, fSequenceID) LEFT JOIN SequenceInfo USING(fNight, fSequenceID)
     52Callisto.SpecialJoin: LEFT JOIN SequenceInfo USING(fNight, fSequenceID)
     53Callisto.SpecialWhere: AND fNumRuns=fNumRawfilesAvailISDC
    5154
    5255Star.MainTable: Star
    5356Star.Primaries: fNight, fSequenceID
    5457Star.Needs: RawFileAvailISDC Callisto DriveFileAvailISDC RatesFileAvailISDC SequenceFileAvailISDC
    55 Star.SpecialJoin: LEFT JOIN RunInfo USING(fNight, fSequenceID)
     58Star.SpecialJoin: LEFT JOIN RunInfo USING(fNight, fSequenceID) LEFT JOIN SequenceInfo USING(fNight, fSequenceID)
    5659
    5760#Merpp.MainTable: Merpp
  • trunk/DataCheck/Sourcefile.sh

    r18707 r18760  
    266266      query=$query" AND fProductionHostKEY=$2 "
    267267   fi
    268    if ! echo $query | grep UPDATE >/dev/null 2>&1
    269    then
    270       query=$query" GROUP BY "${prims[@]}
    271    fi
     268   query=$query`getfromsetup $step "SpecialWhere"`
    272269   # add condition for needs, i.e. that step is done
    273270   for (( k=0 ; k < ${#needs[@]} ; k++ ))
    274271   do
    275       if [ $k -eq 0 ]
    276       then
    277          query=$query" HAVING "
    278       else
     272#      if [ $k -eq 0 ]
     273#      then
     274#         query=$query" HAVING "
     275#      else
    279276         query=$query" AND "
    280       fi
    281       query=$query" COUNT(*)=COUNT(IF("
     277#      fi
     278#      query=$query" COUNT(*)=COUNT(IF("
    282279      query=$query" NOT ISNULL("${needs[$k]}"Status.fStartTime) "
    283280      query=$query" AND NOT ISNULL("${needs[$k]}"Status.fStopTime) "
    284281      query=$query" AND NOT ISNULL("${needs[$k]}"Status.fAvailable) "
    285282      query=$query" AND ISNULL("${needs[$k]}"Status.fReturnCode) "
    286       query=$query" , 1, NULL)) "
     283#      query=$query" , 1, NULL)) "
    287284   done
     285#   if ! echo $query | grep UPDATE >/dev/null 2>&1
     286#   then
     287#      query=$query" GROUP BY "${prims[@]}
     288#   fi
    288289}
    289290
Note: See TracChangeset for help on using the changeset viewer.