RE: Optimizer uses either index or full scan in a partitioned table

RE: Optimizer uses either index or full scan in a partitioned table

 

  


One way to allow the optimizer to choose the right option is to
regularly run statistics on your tables. That way the optimizer knows
the best strategy based on the size of the tables and whether it makes
sense to use indexes or not. Compound keys and indexes are not straight
forward. The choice of full scan and index scan may also depend upon the
type of query. If you use a lot of "like" queries then the optimizer
might end up doing a full scan.

Hope this helps

Reddy Kadasani

-----Original Message-----
From: Tavousi Mahnaz
[mailto:oracledba-ezmlmshield-x45528690.[Email address protected]
Sent: Wednesday, May 31, 2006 7:48 AM
To: LazyDBA Discussion
Subject: Optimizer uses either index or full scan in a partitioned table


Hello,

I have a table which is partitioned.
When I run a query with different scenario and take a look at the
execution plan , oracle either uses index or full scan.
When it uses index the response time is 1 sec but when it uses table
scan the response time is 3 sec.
I have to mention that all the column I am using in my select are part
of index. I am wondering if there is any way to force the optimizer to
apply index only.

Thanks

Mahnaz Tavousi
> ACNielsen Company of Canada
> Tel: 905-475-3344 ext 2615
> e-mail: Mahnaz.[Email address protected]
>
>


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html


Oracle LazyDBA home page