Changes between Initial Version and Version 1 of DatabaseBasedAnalysis/Benchmarking


Ignore:
Timestamp:
08/04/18 15:46:16 (7 years ago)
Author:
tbretz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DatabaseBasedAnalysis/Benchmarking

    v1 v1  
     1{{{
     2SELECT
     3   Events.*
     4FROM RunInfo
     5LEFT JOIN Events   USING (FileId)
     6LEFT JOIN Position USING (FileId, EvtNumber)
     7WHERE
     8   fSourceKey=5
     9AND
     10   fRunTypeKey=1
     11AND
     12   FileId BETWEEN 131101000 AND 131107000
     13AND
     14   fZenithDistanceMax<35
     15AND
     16   fR750Ref/fR750Cor>0.9
     17}}}
     18
     19Without writing a file and without filling the root trees internally
     20
     21{{{
     22------------------------ Rootify SQL -------------------------
     23Reading query from file './crab-data-only.sql'.
     24Connecting to database...
     25Client Version: 5.7.23
     26Server Version: 5.7.23-0ubuntu0.18.04.1
     27Compression of databse connection is OFF
     28Connection to databases is ENCRYPTED (DHE-RSA-AES256-SHA)
     29Requesting data...
     30Opening file '/dev/null' [compression=1]...
     31Writing data to tree 'Result'
     32Trying to setup 44 branches...
     33Configured 44 branches.
     34Filling branches...
     352305973 rows fetched.
     361 rows skipped due to NULL field.
     370 rows filled into tree.
     380 B written to disk.
     39File closed.
     40Execution time: 40.3481s (17.5 us/row)
     41--------------------------------------------------------------
     42
     43
     44Status                        Duration    CPU User  CPU System
     45--------------------------------------------------------------
     46[...]
     47Sending data                 39.854647   29.566965    0.343076
     48[...]
     49--------------------------------------------------------------
     50
     51Bytes_sent       750
     52Bytes_received   833 M
     53}}}
     54
     55Same query with writing a file
     56
     57{{{
     58------------------------ Rootify SQL -------------------------
     59Reading query from file './crab-data-only.sql'.
     60Connecting to database...
     61Client Version: 5.7.23
     62Server Version: 5.7.23-0ubuntu0.18.04.1
     63Compression of databse connection is OFF
     64Connection to databases is ENCRYPTED (DHE-RSA-AES256-SHA)
     65Requesting data...
     66Opening file 'crab.root' [compression=1]...
     67Writing data to tree 'Result'
     68Trying to setup 44 branches...
     69Configured 44 branches.
     70Filling branches...
     712305973 rows fetched.
     721 rows skipped due to NULL field.
     732305972 rows filled into tree.
     74355 MB written to disk.
     75File closed.
     76Execution time: 59.3526s (25.7 us/row)
     77--------------------------------------------------------------
     78
     79
     80Status                        Duration    CPU User  CPU System
     81--------------------------------------------------------------
     82[...]
     83Sending data                 58.076298   29.343025    0.337940
     84[...]
     85--------------------------------------------------------------
     86
     87Bytes_sent       750
     88Bytes_received   833 M
     89}}}
     90
     91Query calculating the source dependent parameters for the on source position only
     92
     93{{{
     94SELECT
     95   Events.*,
     96   @DX      := MeanX-X/1.02,
     97   @DY      := MeanY-Y/1.02,
     98   @Norm    := SQRT(@DX*@DX + @DY*@DY),
     99   @Dist    := @Norm*0.0117193246260285378 AS Dist,
     100   PI()*Width*Length*0.0117193246260285378*0.0117193246260285378 AS Area,
     101   @LX      := TRUNCATE((CosDelta*@DY - SinDelta*@DX)/@Norm, 6),
     102   @LY      := TRUNCATE((CosDelta*@DX + SinDelta*@DY)/@Norm, 6),
     103   @Alpha   := ASIN(@LX) AS Alpha,
     104   @Sign    := SIGN(@LY) AS Sign,
     105   @M3L     := M3Long*@Sign*0.0117193246260285378,
     106   @Slope   := SlopeLong*@Sign/0.0117193246260285378 AS Slope,
     107   @Xi      := 1.39 + 0.154*@Slope + 1.679*(1-1/(1+4.86*Leakage1)),
     108   @Sign1   := @M3L+0.07,
     109   @Sign2   := (@Dist-0.5)*7.2-@Slope,
     110   @Disp    := IF (SIGN(@Sign1)<0 || SIGN(@Sign2)<0, -@Xi, @Xi) * (1-Width/Length),
     111   @ThetaSq := (@Disp*@Disp + @Dist*@Dist - 2*@Disp*@Dist*SQRT(1-@LX*@LX)) AS ThetaSq
     112FROM RunInfo
     113LEFT JOIN Events   USING (FileId)
     114LEFT JOIN Position USING (FileId, EvtNumber)
     115WHERE
     116   fSourceKey=5
     117AND
     118   fRunTypeKey=1
     119AND
     120   FileId BETWEEN 131101000 AND 131107000
     121AND
     122   fZenithDistanceMax<35
     123AND
     124   fR750Ref/fR750Cor>0.9
     125}}}
     126
     127Without writing to a file and without filling the root trees
     128
     129{{{
     130------------------------ Rootify SQL -------------------------
     131Reading query from file './crab-0deg.sql'.
     132Connecting to database...
     133Client Version: 5.7.23
     134Server Version: 5.7.23-0ubuntu0.18.04.1
     135Compression of databse connection is OFF
     136Connection to databases is ENCRYPTED (DHE-RSA-AES256-SHA)
     137Requesting data...
     138Opening file '/dev/null' [compression=1]...
     139Writing data to tree 'Result'
     140Trying to setup 60 branches...
     14110 branches skipped due to name starting with @.
     142Configured 50 branches.
     143Filling branches...
     1442305973 rows fetched.
     1451 rows skipped due to NULL field.
     1460 rows filled into tree.
     1470 B written to disk.
     148File closed.
     149Execution time: 74.8984s (32.5 us/row)
     150--------------------------------------------------------------
     151
     152
     153Status                        Duration    CPU User  CPU System
     154--------------------------------------------------------------
     155starting                      0.000125    0.000119    0.000004
     156checking permissions          0.000004    0.000003    0.000001
     157checking permissions          0.000002    0.000002    0.000000
     158checking permissions          0.000003    0.000002    0.000000
     159Opening tables                0.000018    0.000018    0.000000
     160init                          0.000226    0.000000    0.000226
     161System lock                   0.000008    0.000000    0.000008
     162optimizing                    0.000016    0.000000    0.000016
     163statistics                    0.000067    0.000000    0.000067
     164preparing                     0.000016    0.000000    0.000016
     165executing                     0.000003    0.000000    0.000002
     166Sending data                 74.844972   74.051538    0.809659
     167end                           0.000011    0.000010    0.000001
     168query end                     0.000009    0.000009    0.000000
     169closing tables                0.000007    0.000006    0.000000
     170freeing items                 0.000048    0.000047    0.000002
     171cleaning up                   0.000014    0.000013    0.000000
     172--------------------------------------------------------------
     173
     174Bytes_sent       1.6 k
     175Bytes_received   1.5 G
     176}}}
     177
     178And with writing to a file
     179
     180{{{
     181------------------------ Rootify SQL -------------------------
     182Reading query from file './crab-0deg.sql'.
     183Connecting to database...
     184Client Version: 5.7.23
     185Server Version: 5.7.23-0ubuntu0.18.04.1
     186Compression of databse connection is OFF
     187Connection to databases is ENCRYPTED (DHE-RSA-AES256-SHA)
     188Requesting data...
     189Opening file 'crab.root' [compression=1]...
     190Writing data to tree 'Result'
     191Trying to setup 60 branches...
     19210 branches skipped due to name starting with @.
     193Configured 50 branches.
     194Filling branches...
     1952305973 rows fetched.
     1961 rows skipped due to NULL field.
     1972305972 rows filled into tree.
     198444 MB written to disk.
     199File closed.
     200Execution time: 84.1606s (36.5 us/row)
     201--------------------------------------------------------------
     202
     203
     204Status                        Duration    CPU User  CPU System
     205--------------------------------------------------------------
     206[...]
     207Sending data                 83.440086   73.408153    0.794420
     208[...]
     209--------------------------------------------------------------
     210
     211Bytes_sent       1.6 k
     212Bytes_received   1.5 G
     213}}}
     214
     215Now doing a full analysis for all six wobble positions
     216
     217{{{
     218#!/home/fact/FACT++/build/rootifysql --config=/home/fact/Analysis/crab.rc
     219SELECT
     220   Events.*,
     221   Angle,
     222   weight,
     223   @PX      := cosa*X - sina*Y,
     224   @PY      := cosa*Y + sina*X,
     225   @DX      := MeanX-@PX/1.02,
     226   @DY      := MeanY-@PY/1.02,
     227   @Norm    := SQRT(@DX*@DX + @DY*@DY),
     228   @Dist    := @Norm*0.0117193246260285378 AS Dist,
     229   PI()*Width*Length*0.0117193246260285378*0.0117193246260285378 AS Area,
     230   @LX      := TRUNCATE((CosDelta*@DY - SinDelta*@DX)/@Norm, 6),
     231   @LY      := TRUNCATE((CosDelta*@DX + SinDelta*@DY)/@Norm, 6),
     232   @Alpha   := ASIN(@LX) AS Alpha,
     233   @Sign    := SIGN(@LY) AS Sign,
     234   @M3L     := M3Long*@Sign*0.0117193246260285378,
     235   @Slope   := SlopeLong*@Sign/0.0117193246260285378 AS Slope,
     236   @Xi      := 1.39 + 0.154*@Slope + 1.679*(1-1/(1+4.86*Leakage1)),
     237   @Sign1   := @M3L+0.07,
     238   @Sign2   := (@Dist-0.5)*7.2-@Slope,
     239   @Disp    := IF (SIGN(@Sign1)<0 || SIGN(@Sign2)<0, -@Xi, @Xi) * (1-Width/Length),
     240   @ThetaSq := (@Disp*@Disp + @Dist*@Dist - 2*@Disp*@Dist*SQRT(1-@LX*@LX)) AS ThetaSq
     241FROM RunInfo
     242LEFT JOIN Events   USING (FileId)
     243LEFT JOIN Position USING (FileId, EvtNumber)
     244CROSS JOIN Wobble
     245WHERE
     246   fSourceKey=5
     247AND
     248   fRunTypeKey=1
     249AND
     250   FileId BETWEEN 131101000 AND 131107000
     251AND
     252   fZenithDistanceMax<35
     253AND
     254   fR750Ref/fR750Cor>0.9
     255}}}
     256
     257Without writing a file and without filling the tree
     258
     259{{{
     260
     261}}}
     262