Author |
Message |
Dirk Moolma #1 / 4
|
 Index length
I was just wondering about something. If I have a character field, let's say char(50). Normally you don't create indexes on big columns, but if the column only contains values of 1 or 2 characters, is it ok then to create the index ? Or is it still bad ? Dirk Moolman Database Administrator Reach Technologies South Africa www.thefuelgroup.co.za "No pessimist ever discovered the secret of the stars, or sailed to an uncharted land, or opened a new doorway for the human spirit." -Helen Keller ========================================================== This message contains information intended for the perusal, and/or use (if so stated), by the stated addressee(s) only. The information is confidential and privileged. If you are not an intended recipient, do not peruse, use, disseminate, distribute, copy or in any manner rely upon the information contained in this message (directly or indirectly). The sender and/or the entity represented by the sender shall not be held accountable in the event that this prohibition is disregarded. If you receive this message in error, notify the sender immediately by e-mail, fax or telephone representations contained in this message, whether express or implied, are those of the sender only, unless that sender expressly states them to be the views or representations of an entity or person, who shall be named by the sender and who the sender shall state to represent. No liability shall otherwise attach to any other entity or person. ==========================================================
|
Tue, 16 Mar 2004 23:35:09 GMT |
|
 |
Jack Parke #2 / 4
|
 Index length
Would still use the full 50 chars. Varchar is what you (don't) want. That won't use the full size, but if you change the value of the field - the re-write implications make for some work for the engine. Those of us from the 5.0 days will also shudder at the thought. cheers j. Quote: ----- Original Message -----
Sent: Friday, September 28, 2001 11:35 AM Subject: Index length > I was just wondering about something. If I have a character field, let's > say > char(50). Normally you don't create indexes on big columns, but if the > column only contains values of 1 or 2 characters, is it ok then to create > the index ? > Or is it still bad ? > Dirk Moolman > Database Administrator > Reach Technologies > South Africa > www.thefuelgroup.co.za > "No pessimist ever discovered the secret of the stars, or sailed to an > uncharted land, or opened a new doorway for the human spirit." > -Helen Keller > ========================================================== > This message contains information intended for the perusal, and/or use (if > so stated), by the stated addressee(s) only. The information is > confidential and privileged. If you are not an intended recipient, do not > peruse, use, disseminate, distribute, copy or in any manner rely upon the > information contained in this message (directly or indirectly). The sender > and/or the entity represented by the sender shall not be held accountable > in the event that this prohibition is disregarded. If you receive this > message in error, notify the sender immediately by e-mail, fax or telephone > representations contained in this message, whether express or implied, are > those of the sender only, unless that sender expressly states them to be > the views or representations of an entity or person, who shall be named by > the sender and who the sender shall state to represent. No liability shall > otherwise attach to any other entity or person. > ==========================================================
|
Wed, 17 Mar 2004 10:47:10 GMT |
|
 |
DJW #3 / 4
|
 Index length
Char (50)?? Depends if the index speeds up a search or not! Also look at varchar instead!
Quote: > I was just wondering about something. If I have a character field, let's > say > char(50). Normally you don't create indexes on big columns, but if the > column only contains values of 1 or 2 characters, is it ok then to create > the index ? > Or is it still bad ? > Dirk Moolman > Database Administrator > Reach Technologies > South Africa > www.thefuelgroup.co.za > "No pessimist ever discovered the secret of the stars, or sailed to an > uncharted land, or opened a new doorway for the human spirit." > -Helen Keller > ========================================================== > This message contains information intended for the perusal, and/or use (if > so stated), by the stated addressee(s) only. The information is > confidential and privileged. If you are not an intended recipient, do not > peruse, use, disseminate, distribute, copy or in any manner rely upon the > information contained in this message (directly or indirectly). The sender > and/or the entity represented by the sender shall not be held accountable > in the event that this prohibition is disregarded. If you receive this > message in error, notify the sender immediately by e-mail, fax or telephone > representations contained in this message, whether express or implied, are > those of the sender only, unless that sender expressly states them to be > the views or representations of an entity or person, who shall be named by > the sender and who the sender shall state to represent. No liability shall > otherwise attach to any other entity or person. > ==========================================================
|
Thu, 18 Mar 2004 03:58:00 GMT |
|
 |
Peter Weiger #4 / 4
|
 Index length
won't help to use varchar as suggested, because a index will never be created as varchar... but: why don't you create a new column char(1) or int or ...? if you have no resource-problem you may create and use your index without mayor problems.
Quote: > I was just wondering about something. If I have a character field, let's > say > char(50). Normally you don't create indexes on big columns, but if the > column only contains values of 1 or 2 characters, is it ok then to create > the index ? > Or is it still bad ? > Dirk Moolman > Database Administrator > Reach Technologies > South Africa > www.thefuelgroup.co.za > "No pessimist ever discovered the secret of the stars, or sailed to an > uncharted land, or opened a new doorway for the human spirit." > -Helen Keller > ========================================================== > This message contains information intended for the perusal, and/or use (if > so stated), by the stated addressee(s) only. The information is > confidential and privileged. If you are not an intended recipient, do not > peruse, use, disseminate, distribute, copy or in any manner rely upon the > information contained in this message (directly or indirectly). The sender > and/or the entity represented by the sender shall not be held accountable > in the event that this prohibition is disregarded. If you receive this > message in error, notify the sender immediately by e-mail, fax or telephone > representations contained in this message, whether express or implied, are > those of the sender only, unless that sender expressly states them to be > the views or representations of an entity or person, who shall be named by > the sender and who the sender shall state to represent. No liability shall > otherwise attach to any other entity or person. > ==========================================================
|
Fri, 19 Mar 2004 19:46:38 GMT |
|
|
|