Subject | Re: [IB-Architect] Working of indices |
---|---|
Author | Arno Brinkman |
Post date | 2002-09-05T22:06:56Z |
Hi,
But how does the engine know when i do
"... WHERE FirstName = 'a' " that he must convert
(using the collate from FirstName) the value 'a' to the
right representation for index-match ?
Just want to know for sure that i understand what's done in the engine.
I'll explain it my way to see if i understand it.
All indices (from a specific relation) are put as index-nodes
in an Index Root Page (=IRP further). The index-nodes
inside the IRP contains information such as page-pointer,
unique, descending, primary, foreign, etc...
The page-pointer points to a Index B-Tree node Page
(=IBP further) with Level-1 or Level-0. IBP Level-1
contains the key value (prefix, length and data) and
a pointer to the IBP Level-0 page. Level-0 is lowest
page in the index-tree which contains the key value
(prefix, length and data) and a pointer to the data-record in
a data-page. From an IBP you can walk up and down
in the same Level with the sibling information which
each IBP contains.
Can there be more levels as 0 or 1 ?
So yes, when are higher levels made ?
What information does the data-record pointer contain.
How does the engine know in what data-page/node to look ?
This was exactly the information where i'm looking for.
Thanks, very very much.
Kindly regards,
Arno Brinkman
ABVisie
> >Has every a collation (in same character-set) it's own index ?Okey, i understand.
>
> No, or not exactly.... <snip>
But how does the engine know when i do
"... WHERE FirstName = 'a' " that he must convert
(using the collate from FirstName) the value 'a' to the
right representation for index-match ?
> Key creation is one of the more interesting parts of the indexDo you understand "TimeStamp, Date and Time" under "Dates" ?
> code. The key that's stored in an index node has been rearranged
> so that the code that walks the index can just compare values
> byte by byte without considering the datatype. All numbers,
> except 8 byte integers are converted to double precision. The
> floating point number is taken apart and reconstructed so it
> compares byte wise. Dates are also stored as double precision
> numbers and manipulated the same way.
Just want to know for sure that i understand what's done in the engine.
> Trailing zeros and spaces are eliminated. For a compound key,Okey, very clear.
> each part is expanded to a multiple of 5 bytes, after the zeros
> are eliminated. A segment count is added every fifth byte -
> zero for the first segment, 1 for the second and so on. <snip>
I'll explain it my way to see if i understand it.
All indices (from a specific relation) are put as index-nodes
in an Index Root Page (=IRP further). The index-nodes
inside the IRP contains information such as page-pointer,
unique, descending, primary, foreign, etc...
The page-pointer points to a Index B-Tree node Page
(=IBP further) with Level-1 or Level-0. IBP Level-1
contains the key value (prefix, length and data) and
a pointer to the IBP Level-0 page. Level-0 is lowest
page in the index-tree which contains the key value
(prefix, length and data) and a pointer to the data-record in
a data-page. From an IBP you can walk up and down
in the same Level with the sibling information which
each IBP contains.
Can there be more levels as 0 or 1 ?
So yes, when are higher levels made ?
What information does the data-record pointer contain.
How does the engine know in what data-page/node to look ?
> This probably creates more confusion than it resolves, so pleaseNo, not more confusion for me.
> ask questions as they occur.
This was exactly the information where i'm looking for.
> Regards,Yes you have :-)
>
> Ann
> www.ibphoenix.com
> We have answers.
Thanks, very very much.
Kindly regards,
Arno Brinkman
ABVisie