IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 23, 2010, 11:19:20 AM (16 years ago)
Author:
bills
Message:

Fix very slow query for -towarped. Re-enable update processing;
Add -setskyfiletoupdate mode to queue updates for a single skycell.
Add -listrun.
Various other changes to support the postage stamp server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/warptool_towarped.sql

    r27503 r27737  
     1SELECT
     2    warp_id,
     3    warp_skyfile_id,
     4    skycell_id,
     5    tess_id,
     6    fake_id,
     7    state,
     8    reduction,
     9    cam_id,
     10    camera,
     11    exp_tag,
     12    workdir,
     13    magicked
     14FROM (
    115    SELECT DISTINCT
    216        warpSkyCellMap.warp_id,
     
    4559        AND warpSkyCellMap.fault = 0
    4660        -- where hook 1 %s
     61        -- limit hook 1 %s
     62UNION
     63    SELECT
     64        warpSkyCellMap.warp_id,
     65        warpImfile.warp_skyfile_id,
     66        warpSkyCellMap.skycell_id,
     67        warpSkyCellMap.tess_id,
     68        warpRun.fake_id,
     69        warpRun.state,
     70        warpRun.reduction,
     71        camRun.cam_id,
     72        rawExp.camera,
     73        rawExp.exp_tag,
     74        warpRun.workdir,
     75        MIN(chipProcessedImfile.magicked) AS magicked
     76    FROM warpRun
     77    JOIN warpImfile USING(warp_id)
     78    JOIN warpSkyCellMap USING(warp_id, skycell_id)
     79    JOIN warpSkyfile USING(warp_id, skycell_id)
     80    JOIN fakeRun USING(fake_id)
     81    JOIN camRun USING(cam_id)
     82    JOIN chipRun USING(chip_id)
     83    JOIN rawExp USING(exp_id)
     84    LEFT JOIN chipProcessedImfile USING(chip_id, class_id)
     85    WHERE warpRun.state = 'update'
     86        AND warpSkyfile.data_state = 'update'
     87        AND warpSkyfile.fault = 0
     88        AND camRun.state = 'full'
     89        AND chipProcessedImfile.data_state = 'full'
     90        -- if warpSkyfile was magicked previously require inputs to be magicked
     91        -- this blocks processing until all the chip inputs have been destreaked
     92        AND (warpSkyfile.magicked = 0 OR chipProcessedImfile.magicked >= 0)
     93        -- where hook 2 %s
     94    GROUP BY warp_id, skycell_id
     95    HAVING COUNT(warpSkyCellMap.class_id) = COUNT(chipProcessedImfile.class_id)
     96    -- limit hook 2 %s
     97) as towarped
     98
Note: See TracChangeset for help on using the changeset viewer.