Re: all foreign key should have index?

From: <lennart_at_kommunicera.umea.se>
Date: 31 Jan 2006 11:45:33 -0800
Message-ID: <1138736733.065152.321970_at_z14g2000cwz.googlegroups.com>


Tony Rogerson wrote:
> That would be a look up on the primary key though, rather, the key you've
> reference on the foreign key clause....
>
> So in this example...
>
> create table test2 (
> mycol_id int not null constraint pk_test2 primary key clustered
> )
>
> create table myothertable (
> blah int not null constraint pk_myothertable primary key clustered,
> mycol_id int not null references test2 ( mycol_id )
> )
>
> What is the point of indexing mycol_id?
>

delete from test2 where ...

/Lennart

[...] Received on Tue Jan 31 2006 - 20:45:33 CET

Original text of this message