Unix Technical Forum

Re: Add Constraint

This is a discussion on Re: Add Constraint within the Informix forums, part of the Database Server Software category; --> Sorry..... It's a Foreign Key constraint Regards Colin There are 10 types of people in the world, those that ...


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, 10:06 AM
Colin Dawson
 
Posts: n/a
Default Re: Add Constraint


Sorry.....

It's a Foreign Key constraint




Regards

Colin

There are 10 types of people in the world, those that understand binary and
those that don't





>From: "Obnoxio The Clown" <obnoxio@serendipita.com>
>To: "Colin Dawson" <cjd_1955@hotmail.com>
>CC: informix-list@iiug.org
>Subject: Re: Add Constraint
>Date: Wed, 31 Aug 2005 11:03:08 +0100 (BST)
>
>
>Colin Dawson said:
> >
> > I've just added a constraint on a table both the master and detail

>tables
> > have over 100M rows, and it took almost 2 hours, does anyone know what
> > exactly happens during an ADD CONSTRAINT.

>
>What kind of constraint?
>
>--
>
>Bye now,
>Obnoxio
>
>"C'est pas parce qu'on n'a rien ` dire qu'il faut fermer sa gueule"
> - Coluche
>
>A smile is a gift that is free to the giver and precious to the recipient.
>But giving someone the finger is free too, and I find it more personal and
>sincere.

sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 10:06 AM
rkusenet
 
Posts: n/a
Default Re: Add Constraint

Then it is checking for every detail table whether the key exists in the master table.

Just a discussion out of curiosity: Only informix chose to implement PKY->FKY relationship
via an index. In Oracle, Db2, and SQL Server, FKY does not need an index.

There are both plus and minus of Informix approach. The plus is that the join of master
and child will always use index. In other dbs, if the DBA forgets to create it, it will
suffer in performance.

The minus is that, sometimes for small code tables, where there is no need of index,
Informix will still create an index. On a large table, this is a waste of space.


"Colin Dawson" <cjd_1955@hotmail.com> wrote in message
news:1125493955.f768b65ae648bec8f0ae7f0d8366cf63@t eranews...
>
> Sorry.....
>
> It's a Foreign Key constraint
>
>
>
>
> Regards
>
> Colin
>
> There are 10 types of people in the world, those that understand binary and
> those that don't
>
>
>
>
>
>>From: "Obnoxio The Clown" <obnoxio@serendipita.com>
>>To: "Colin Dawson" <cjd_1955@hotmail.com>
>>CC: informix-list@iiug.org
>>Subject: Re: Add Constraint
>>Date: Wed, 31 Aug 2005 11:03:08 +0100 (BST)
>>
>>
>>Colin Dawson said:
>> >
>> > I've just added a constraint on a table both the master and detail

>>tables
>> > have over 100M rows, and it took almost 2 hours, does anyone know what
>> > exactly happens during an ADD CONSTRAINT.

>>
>>What kind of constraint?
>>
>>--
>>
>>Bye now,
>>Obnoxio
>>
>>"C'est pas parce qu'on n'a rien ` dire qu'il faut fermer sa gueule"
>> - Coluche
>>
>>A smile is a gift that is free to the giver and precious to the recipient.
>>But giving someone the finger is free too, and I find it more personal and
>>sincere.

> sending to 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 09:52 AM.


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