Subject | Re: [firebird-support] INDEX directionality, why and how? What about KEYs? |
---|---|
Author | Michael Ludwig |
Post date | 2010-05-11T16:10:42Z |
Ann W. Harrison schrieb am 10.05.2010 um 20:38:10 (-0400):
Thanks for this answer! Understanding the reasons helps a lot
when learning.
queries looking for high values apply here? Might it be worth
while creating an additional DESCENDING INDEX in any of these
three cases? Maybe if you want to do range queries for high
values?
--
Michael Ludwig
> Firebird does not use an external log for clean-up after aAnd that can't happen in the careful-write way of doing things.
> crash. Instead, it uses a technique called "careful write"
> to keep the database consistent on disk at all times.
> "Careful write" means that before you write a pointer to a
> thing, you write the thing. Before you delete a thing, you
> delete all pointers to it.
> Indexes are trees linked down and across...
>
> top
> / \
> nextLevel <-> nextLevel
>
> Each level is linked both left to right and right to left.
> That's not compatible with careful write - if two things
> point at each other, both must be written first.
Thanks for this answer! Understanding the reasons helps a lot
when learning.
> > Second point of interest, what kind of indexes and with whatSo does the general advice of creating a DESCENDING INDEX for
> > directionality are used to back up the following CONSTRAINTs:
> >
> > * PRIMARY KEY
> > * FOREIGN KEY
> > * UNIQUE
>
> Ascending
queries looking for high values apply here? Might it be worth
while creating an additional DESCENDING INDEX in any of these
three cases? Maybe if you want to do range queries for high
values?
--
Michael Ludwig