Must I create an index for child table if master table have one?

Started by Edmundo Roblesover 9 years ago4 messagesgeneral
Jump to latest
#1Edmundo Robles
edmundo@sw-argos.com

Hi!

i have a simple question, if the master table have an index, must i
have create the same index in a child table?
what is the best practice for indexes in table partition ?

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Edmundo Robles (#1)
Re: Must I create an index for child table if master table have one?

On Tue, Nov 8, 2016 at 11:08 AM, Edmundo Robles <edmundo@sw-argos.com>
wrote:

Hi!

i have a simple question, if the master table have an index, must i
have create the same index in a child table?
what is the best practice for indexes in table partition ?

Indexes are self-contained within the physical table on which they are
defined. The index on the master contains no rows that are present in the
child table.

David J.​

#3Melvin Davidson
melvin6925@gmail.com
In reply to: David G. Johnston (#2)
Re: Must I create an index for child table if master table have one?

On Tue, Nov 8, 2016 at 1:33 PM, David G. Johnston <
david.g.johnston@gmail.com> wrote:

On Tue, Nov 8, 2016 at 11:08 AM, Edmundo Robles <edmundo@sw-argos.com>
wrote:

Hi!

i have a simple question, if the master table have an index, must i
have create the same index in a child table?
what is the best practice for indexes in table partition ?

Indexes are self-contained within the physical table on which they are
defined. The index on the master contains no rows that are present in the
child table.

David J.​

Indexes are self-contained within the physical table on which they are

defined
*IOW, yes. *

--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

#4Melvin Davidson
melvin6925@gmail.com
In reply to: Melvin Davidson (#3)
Re: Must I create an index for child table if master table have one?

*To clarify, if you are talking about partitioning, then you almost
certainly want to create a similar index on the child table.*
*If you are referring to a Foreign Key Constraint, then it is also good
idea to make that index, but not necessary.*

On Tue, Nov 8, 2016 at 1:46 PM, Melvin Davidson <melvin6925@gmail.com>
wrote:

On Tue, Nov 8, 2016 at 1:33 PM, David G. Johnston <
david.g.johnston@gmail.com> wrote:

On Tue, Nov 8, 2016 at 11:08 AM, Edmundo Robles <edmundo@sw-argos.com>
wrote:

Hi!

i have a simple question, if the master table have an index, must i
have create the same index in a child table?
what is the best practice for indexes in table partition ?

Indexes are self-contained within the physical table on which they are
defined. The index on the master contains no rows that are present in the
child table.

David J.​

Indexes are self-contained within the physical table on which they are

defined
*IOW, yes. *

--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.