Any hash function in MySQL?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • poolboi
    New Member
    • Jan 2008
    • 170

    Any hash function in MySQL?

    hey guys,

    i'm not sure if u all know what hash algorithm is?
    it's supposed to make retrieval of data much faster

    i was wondering if there's such stuff in MySQL?
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    MySQL implements the MD5 and the SHA1 hashing algorithms.

    I'm not sure how they would make data retrieval faster... that doesn't really make any sense from where I'm sitting.

    They simply take a string, and turn it into a unreadable mess.

    Comment

    • poolboi
      New Member
      • Jan 2008
      • 170

      #3
      hm..i'm not too sure either
      cos i'm doing a research on such hash function too
      and also optimizing MySQL such that the retrieval of large data from MySQL will be fast
      perhaps if there's any good books or references, perhaps you could state down?

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        Hashing algorithms won't help you optimize your data retrieval speeds.

        They simply calculate a checksum value for the string you pass it. The checksum value is either a 32 char (MD5) or a 40 char (SHA1) string that can not (theoretically) be *decrypted* into it's original value.

        As such, they are mostly used to permanently *encrypt* data, such as passwords, into the database.
        And seeing as the hash is irreversible, it will not be of any help when retrieving data.

        I don't really read books, so I'm sorry to say I can't help there. The MySQL reference manual is very helpful tho.

        Comment

        • poolboi
          New Member
          • Jan 2008
          • 170

          #5
          alright
          thanks for the info
          :)

          Comment

          Working...