I have a table of 4.7 million records and an indexed LongInt primary key field. 
If I do Distinct Values on the field it takes < 1 second but Selection to Array 
takes 230 seconds, as if it’s not using the index at all. I thought for sure 
that Selection to Array was supposed to use the index. I can sort the table in 
< 1 sec so, if I have a sorted index, why can’t it just dump that into an array?

Distinct Values works on the selection, not the entire table, and the speed 
difference holds up even when I use a partial selection of records. So if 
Distinct Values know how to grab only that part of the index represented by the 
selection, why doesn’t Selection to Array? 

------------------------------------------------
Richard Wright
DataDomain
[email protected]
------------------------------------------------

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to