![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello Does oracle create automaticly indexes on not null columns ? Thanx Michal |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
vertigo (ax178 (AT) wp (DOT) pl) wrote: : Hello : Does oracle create automaticly indexes on not null columns ? No. But if you define constraints on a column then oracle may implement that constraint using an index on the column. Prime example being a primary key - it must be unique and a unique index is used to enforce that - so in that case those columns will be in an index. Also in that case, the columns involved will end up being not null columns. |
#5
| |||
| |||
|
|
"Malcolm Dew-Jones" <yf110 (AT) vtn1 (DOT) victoria.tc.ca> wrote in message news:420f964e (AT) news (DOT) victoria.tc.ca... vertigo (ax178 (AT) wp (DOT) pl) wrote: : Hello : Does oracle create automaticly indexes on not null columns ? No. But if you define constraints on a column then oracle may implement that constraint using an index on the column. Prime example being a primary key - it must be unique and a unique index is used to enforce that - so in that case those columns will be in an index. Also in that case, the columns involved will end up being not null columns. Isn't this the *only* such example. As such I'd view it as an exception. Incidentally if the column is already indexed (even with a non-unique key) then the index won't be created (and more to the point) dropped with the constraint. -- Niall Litchfield Oracle DBA http://www.niall.litchfield.dial.pipex.com |
#6
| |||
| |||
|
|
"Malcolm Dew-Jones" <yf110 (AT) vtn1 (DOT) victoria.tc.ca> wrote in message news:420f964e (AT) news (DOT) victoria.tc.ca... vertigo (ax178 (AT) wp (DOT) pl) wrote: : Hello : Does oracle create automaticly indexes on not null columns ? No. But if you define constraints on a column then oracle may implement that constraint using an index on the column. Prime example being a primary key - it must be unique and a unique index is used to enforce that - so in that case those columns will be in an index. Also in that case, the columns involved will end up being not null columns. Isn't this the *only* such example. As such I'd view it as an exception. Incidentally if the column is already indexed (even with a non-unique key) then the index won't be created (and more to the point) dropped with the constraint. |

#7
| |||
| |||
|
|
Hello Does oracle create automaticly indexes on not null columns ? Thanx Michal |
![]() |
| Thread Tools | |
| Display Modes | |
| |