RB Smissaert wrote:
But then if the base of the logarithm doesn't matter then
how is this equation going to help you?
m==N/logN
So, basically it comes down to some experimenting?
RBS
No, the relationship is set by the math. An absolute measurement
requires that you experiment to discover the constants, but in real
world situations you are operating in a fixed environment and just want
to optimize your performance by proportional measurements. Whether you
use log or ln merely introduces the famous 2.303 constant proportion.
Whether a full scan of an index is slower than a row scan does depend on
the index structure. If the index has brother pointers a full index
scan can be as fast as a row scan, and if an ordered list is requesteded
can be faster. This is where you could experiment to discover more
about the performance of the index. I think that Sqlite's indices do
not have the extra pointers, but have not looked carefully to find out
for sure.
A binary tree type index like a B-tree maintains its keys in collating
sequence order so a scan of the index gives you an ordered list without
extra sorting. Sqlite uses such an index to sort result sets rather
than a traditional sort.
-
To unsubscribe, send email to [EMAIL PROTECTED]
-