Re: V$SGA_TARGET_ADVICE in Oracle RDBMS 10.2



On Mon, 15 Aug 2005 06:45:40 +0000, Jonathan Lewis wrote:

> Look in v$fixed_view_definition for the
> SQL that defines gv$sga_target_advice.
> As a short term measure on a test db,
> you can always create your own gv$
> and v$ views to overwrite the proper
> ones.

Yup, I did that:
1* select base_estd_dbtime,base_sgasz,base_estd_phy_reads from x$kmgsbsadv
SQL> /

BASE_ESTD_DBTIME BASE_SGASZ BASE_ESTD_PHY_READS
---------------- ---------- -------------------
35 352 0
35 352 0
35 352 0
35 352 0
35 352 0
35 352 0
35 352 0
35 352 0

As you can see, estimated physical reads are 0. The view definition is:

select A.inst_id, A.sgasz, round((A.sgasz / A.base_sgasz), 4),
round(A.base_dbtime * round((A.dbtime / A.base_estd_dbtime), 4), 0),
round((A.dbtime / A.base_estd_dbtime), 4), round(A.base_phy_reads *
round((A.estd_physical_reads / A.base_estd_phy_reads), 4), 0) from x$kmgsbsadv A
order by A.inst_id

The last column causes division by zero.
--
http://www.mgogala.com

.



Relevant Pages

  • Re: Problem using linked tables instead of ADP
    ... >I have also seen this problem occur when I have "bit" type fields in the ... >SQL ... and don't have a default value (say zero) and allow nulls checked. ... Prev by Date: ...
    (microsoft.public.sqlserver.msde)
  • Re: Examples of SQL anomalies?
    ... If you have a bag that can contain peaches, but doesn't, then the answer to ... then the answer is clearly zero. ... ie. SQL can count zero rows with count but not with sum. ...
    (comp.databases.theory)
  • Re: help with asp/sql convert data to date for comparison
    ... It must be MS SQL Server ... columns and store proper datetime values in a single column. ... Adjust that until you are creating proper datetimes. ... You should see data in the proper format. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Examples of SQL anomalies?
    ... then the answer is clearly zero. ... ie. SQL can count zero rows with count but not with sum. ... Fabian Pascal would say that he is doing a Celko. ... bringing up intricate arbitrary logics like Johnston's is phony in this ...
    (comp.databases.theory)
  • RE: I am receiving an #Error in my query even after using Nz funct
    ... Looks like a Whoops while posting the SQL. ... "Jerry Whittle" wrote: ... have to make sure any possibility of dividing by zero never happens. ... I have used an IIf statement, the Nz function, and even ran another query ...
    (microsoft.public.access.queries)

Loading