Sep 052012

  2 Responses to “MINimsing aggregate query performance to the MAX”

  1. update to_fetch_the_data set this_is_one_case = ‘although Oracle needs’ where rownum=1;
    update to_fetch_the_data set this_is_one_case = ‘2 index min/max scans anyway’ where this_is_one_case like ‘B%’ and rownum=1;

    (select max(this_is_one_case) from to_fetch_the_data) “note that we can do it”,
    (select min(this_is_one_case) from to_fetch_the_data) “in one query,”
    from dual;

    note that we can do it
    in one query,
    although Oracle needs
    2 index min/max scans anyway

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>