Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: can't get the Query Cost!
Referring back to the original problem where the cost column has a
value when the explain is ran by one user and no value when the same
sql is ran by a second user.
Questions:
Does either of the users have their own version of any of the tables referenced in the sql? If so you have your answer.
Are you reading the plan table cost column added with 7.3 (or was it 7.2) or getting the cost as it was done in 7.1?
Do the users have their own version of the plan_table? Perhaps one of them was created under a prior version and needs to be re-created with the current script.
That is all I can think of to check.
In article <83tliu$8muh$1_at_fu-berlin.de>,
"Ulrik Hoffmann" <ulrik_at_hoffmann-kiel.de> wrote:
> Hi,
>
> Use the command
>
> analyze table <TABLENAME> compute statistics
>
> or for the full schema:
>
> EXEC dbms_utility.analyze_schema('PMIS','COMPUTE');
>
> Bye
> Uli
> > I use 'Explain plan set statement_id ='aa' for &sql'
> > to get the query execute path!
> > but the results in different user are different!
> > in user 'pmis'
> > I can get the cost values in plan_table
> > but in user 'pmis1'
> > I can not get the cost values in plan_table,
> > they are all null!
> > why?
>
>
--
Mark D. Powell -- The only advice that counts is the advice that
you follow so follow your own advice --
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Dec 23 1999 - 17:01:32 CST
![]() |
![]() |