cancel
Showing results for 
Search instead for 
Did you mean: 

number of rows selected

Former Member
0 Kudos

Hi team,

I was asked a question, suppose you are trying to select some data from db6. Now i want to track the progress as to how many rows have been selected is there a way to see.

Since db2top is giving delta information and snapshot we would be running twice.

ConnTime..: 18:23:39.156UOW Start.: 18:23:39.171Appl name.:        db2bpDB2 user..:     DB2SID  OS user...:       db2SID
  Agent id..:        27696Coord DBP.:            0Coord id..:       199919Client pid:     15007928Hash joins:            0
  Hash loops:            0HJoin ovf.:            0SQL Stmts.:            1Sorts.....:            0Sort time.:        0.000
  Sorts ovf.:            0Rows Read.:  571,319,286Rows Sel..:            0Read/Sel..:            0Rows Wrtn.:            0
  Rows Ins..:            0Rows Upd..:            0Rows Del..:            0Locks held:            3Trans.....:            0
  Open Curs.:            1Rem Cursor:            0Memory....:       192.0KDyn. SQL..:            1Static SQL:            0
  Cpu Time..:   337.861791AvgCpuStmt:      337.861

-+----+----+----+----+----+----+----+----+----+----+----+----+----+-- Dynamic statement [Fetch] -+----+----+----+----+----+----+----+----+----+----+----+----+----+-

  Start.....: 18:23:39.180Stop......:          N/ACpu Time..:   337.857589Elapse....:     0.000107FetchCount:            0
  Cost Est..:  513,582,400Card Est..:      109,312AgentTop..:            1SortTime..:            0SortOvf...:            0
  Sorts.....:            0Degree....:            1Agents....:            1l_reads...:   24,712,153p_reads...:      194,996
  DataReads.:   24,712,153IndexReads:            0TempReads.:            0HitRatio..:       99.21%MaxDbpCpu.:  0.000000[0]
  IntRowsDel:            0IntRowsUpd:            0IntRowsIns:            0

db2 "select AGENT_ID,APPL_NAME ,PERCENT_ROWS_SELECTED from sysibmadm.APPL_PERFORMANCE where AGENT_ID=27696"

I am not getting percentage or the number of rows selected.

Whats the best approach to get the number of rows selected for a particular agent id.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Has anyone tracked the same way ?

Former Member
0 Kudos

Hi,

You can get this information by executing the below command for the questioned agent id.

$ get snapshot for application agentid <agentID>

you have entries in the output loke below...

Rows read                                   = 0

Rows written                                = 0

Rows deleted                                = 0

Rows updated                                = 0

Rows inserted                               = 0

Rows fetched                                = 0

hope this is what your looking for.

Regards,

Prithviraj

Former Member
0 Kudos

Hi,

snapshot is not the ideal way since everytime i have to check the progress i will have to see it from the time the job had begun.

I was thinking if there is anyway to check it online while it has been running. Rather than taking snapshot and then again taking a snapshot and calculating the delta.

Former Member
0 Kudos

Hi,

For real time

If you're running the process through SAP then..

You can check it by double clicking on the workprocess in SM50. You will find the details in there

else if running directly at DB level..

You need to run the command in a script with regular interval and forward the output to a file, everyime appending the output.

Regards,

Prithviraj.