On 30/05/17 14:46, Per Jessen wrote:
What is the definition of "hash", by the way? Is it just an index, and the code still has to look at the original text file?
No, it's a table that is ready to load into memory and do lookups in. (Berkeley DB in postfix).
In other words a database :-) Really, yes! Okay, it's not Berkeley DB I worked with, but I'm a Pickie, and as far as I can make out, a Berkeley table is almost identical to a Pick FILE. Managed properly, *M*U*C*H* more impressive, performance-wise, than a sql table. "SQL optimises the easy task of finding data in memory. Pick optimises the harder task of getting it there in the first place!" But I probably tried using text files and failed, which is why I went down the mysql route. I can't remember, the current system was installed about 2010 I think, if not earlier. And has just been migrated to larger disks and faster systems over the years. For those who are interested, Pick uses a technique called "linear hashing", which means the time taken to rehash a file is proportional to delta(size), not size. And it's a standard hashed file, so you have key-value pairs, you hash the key, and value is in the relevant bucket - 4K by default. And in a system with no pathological data and no tuning, it takes on average about 1.05 attempts to hit your target. Cheers, Wol -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org