Quote Originally Posted by dreammanor View Post
Yes, the 425 seconds is just for the initial loading of the project, and I have not done anything else, such as a full validation.
Just a follow-up so you don't think I'm ignoring you

After trying many different methods, it comes down to the recordset object when sorting a field containing strings. For example, a recordset with 500K records, following applies and on a relatively fast PC (different PCs will have different results):
Sorting on numeric field: 0.140625 seconds
Sorting on string field: 11.796875 seconds
That is a difference of 84 times slower

The project uses sorting often. So, I'll need to look at it again and find places where I can let the treeview do the sorting (will be displaying far less items than the recordset contains) and also where sorting strings in the recordset is used for grouping rather than sorting. In that case, I can use a CRC value of the string for grouping purposes.

The bottom line: I need to prevent the recordset from being sorted on string fields while still able to group/sort on those same fields in another way.

Just a side note: recordset.Find on a string in same recordset is up to 7x slower than finding a numeric value. If I'm using a numeric value for grouping strings, i.e., crc32, then I can use Find on the crc32 value vs the string value. The cost of creating a crc32 search value should be minimal.