Oninit Logo
The Down System Specialists
+1-913-674-0360
+44-2081-337529
Partnerships Contact
Onstat -a -b/-B -C -c -d/-D -F -f -G -h -i -j -k/-K -L -l -m -o -P -p -R -r -s -t/-T -u -X -x -z

onstat -g scn Scan Information

The onstat -g scn command displays the status and detail of a current scan. This information can be used to determine how long a long-running scan will take to complete. For tables, the onstat -g scn command output identifies whether a scan is a light or bufferpool scan.

[Table Information]

Light Scan Info
descriptor  address           next_lpage  next_ppage        ppage_left  bufcnt  look_aside

RSAM batch sequential scan info

SesID    Thread   Partnum  Rowid    Rows Scan'd Scan Type Lock Mode  Notes
2370448  2890168  200145   452909   87235       Light     Table      Look aside, 
2370440  2890147  20013d   101      0           Buffpool  +Test      Must copy 

[Index Information]

RSAM batch index scan info

SesID    Thread     Partnum  Scan Type Lock Mode  Notes
2370436  2890156    20019a             SLock+Test
       Start Key   GT   :-2147483648:
       Stop Key    EQ   :1500:
       Current key      :170:
       Current position: buffp 0x10a4bc0c8 pagenum 4 slot 11 rowoff 4 flags 0
Option Description
descriptor (decimal) Light scan ID
address (hex) Memory address of the light scan descriptor
next_lpage (hex) Next logical page address to scan
next_ppage (hex) Next physical page address to scan
ppage_left (decimal) Number of physical pages left to scan in the current extent
bufcnt Number of light scan buffers used for this light scan
look_aside Whether look aside is needed for this light scan (Y = yes, N = no). Look asides occur when a thread needs to examine the buffer pool for existing pages to obtain the latest image of a page being light scanned.
SesID Session ID
Thread Thread ID
Partnum Partition number
Rowid Current row ID
Rows Scan'd Number of rows that have been scanned
Scan Type For tables, either:
  • Bufferpool
  • Light (light scan)
For indexes, either:
  • key only
  • No value if the scan is not a key-only scan
Lock Mode The type of acquired lock or no lock:
  • Table (table-level lock acquired)
  • Slock (share locks acquired)
  • Ulock (update locks acquired)
  • blank (no locks acquired)
This column can also show one of the following values:
  • +Test (The scan tested for a conflict with the specified lock type; the lock was not acquired.)
  • +Keep (The acquired locks will be held until end of session instead of the end of the transaction.)
Start key Start key of the scan
Stop key End key of the scan
Current key The current key in the scan
Current position The current location of the scan in the index, for example, the page, slot, and offset

Notes

    Look aside : The light scan is performing look aside.

    The light scan reads blocks of pages directly from disk into large buffers, rather than getting each page from the buffer manager. In some cases, this process requires the light scan to check the buffer pool for the presence of each data page that it processes from one of its large buffers; this process is called look aside. If the page is currently in the buffer pool, the light scan will use that copy instead of the one in the light scan large buffer. If the page is not in the buffer pool, the light scan will use the copy that the light scan read from disk into its large buffer. If the light scan is performing look aside, the performance of the scan is slightly reduced.

    In many cases, the light scan can detect that it is impossible for the buffer pool to have a newer version of the page. In these situations, the light scan will not check the buffer pool, and the look aside note will be absent.

    Forward row lookup : The server is performing a light scan on a table that has rows that span pages. The light scan must access and use the buffer pool to get the remainder pieces of any rows that are not completely on the home page.

To discuss how Oninit ® can assist please call on +1-913-674-0360 or alternatively just send an email specifying your requirements.