Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to optimize query's execution?
> Based on the plan above the tables are not analyzed and the "rule"
> optimizer is being used, not the "cost" one. Analyze the tables and try
> again.
>
> execute dbms_stats.gather_table_stats(user,'MY_KEYS')
> execute dbms_stats.gather_table_stats(user,'MY_JSTATE')
OK, I will try that. How about ANALYZE TABLE <table> ESTIMATE STATISTICS SAMPLE 100 PERCENT; ? This should create some statistics, otherwise cost-based approach to optimization will not work, I believe. Received on Thu Sep 01 2005 - 08:16:07 CDT