>I don't know about how much more you can optimize as long as you have indexes on Login.NoMember, Login.Creation, Member.Numero and Member.Mailing. I would use BETWEEN() function in the WHERE clause --
>
>WHERE BETWEEN(Member.Numero, lnNumberStart, lnNumberEnd) ...
>
>You could also test performance using 2 SQLs. First --
>
>SELECT NoMember, MAX(Creation) AS LoginCreation FROM Login WHERE Creation < Date() - 120 GROUP BY NoMember INTO CURSOR crsTEMP
>
>Then the second SQL would be
>
>Select MEMBER.*, crsTemp.LoginCreation INNER JOIN Member ON ...
>WHERE BETWEEN(Member.Numero, lnNumberStart, lnNumberEnd) ...
I don't have a tag on MEMBER.MAILING. However, I figure it wouldn't change that much as the MAILING field will be processed within the sub query of the between as those fields are indexed. I didn't create a tag on MAILING as I only use it occasionnaly in some special queries.
However, the biggest problem is to find the maximum CREATION value in the LOGIN table. This is where it slows down.