Index length 
Author Message
 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
 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
 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
 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
 
 [ 4 post ] 

 Relevant Pages 

1. Maximum index length????

2. Index length

3. Limited Text field index length??

4. DDF Index length

5. row length and index limitations for sql 7

6. columns names,datatypes,length and indexes !

7. index and sequence name length limit?

8. Problem: database table/index sizing for Sum Length Columns greater than Available Data Space

9. Primary Keys/Index Keys Length

10. Weblogics/DB2/length index names

11. Length of index key

12. BCP OUT Fixed-Length Record: Truncated Length


 
Powered by phpBB® Forum Software