IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 17, 2008, 4:12:41 PM (18 years ago)
Author:
Paul Price
Message:

That ORDER BY which I claimed was so important wasn't really. I think I was in shaky ground so far as standard SQL is concerned (undefined behaviour). By explicitly taking the MAX, I don't need to ORDER BY and then hope that it chooses the right one. Besides, MAX is faster than ORDER BY.

File:
1 edited

Legend:

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

    r18579 r18609  
    2020    GROUP BY
    2121        stack_id
    22     -- This ORDER BY is important: it sets the final num_stack that
    23     -- comes out of the top-level GROUP BY.  We want it to be the
    24     -- biggest number for a skycell/filter combination.
    25     ORDER BY
    26         num_stack DESC
    2722        ) AS stackSizes
    2823    -- JOINing the warpsToStack and stackSizes tables
Note: See TracChangeset for help on using the changeset viewer.