dbTalk Databases Forums  

Narrow and Fixed Indexes

comp.databases.sybase comp.databases.sybase


Discuss Narrow and Fixed Indexes in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
1dg618
 
Posts: n/a

Default Narrow and Fixed Indexes - 10-18-2011 , 07:16 PM






What is an index that is narrow and fixed?

int
int
int
datetime

be narrow and fixed?

Would

int
int
char(4)
datetime

be narrow and fixed?

And

int
int
varchar(25)
datetime

would be narrow but not fixed?

Reply With Quote
  #2  
Old   
bret_halford@msn.com
 
Posts: n/a

Default Re: Narrow and Fixed Indexes - 10-19-2011 , 10:47 AM






On Oct 18, 6:16*pm, 1dg618 <1dg... (AT) gmail (DOT) com> wrote:
Quote:
What is an index that is narrow and fixed?

int
int
int
datetime

be narrow and fixed?

Would

int
int
char(4)
datetime

be narrow and fixed?

And

int
int
varchar(25)
datetime

would be narrow but not fixed?

Depends on your definition of narrow, I suppose, and that could be
relative to
the total row width. An index that is 100 bytes wide might be
considered narrow
for a table with rows that are 4500 bytes wide, but not for a table
that is 200 bytes
wide. Are you referencing these terms from some particular source?


I would expect that the difference between fixed and not fixed would
be whether any
of the keys were variable length or nullable. datetime would be
fixed, datetime null
would be not fixed.

Reply With Quote
  #3  
Old   
Derek Asirvadem
 
Posts: n/a

Default Re: Narrow and Fixed Indexes - 10-19-2011 , 01:48 PM



On Oct 19, 11:16*am, 1dg618 <1dg... (AT) gmail (DOT) com> wrote:

Yes.

By "narrow" I meant any number of narrow columns: 1 & 2

By "fixed" I meant all the columns are fixed length *and* not null.
Nullable is implemented as variable length.

In the context of making general statements about how slow/fast an
index is, without observing other aspects such as no of rows; APL vs
DPL/DRL; row size; fragmentation; etc, a "fast" index is one that has
narrow, fixed columns. The number of columns does not make much
difference, the width of the columns, and the fixed/var does make a
difference.

Reply With Quote
  #4  
Old   
1dg618
 
Posts: n/a

Default Re: Narrow and Fixed Indexes - 10-19-2011 , 03:34 PM



On Oct 19, 1:48*pm, Derek Asirvadem <derek.asirva... (AT) gmail (DOT) com> wrote:
Quote:
On Oct 19, 11:16*am, 1dg618 <1dg... (AT) gmail (DOT) com> wrote:

Yes.

By "narrow" I meant any number of narrow columns: 1 & 2

By "fixed" I meant all the columns are fixed length *and* not null.
Nullable is implemented as variable length.
I didn't know it. Good info.

Quote:
In the context of making general statements about how slow/fast an
index is, without observing other aspects such as no of rows; APL vs
DPL/DRL; row size; fragmentation; etc, a "fast" index is one that has
narrow, fixed columns. *The number of columns does not make much
difference, the width of the columns, and the fixed/var does make a
difference.
Thank you. That's really good information.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.