How can I create a Btree index on a field, excluding NULL values ?
We have a large file, where one of the indexed fields contains lots of NULL values and there won't be any searches on NULL values.
The index rebuild should only contain the keys where FIELD # "". In our case it means that instead of 2.5 GB index size it should "only" be 100 MB.
Any ideas are welcome.
Regards
Wilhelm
You might want to look at this
World leaders in all things RevSoft
Sprezz,
is the user index the only way to solve the null indexing issue?
I am looking for a way that is less complicated.
Wilhelm
Well, you could generate the !! code and strip out the write to the transation tables if the corresponding value does not meet your criteria.
support@sprezzatura.com
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
If I understand then correctly, there is no configuration option available in OI for this case.
Altering the !! code, could that have any drawback, like slower execution or different MFS sequencing (I assume that SI.MFS still goes last)?
Wilhelm
Might be a good time to organize a peasants revolt to press for the option to exclude null values. This has been an irksome problem since Arev 1.0.
And the cause of many headaches when rebuilding relational indexes too.
MFS position doesn't change. In theory the only difference would be the
if len( var ) then….
Otherwise, should be the same code you have.
support@sprezzatura.com
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
Those using the sample user.index (soundex or metaphone), should keep in mind that the trigger character you use must be one you allow to exist in the index. btree.extract helpfully strips out all the delimiters defined for the index before calling your parser module (so, in our case, all the dollar signs and most other punctuation is gone, so the default routine doesn't ever call the compare module defined).