473,396 Members | 1,970 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.

Which is fater to search NUMERIC or ALPHABET

Hi,

im a newbie, can you please help me to choose what data type i have to use as a search key. numeric alphabet or alpha numeric.

what are the advantages and disadvantages of using that data type?


thanks in advance.
Mar 20 '07 #1
3 2347
iburyak
1,017 Expert 512MB
Numeric is usually a search key. Numeric datatype if it is for example an int takes 4b per record and character datatype depend on size of a character string.
Alphanumeric is the same as alphabet because numbers in this case treated as characters.
Integer datatype can be up to 2147483647 and to store the same in character datatype you have declare column at least 10 characters long.

Search on smaller columns is faster due to a number of data pages have to be read to get to a data. I can come up with more reasons, like generating unique ID with alphanumeric is much harder, on why numeric is better but I proved my point and it is good enough.
Mar 20 '07 #2
Numeric is usually a search key. Numeric datatype if it is for example an int takes 4b per record and character datatype depend on size of a character string.
Alphanumeric is the same as alphabet because numbers in this case treated as characters.
Integer datatype can be up to 2147483647 and to store the same in character datatype you have declare column at least 10 characters long.

Search on smaller columns is faster due to a number of data pages have to be read to get to a data. I can come up with more reasons, like generating unique ID with alphanumeric is much harder, on why numeric is better but I proved my point and it is good enough.
so you recommend numeric for faster searching. what about if there are alot of records which we cant delete. if i use alphanumeric it will increase the number of records that we can put right? will the difference in search time increase as we put records or will it be the same?



if i use alphanumeric will the difference in search time be big?
Mar 20 '07 #3
iburyak
1,017 Expert 512MB
As I said numeric is recommended practice.
Even thou with increased number of records search slow down but with proper indexes it is almost unnoticeable in some cases it is fraction of millisecond. You have to have several millions records to notice slowness.
Mar 20 '07 #4

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

Similar topics

4
by: Jan | last post by:
I am having problems trying to print a report based on a form. This is a search form only, no data input. There is a query that the form looks at, but then there are numerous comboxes that you...
5
by: Stefan Krah | last post by:
Hello, I am currently writing code where it is convenient to convert char to int . The conversion function relies on a character set with contiguous alphabets. int set_mesg(Key *key, char...
11
by: Ola K | last post by:
Hi, I am pretty new to Python and I want to make a script that will search for the following options: 1) words made of uppercase characters -only- (like "YES") 2) words made of lowercase...
0
by: rockdale | last post by:
Hi, all: I implemented an alphabet list so that when user click letter A then I will re-bind a gridview control using SQL stored procedure. It works fine. The problem is I populate my alphabet...
1
by: kannabiran | last post by:
Hi, Im using C# ASP.Net here in the textbox i need to get the input as like follows ,any alphabet or any alphabet,any alphabet for example ,C or C,E like this i want to get the input.The...
2
by: .Net Sports | last post by:
I posed this problem last month here, but need more of a clarification, as I still cannot correctly flag a bad password. I need users to submit a passowrd that has at least one numeric character,...
4
by: Dennieku | last post by:
Hi, I have to develop an on-screen keyboard and on-screen numeric keypad for a touchscreen UI. The hardest thing with this is that it has to be multi-lingual. Has anybody have ideas how to...
12
by: paitoon | last post by:
Hi, I got a little bit problem about search result in my site. When i put the keyword and click on search ....everything work fine i got the correct result but they not order by the keyword,but...
20
by: geebanga88 | last post by:
HI i have a method that is supose to store the alphabet in an array however dont think that it is being added to the array. public static void GetAlphabet (char alphabet) { int...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.