Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
ENABLE NOVALIDATE behaviour bug

ENABLE NOVALIDATE behaviour bug

2004-06-30       - By Looney, Jason

Reply:     <<     11     12     13     14  

The "quality " of the data could also be determined by the CBO by gathering
statistics with histograms to determine the amount of skew in the data,
right?

I 'm going to perform some tests to verify that, but this is a very
interesting and timely topic for me.

Thanks!
Jason.

-- --Original Message-- --
From: Richard Foote [mailto:richard.foote@(protected)]
Sent: Wednesday, June 30, 2004 7:11 AM
To: oracle-l@(protected)
Subject: Re: ENABLE NOVALIDATE behaviour bug

Hi Jason,

The story 's a little different between check constraints (including not
null) and FK constraints.

With a check constraint that 's been validated, Oracle can be *certain* of
the data boundaries. So for example a check constraint that limits the data
to be only be A,B or C provides the optimizer with useful information if you
happen to be searching for data that has a value of Z.

With FKs, the story 's somewhat different because effectively you 're telling
Oracle that a value of a column must be a value from a PK/Unique key
somewhere (or indeed a null). How can Oracle be *certain* that a specific FK
value can 't possibly exist ? Well it can 't really until it goes in and
actually has a look. And the best way for Oracle to determine how to have a
look is by looking at the statistics for the table/column as the CBO
ordinarily does.

I 've run tests on 8i and 9i and the CBO is not clever enough to determine
such "certainties " with FKs even if there 's a check constraint on the parent
column(s), such as a check range constraints so that logically a FK value
can 't exist (I can post some demos if anyone 's interested although it 's easy
enough to play with this oneself).

There are various oddities with all this that can sometimes change between
releases. With 9.2 for example, with a standard check constraint, Oracle can
determine the null data set without having to access any LIOs. With a not
null constraint, Oracle needs to use an associated index to "access " the
null data set.

Hope it makes some kinda sense :)

Cheers

Richard

-- -- Original Message -- --
From: "Looney, Jason " <Jason.Looney@(protected) >
To: <oracle-l@(protected) >
Sent: Wednesday, June 30, 2004 8:40 AM
Subject: RE: ENABLE NOVALIDATE behaviour bug


Richard,

Is this true for foreign key constraints as well, or does the optimizer
use them for plan generation?

Jason.

-- --Original Message-- --
From: Richard Foote [mailto:richard.foote@(protected)]
Sent: Tuesday, June 29, 2004 6:26 AM
To: oracle-l@(protected)
Subject: Re: ENABLE NOVALIDATE behaviour bug

Hi Mark,

Just to expand a little on a point made by Tanel. It can be a little
"dangerous " to enable a constraint with novalidate. By doing so, you 're
effectively telling Oracle the data is valid, honest, whist the optimizer
takes the attitude, "actually, I really don 't believe you ". This means that
possibly useful constraint data can 't be used by the optimizer when
determining the best plan.


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe send email to: oracle-l-request@(protected)
put 'unsubscribe ' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe send email to: oracle-l-request@(protected)
put 'unsubscribe ' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --