most of the db applications tend to heavily perform range queries which btrees are excellent for. range queries are something like select * from my_table where age > 30 etc just for fetching exact values (==) hash tables are still faster by using hash functions like md5. amount of data doesnt matter with caching and disk-based hashes. even if u use a hash function which has collision, by using multiple levels of hashes they would still beat btrees. this is my opinion. everything depends on the operations u perform on the data structure. anything other than == opeartion ,hash table is simply a waste and hence not used in dbs. (and btree for == is reasonbly faster if not as much as hashes).
On 4/18/07, C++4LifePuta <[EMAIL PROTECTED]> wrote: > > > A programmer friend of mine told me that research was done and for > database applications, B-Trees were faster on average as opposed to > hashes. > > I thought about this for a minute and could only come up with maybe > the amount of data they are storing is so large that a resonably > unique hash function could not always be derived resulting in frequent > collisions. > > Any thoughts on this? > <first time poster> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---
