Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BinToc() in SQL
Message
From
09/03/2002 00:56:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
BinToc() in SQL
Miscellaneous
Thread ID:
00630524
Message ID:
00630524
Views:
61
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
Next
Reply
Map
View

Click here to load this message in the networking platform