will grouping take lot of time?

  • What wrong or time consuming thing in this query ? GROUP BY UPPER(C3), UPPER(C4)?

    NO OF ROW 500k+

    Select

    Max(C1),

    Min(C2),

    UPPER(C3),

    UPPER(C4),

    SUM(C5),

    Max(C6),

    Min(C7)

    FROM table1

    where C8 < 1 AND C3 IS NOT NULL

    GROUP BY UPPER(C3),

    UPPER(C4)

  • It could be anything - from indexes to using the UPPER() function...

    I'd start with removing the 'UPPER' function and see if it makes any big difference.

    If not - look at the query plan and see what SQL is doing in the background.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply