473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Any hash function in MySQL?

170 100+
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?
May 30 '08 #1
4 7983
Atli
5,058 Expert 4TB
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.
May 30 '08 #2
poolboi
170 100+
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?
Jun 2 '08 #3
Atli
5,058 Expert 4TB
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.
Jun 2 '08 #4
poolboi
170 100+
alright
thanks for the info
:)
Jun 4 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Damien Morton | last post by:
Ive been doing some investigation of python hashtables and the hash function used in Python. It turns out, that when running pystone.py, as much time is spent in string_hash() as is spent in...
3
by: Markus Dehmann | last post by:
I have a class "Data" and I store Data pointers in an STL set. But I have millions of inserts and many more lookups, and my profiler found that they cost a lot of runtime. Therefore, I want to...
4
by: flipdog | last post by:
Hello all, I didn't know there is a thread on hash function started in this newsgroup so reposted my posting from another group. Hope I can have some feedbacks. I am new to hash table. I came...
1
by: sureshjayaram | last post by:
When I searched for a good hash function for strings, I came across DJB hash function and found it serving my purpose. I wanted to use that, but I was unaware of the licensing/copyright issues. I...
6
by: barcaroller | last post by:
I'm looking for a hash function (in C) that will convert a string of arbitrary length (but less than 1024 chars) to a reasonably-unique 16-bit short integer. Can anyone point me to such a hash...
6
by: Frank King | last post by:
Hi, I am looking for a hash function to map string to string in VB. Could somebody give me some informtion? Thank you very much. fk
12
by: shaanxxx | last post by:
I wanted to write hash function float or double. Any suggestion would be appreciated.
4
by: yuyang08 | last post by:
Hello, everyone, I am wondering what is the hash function that is used in hash_map/hash_set. Can I replace it with my own hash function? Any comments on this? Thanks! -Andy
44
by: gokkog | last post by:
Hi there, There's a classic hash function to hash strings, where MULT is defined as "31": //from programming pearls unsigned int hash(char *ptr) { unsigned int h = 0; unsigned char *p =...
21
by: Hallvard B Furuseth | last post by:
Is the code below valid? Generally a value must be accessed through the same type it was stored as, but there is an exception for data stored through a character type. I'm not sure if that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.