>Hi hilmar,
>
>>>When having lot's of keys (records) in the index seeking an indexvalue can get slow. Reindexing the file should get a new balance where all values are equally spread in the B-Tree. Theorecticly SEEKing a value in a table of N records would require at most 1+ INT(LOG(N)/LOG(2)) steps.
>>
>>Theoretically, that is, if the index is completely balanced.
>>
>>I guess you could simplify the expression above (in VFP) to
ceiling(log(N) / log(2)).
>
>Hmmm, are we running some sort of contest of getting the shortest code again :) ?
>
>Walter,
It could be a thoeretical puzzle for you, but it's not that easy for me :(( I have a site, which is not working. More precisely, it works for ID<1000, but when I increase ID, the time spent gets bigger and bigger and finally it gives timeout.
Yesterday I tried all combinations and was unable to make it work with big numbers. I don't have control over the server, I can only download and upload files from one directory (not from Data directory). I don't have database to test locally. I don't have a tool to test my changes locally... The only way for me to test is change page locally, upload and try, then again and again...
If you're curious, drop me an e-mail at
nosonov@msn.com (I'm at home today), I'll give you some instructions.
If it's not broken, fix it until it is.
My Blog