in reply to Re^4: Key to use for files in db!
in thread Key to use for files in db!

Hmm, kewl. Now, the question is, what is the BEST (fastest) way? #1 or #3?

In this case #1 seems better, since it doesnt have to calculate the md5 twice. And maybe its better to have a column with that already calculated, and not calculate twice.

Replies are listed 'Best First'.
Re^6: Key to use for files in db!
by pajout (Curate) on Jan 18, 2006 at 18:23 UTC
    Why do you think that the fastest means the best? :>)))
    But I am afraid of your problem is not fully resolvable without some experiments.
    Ad #3 - the md5 hash is (re)calculated when the _index_ built or modified, so the special column is not necessary. And, when the query runs, only md5 of queried string is calculated.