• OK, thanks.

    Your example by replacing the select of the MIN(Name) and MAX(Name) by selecting the name of the Min and Max ID is not valid because in real live the min and max Name do not correspond with the min and max ID.

    But I understand why my query was slow.

    So in-memory tables are not always so optimal, especially in range and some functions (Count, Min or Max).

    Rgds.