Unix Technical Forum

Re: Need suggestion on Foreign Keys

This is a discussion on Re: Need suggestion on Foreign Keys within the Informix forums, part of the Database Server Software category; --> When a FK is created an index is implicitly built on the child table. I don't suppose that either ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 11:41 AM
DL Redden
 
Posts: n/a
Default Re: Need suggestion on Foreign Keys

When a FK is created an index is implicitly built on the child table. I don't suppose that either of the two options that you've outlined will save you time over the other. Either way, there are indexes to be built and you could use PDQPRIORITY and PSORT_NPROCS to enable the builds to go as fast as possible.

As for a best approach some people, including myself, prefer to build the indexes that lie under primary and foreign keys manually so that you have more control over the name of the actual index. If you let Informix build the index implicitly you get funny looking names like 350_1121 or u350_1121, not very helpful when trying to quickly figure out the table this index belongs too.

DL Redden

Lisha Lynn Mineral Cosmetics


----- Original Message ----
From: Prashant Shirude <PShirude@manh.com>
To: informix-list@iiug.org
Sent: Friday, March 3, 2006 10:21:48 AM
Subject: Need suggestion on Foreign Keys

Hi All,

I have 2 tables which has 10 Million records and defined Primary Keys.

I need best approach and which will be the fastest process.

1) Create all required Indexes on both tables and then create Foreign
Keys.
OR
2) Create Foreign Keys and then create all required indexes on it.

Thanks,Prashant
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:41 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com