|
Limitations SuperFastDistinct! does not do any calculations like counting or summing for the individual values returned. Because it traverses the index, it doesn't know if 500 "widgets" were sold in August. All it knows is there was a "widget" in the index and will return these distinct values as fast as possible. If you need to have counts for each value returned, then write a small routine that does a Range or Filter on each value returned.
SuperFastDistinct! works best when there are many similar index values in the table because it has the ability to "jump over" duplicate values. It will be blisteringly fast if there are dozens, hundreds or even thousands of duplicate key values in the table. It stands to reason you won't see much speed improvements if you try and get the distinct values for a unique index because there are no duplicate values for SuperFastDistinct! to "jump over" and the savings gain, if any, would be minor.
|