Domain Index Full Scan [message #450372] |
Tue, 06 April 2010 14:41 |
marcossantos
Messages: 123 Registered: June 2008
|
Senior Member |
|
|
Hi,
when execute a query on server of test the domain index is used. On production enviroment differently, the domain index not is used.
SELECT pacient.numpac ,
pacient.name ,
pacient.card
FROM pacient
LEFT JOIN cnaer
ON cnaer.group = pacient.cnaer
WHERE ((Contains(name,'"MICHAEL" AND "SCHMIT" AND "ENN" AND "NIEL"')>0))
AND stat = 'OKEY'
What I have to do? Can you help me?
Thanks,
Marcos Santos
|
|
|
Re: Domain Index Full Scan [message #450383 is a reply to message #450372] |
Tue, 06 April 2010 18:57 |
|
Barbara Boehmer
Messages: 9104 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
If your data is different or your indexes are different, then a full table scan might be a better execution plan in one environment. You should make sure you have complete current statistics on both tables using dbms_stats.gather_table_stats. You can also use an index hint to try to influence the optimizer. It also might help to try different syntax for the query, such as using the old (+) instead of the newer outer join and/or using a query with contains on just the pacient table as a sub-query in the from clause, then joining that to the other table. It might help to see an explain plan.
|
|
|