Skip to Content

Performace tuning

Hello,

i need to estimate Cpu cost of query.

i have found this equation:

Cost = PIO X estimated_pio + LIO X estimated_lio + 100 X CPU/estimated_cpu

From show plan i can get the PIO,LIO, but no CPU.

Please advice.

Thank you.

Jakub. K.

Quest Software.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 24 at 04:11 PM

    Hi Jakub,

    If you turn statistics io on, it should display the cpu cost. See :

    https://help.sap.com/viewer/0fd37d130ef34da3974751332d4a11e7/16.0.1.0/en-US/a8ceaf21bc2b1014857eebe9c6627a94.html

    In 16.0, it's reported as "CPU cost", Im earlier releases, it's "apf IOs used".

    Hope this helps

    Mehrab

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 08 at 12:45 PM

    Hi Mehrab,

    thanks for help, but i have still few questions...

    1) So "CPU cost" == "apf IOs used"? Its only table related, isn't maybe better way for me, how to express the 'DB use' for statement:

    "Total estimated I/O cost for statement 1 (at line 5): xxxxx ." ?

    - Why the apf IOs used is all the time = 0?

    2) Why the "select showplan_in_xml(-1) " result is NULL, when "set statistics IO ON" .. i would prefer to have showplan as a result.

    3) Why some selects into tables with statistic on doesn't returns <AbstractPlan>,<Costs>? It seems to be useful information for performance debugging...(you can see on attached image.)

    4) Why is there no ShowPlan, when i do select into empty table using ADO.Net Client (sampleApp), in iSQL there is.
    (you can see on attached image.)

    Thank you.

    J.

    Add comment
    10|10000 characters needed characters exceeded