I just discovered Bintoc() thanks to UT.
I created a new field [cbintoc c(8)] in 2 tables and created an index on that field in each table. In each record validation() I put "replace cbintoc with bintoc(fk1) + bintoc(fk2)". (I've found that "select cbintoc..." is faster than "select bintoc(fk1)+bintoc(fk2)...".)
I then did "select cbintoc from table1 where cbintoc not in (select cbintoc from table2)" and it was faster than my old select that used str() instead of bintoc() (great). Then I went back and made [cbintoc c(5)] and put "replace cbintoc with bintoc(fk1) + bintoc(fk2,1)" in record validation(). When I re-ran the select, it took longer.
Both tables have about 70,000 records in each. Shouldn't it be quicker when the field/index is only 5 chars instead of 8?
Also in table2, cbintoc is unique so I created a candidate index with !deleted() for filter. That seemed to slow the select down some also. Am I better off without the filter and just a regular index?
Bill Morris