>>I see that you moved the Expire date into the inner select. I may try that, but don't think it will make any difference. I may eliminate this whole criterion as it's very unlikely to make an effect (in 99,9999% of the cases the tExpire_date is empty).
>
>Not only. I use variables instead of {^....}
I noticed that <g> Actually, this SQL is a result of expansion. I create it using TEXT ENDTEXT commands and then sent to RunSQL function.
>But w/o knowing the date it is very hard to optimize this query :o)
>If the data isn't very sensible can you send me these tables to play with them? If you can of course.
No, unfortunately I can not.
Anyway, it looks like to BILLER the whole process now takes ~ 1 min. on the Network instead of 10 original minutes.
The same process for Collection takes ~1 min. on the Network as it was before. The time for Collection increased for the local database.
If it's not broken, fix it until it is.
My Blog