Re: Ultra fast db access & searching?
- From: IchBin <weconsul@xxxxxxx>
- Date: Fri, 25 Nov 2005 10:48:23 -0500
Dyreatnews@xxxxxxx wrote:
Yes it is called hashing but the Database does all of this thru keys and indexes under the covers for. Defining these relationship's using PK, FK and indexes correctly makes queries run so fast."Aerodyne" <aerodynex@xxxxxxxxx> writes:
Thanks IchBin .... but I'm sure even with HSQLDB searching through millions of unique user names can be optimize in some way or another. What are the best solutions for this task or do most just leave the database do it with out a good design.
Hotmail has 150+ million users ... yet they get back to you very quickly as if the user name is already in use & several suggestions!
I'm just looking for good database design if any or tricks for fast searching... ie instead of putting the complete city name in a field (LosAngeles) you just use LA, that way you only have to search for two characters rather than all 10 for equality or like wise for all other cities ... just a 3 letter acronym.
You are on to something here. I believe it is called hashing :)
IMHO - It still depends on the relationship of those keys and indexes to be defined correctly and the knowledge of correct SQL statement definition to optimized the use of the fore mentioned keys an indexes. Also to normalize you database the best you can.
Looking for a state can be optimized by defining it as a unique index or primary key. Defined as a FK when if referenced by other tables. You do not want to do any hashing. This is why you have a DBMS. You may want to google for "Database normalization techniques" also.
Here are some good links for review..
http://en.wikipedia.org/wiki/Hash_table http://www.datamodel.org/index.html http://en.wikipedia.org/wiki/Database_normalization http://www.datamodel.org/NormalizationRules.html
--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"' -William E. Taylor, Regular Guy (1952-) .
- Follow-Ups:
- Re: Ultra fast db access & searching?
- From: IchBin
- Re: Ultra fast db access & searching?
- References:
- Ultra fast db access & searching?
- From: Aerodyne
- Re: Ultra fast db access & searching?
- From: IchBin
- Re: Ultra fast db access & searching?
- From: Aerodyne
- Re: Ultra fast db access & searching?
- From: Dyreatnews
- Ultra fast db access & searching?
- Prev by Date: Re: Ultra fast db access & searching?
- Next by Date: Re: Ultra fast db access & searching?
- Previous by thread: Re: Ultra fast db access & searching?
- Next by thread: Re: Ultra fast db access & searching?
- Index(es):
Relevant Pages
|