Re: Hash Index
My grasp of computing theory isn't terribly strong or theoretical so I hope others will correct me if anything I say here is inaccurate I got curious to see if I could find a good basic description of hashing online so I did a Google search on hash index. I was surprised how many hits I had to rule out because they weren't terribly clear; most assumed too much prior knowledge to be clear to somone without the basic concepts behind them. 1. I eventually found one at http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/hash_tables.html that may still be a bit theoretical for some tastes but it has a nifty animation that illustrates hashing functions at work which I think may clarify matters somewhat. The link for the animation is near the bottom of the page. By the way, this page does not use the term 'hash index' very much but I think it would be safe to think of a 'hash index' as just being a 'hash table' that points to a data table in a relational database. Again, I'm counting on the people with more theory background to jump in if that is not reasonable. 2. I found another explanation at http://bo.majewski.name/bluear/gnu/GLib/ch03.html which includes some C language code, which may be of interest if you program in C. If these explanations doesn't answer your questions, you could try some web searches of your own and/or consult a good computer science textbook that explains standard programming algorithms. I don't happen to have such a book so I can't recommend one in particular but others may be able to suggest a good one. Rhino - Original Message - From: Lou Olsten [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 06, 2004 6:01 PM Subject: Hash Index This one is more curiosity than a problem. I have read the docs about HASH indexes and how they are used, but I'm just wholly unfamiliar with WHAT a HASH index is. I'm only familiar with the term 'hash' as it relates to encryption. What exactly IS a hash index? Just curious, Lou -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Hash Index
Hope this helps Very much. Thanks to all who responded. http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/hash_tables.html was helpful as well. Lou - Original Message - From: Andy Ford [EMAIL PROTECTED] To: Lou Olsten [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 6:33 PM Subject: Re: Hash Index A hash is a key value pair i.e. if you want a value for a unique key (in perl anyway) you can do this... %status = ( 1 = true, 0 = false ); If I have a variable that hold an integer such as $test = 1 I can do the following. if($status{$test} eq true) { do something } I have passed the variable $test as a key to the hash %status, and it has returned a value for that unique key. It's very similar in mySQL I come from a C background and now working extensively in Perl - this is a very powerful feature. Hope this helps Andy On Thu, 2004-05-06 at 23:01, Lou Olsten wrote: This one is more curiosity than a problem. I have read the docs about HASH indexes and how they are used, but I'm just wholly unfamiliar with WHAT a HASH index is. I'm only familiar with the term 'hash' as it relates to encryption. What exactly IS a hash index? Just curious, Lou -- perl -e 'print qq^;@) [###]^^qq^z\.MY{eLQ9^' in:control developer, Telindus, RG27 9HY DDI: +44 1256 709211, GSM: +44 7810 636652 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Hash Index
A hash is a key value pair i.e. if you want a value for a unique key (in perl anyway) you can do this... %status = ( 1 = true, 0 = false ); If I have a variable that hold an integer such as $test = 1 I can do the following. if($status{$test} eq true) { do something } I have passed the variable $test as a key to the hash %status, and it has returned a value for that unique key. It's very similar in mySQL I come from a C background and now working extensively in Perl - this is a very powerful feature. Hope this helps Andy On Thu, 2004-05-06 at 23:01, Lou Olsten wrote: This one is more curiosity than a problem. I have read the docs about HASH indexes and how they are used, but I'm just wholly unfamiliar with WHAT a HASH index is. I'm only familiar with the term 'hash' as it relates to encryption. What exactly IS a hash index? Just curious, Lou -- perl -e 'print qq^;@) [###]^^qq^z\.MY{eLQ9^' in:control developer, Telindus, RG27 9HY DDI: +44 1256 709211, GSM: +44 7810 636652 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hash Index
This one is more curiosity than a problem. I have read the docs about HASH indexes and how they are used, but I'm just wholly unfamiliar with WHAT a HASH index is. I'm only familiar with the term 'hash' as it relates to encryption. What exactly IS a hash index? Just curious, Lou
Re: Hash Index
Lou Olsten wrote: This one is more curiosity than a problem. I have read the docs about HASH indexes and how they are used, but I'm just wholly unfamiliar with WHAT a HASH index is. I'm only familiar with the term 'hash' as it relates to encryption. What exactly IS a hash index? Just curious, Lou Lou: Are you familiar with a hash data structure? If not, you can read here: http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/hash_tables.html or other pages that Google finds for hash data structure. -- Sasha Pachev Create online surveys at http://www.surveyz.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]