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
function based indexes

function based indexes

2004-08-12       - By Tim Gorman

Reply:     1     2     3     4     5     6     7  

The setting of the parameter QUERY_REWRITE_INTEGRITY has no bearing on
anything but query rewrite in materialized views...

SQL > create index initcap_ename on emp(initcap(ename)) compute statistics;

Index created.

SQL > show parameter rewrite

NAME TYPE VALUE
-- ---- ---- ---- ---- ---- -- ---- --- -- ---- ---- --
query_rewrite_enabled string TRUE
query_rewrite_integrity string STALE_TOLERATED

SQL > set autotrace traceonly explain
SQL > select ename from emp where initcap(ename) = 'Smith ';

Execution Plan
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 TABLE ACCESS (BY INDEX ROWID) OF 'EMP '
2 1 INDEX (RANGE SCAN) OF 'INITCAP_ENAME ' (NON-UNIQUE)

The hoops to be jumped through to enable FBI are:

1. COMPATIBLE >= 8.1.0
2. OPTIMIZER_MODE < > rule
3. QUERY_REWRITE_ENABLED = true
4. QUERY REWRITE or GLOBAL QUERY REWRITE permission granted
5. CBO statistics gathered on the index

Hope this helps...

-Tim


on 8/11/04 8:20 PM, Mohammed Shakir at mshakir08816@(protected) wrote:

> I had to do the following to get function based indexes working.
> But I have Oracle 9i. You can check 10g documentation to confirm.
>
> You must have the following initialization parameters defined to create
> a function-based index:
>
> QUERY_REWRITE_INTEGRITY must be set to TRUSTED
>
> QUERY_REWRITE_ENABLED must be set to TRUE
>
> COMPATIBLE must set to 8.1.0.0.0 or a greater value
>
>
> Shakir
>
>
> --- Harvinder Singh <Harvinder.Singh@(protected) > wrote:
>
> > Hi,
> >
> > We are creating function based indexes and have question about parameter
> > query_rewrite_integrity. Docs says value for this parameter should be
> > trusted to be able to use FBT but even when I set this parameter setting
> > to ENFORCED, optimizer is able to use index. So what should be the value
> > of this parameter to be able to use function based indexes?
> > We are using 10g on red hat linux
> >
> > Thanks
> > --Harvinder
>
>
> =====
> Mohammed Shakir
> CompuSoft, Inc.
> 11 Heather Way
> East Brunswick, NJ 08816-2825
> (732) 672-0464 (Cell)
> (732) 257-6001 (Home)

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
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
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --