Home > Archive > SQL Anywhere Mobile > April 2006 > How use index on consolidate database ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How use index on consolidate database ?
Fantom

2006-04-06, 7:38 am

Hi
On consolidate database cretae any index (for example on columns in foreig
key )? Or only primary key ?

Fantom

Breck Carter [Team iAnywhere]

2006-04-06, 7:38 am

What version are you using?

Here is an excerpt from the Foxhound Help that is displayed when you
get a warning about a redundant index:

=====
Note: Versions 7 and later of SQL Anywhere automatically create a
separate unique index for every PRIMARY KEY and UNIQUE column or table
constraint that you define, as well as a separate non-unique index for
every FOREIGN KEY constraint. There is no reason to explicitly create
indexes on the same columns, and such indexes are redundant.

However, versions 5 and 6 of SQL Anywhere create a combined index for
each PRIMARY KEY or UNIQUE constraint; this index "also contains the
entries for all foreign keys that reference this table, whether those
foreign keys appear in the same table or in a different one" (from the
ASA 6 User's Guide, Chapter 25, The effect of column order in a
composite index). These combined indexes can be much larger than an
ordinary index on the primary key or unique constraint columns, and in
those cases an explicitly created unique index on the same columns may
improve performance. Such indexes are no longer needed in versions 7
and later.
=====

http://www.risingroad.com/foxhound_beta_3.html

Breck


On 6 Apr 2006 02:58:20 -0800, "Fantom"
<szczukot@skasujto.poczta.onet.pl> wrote:

>Hi
>On consolidate database cretae any index (for example on columns in foreig
>key )? Or only primary key ?
>
>Fantom


--
Breck Carter [Team iAnywhere]
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
The book: http://www.risingroad.com/ SQL_Anyw...pers_Guide.html
breck.carter@risingroad.com
Fantom

2006-04-06, 9:35 am

> What version are you using?
>
> Here is an excerpt from the Foxhound Help that is displayed when you
> get a warning about a redundant index:
>
> =====
> Note: Versions 7 and later of SQL Anywhere automatically create a
> separate unique index for every PRIMARY KEY and UNIQUE column or table
> constraint that you define, as well as a separate non-unique index for
> every FOREIGN KEY constraint. There is no reason to explicitly create
> indexes on the same columns, and such indexes are redundant.
>
> However, versions 5 and 6 of SQL Anywhere create a combined index for
> each PRIMARY KEY or UNIQUE constraint; this index "also contains the
> entries for all foreign keys that reference this table, whether those
> foreign keys appear in the same table or in a different one" (from the
> ASA 6 User's Guide, Chapter 25, The effect of column order in a
> composite index). These combined indexes can be much larger than an
> ordinary index on the primary key or unique constraint columns, and in
> those cases an explicitly created unique index on the same columns may
> improve performance. Such indexes are no longer needed in versions 7
> and later.
> =====
>
> http://www.risingroad.com/foxhound_beta_3.html


I understand. No add any index. Only primary keys and foreign keys

Fantom

> Breck
>
>
> On 6 Apr 2006 02:58:20 -0800, "Fantom"
> <szczukot@skasujto.poczta.onet.pl> wrote:
>
foreig[color=darkred
]
>
> --
> Breck Carter [Team iAnywhere]
> RisingRoad SQL Anywhere and MobiLink Professional Services
> www.risingroad.com
> The book:

http://www.risingroad.com/ SQL_Anyw...pers_Guide.html
> breck.carter@risingroad.com


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com