usage of calculated index with a synonym for the function

From: Norbert Winkler <norbert.winkler1_at_gmx.de>
Date: Mon, 14 Dec 2009 16:33:40 +0100
Message-ID: <1rw7skpuzon9s.1e3g1d9ubwgh9$.dlg_at_40tude.net>



Hi,

in a large table OUR_TABLE we have a calculated index for a persons-name with a simple soundex function OUR_SOUNDEX in the same schema (OUR_SCHEMA) like the table, thats different to my "select"-schema (WORK_SCHEMA): ...
from OUR_SCHEMA.OUR_TABLE d
where OUR_SCHEMA.OUR_SOUNDEX(d.PERSON_NAME) =

      OUR_SCHEMA.OUR_SOUNDEX('Meier, Hans');

But for building a testing environment schema-names are different (OUR_SCHEMA --> TEST_SCHEMA, WORK_SCHEMA --> WORK_TEST) Now I'm trying to create universal scripts with synonyms:

in WORK_SCHEMA
CREATE OR REPLACE SYNONYM OUR_SCHEMA_OUR_SOUNDEX   FOR OUR_SCHEMA.OUR_SOUNDEX; in WORK_TEST
CREATE OR REPLACE SYNONYM OUR_SCHEMA_OUR_SOUNDEX   FOR TEST_SCHEMA.OUR_SOUNDEX; But
..
from OUR_SCHEMA_OUR_TABLE d
where OUR_SCHEMA_OUR_SOUNDEX(d.PERSON_NAME) =

      OUR_SCHEMA_OUR_SOUNDEX('Meier, Hans');

uses a full table scan in WORK_SCHEMA and TEST_SCHEMA.

Is there another way to create universal scripts.

-- 
Norbert
Oracle9i Enterprise Edition Release 11.2 64Bit
Received on Mon Dec 14 2009 - 09:33:40 CST

Original text of this message