Solved

Character column Index

Posted on 2002-06-14
2
485 Views
Last Modified: 2013-12-03
Hello experts!!!!

Can anyone tell me if an index applied to a character column is slower than other applied to a numeric column?

Thanks.
0
Comment
Question by:dbroosv
2 Comments
 
LVL 7

Expert Comment

by:yoren
ID: 7079756
For most applications, no. Yes, character comparisons are generally slower than integer comparisons, but other factors such as how your tables are designed and the options you use to create the index will affect performance far more.

Basically, if you have numeric data, put it into a number column. If you have character data, put it into a character column.
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 100 total points
ID: 7080288
character column -> index performance

The index performance depends on the size of the column, not on the datatype as such. Of course, a column with 1 caracter will be as performant as a numerical column on 1 byte, because they will have as many index entries in one data page. If you have a column on 2 caracters, only half of the index entries will be on 1 page, thus the index will need 2x the index pages. For the index search this can mean max 1 index page more to read, depending on the implementation, and this index page read can be the performance loss.

CHeers
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some very basic things about SQL Server filegroups.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now