SQLite Forum

How to read a .selecttrace
Login

How to read a .selecttrace

(1) By anonymous on 2020-06-24 19:36:46

Here is an example fragment:
1/0/564AFF349D68: WhereBegin
*** Optimizer Start *** (wctrlFlags: 0x0)
    add: * 0.01.00 DIR_SETTINGS                     f 00100 N 0 cost 0,216,200
0 0.01.00 DIR_SETTINGS                     f 00100 N 0 cost 0,216,200
---- begin solver.  (nRowEst=0)
New    0 cost=216,200,214 order=0
---- after round 0 ----
 0 cost=216 nrow=200 order=0
---- Solution nRow=200
0 0.01.00 DIR_SETTINGS                     f 00100 N 0 cost 0,216,200
*** Optimizer Finished ***
1/0/564AFF349D68: end processing
'-- SELECT (1/564AFF349D68) selFlags=0xc4 nSelectRow=200
    |-- result-set
    |   |-- AS DS_DTS_CREATED 
    |   |   '-- {0:0} pTab=564AFF3A8428 fg.af=800000.n
    |   |-- AS DS_PK_SERIAL_NUMBER 
    |   |   '-- {0:1} pTab=564AFF3A8428 fg.af=800000.n
    |   |-- AS DS_URI 
    |   |   '-- {0:2} pTab=564AFF3A8428 fg.af=800000.n
    |   |-- AS DS_DIR_STATUS 
    |   |   '-- {0:3} pTab=564AFF3A8428 fg.af=800000.n
    |   |-- AS DS_DIR_FIRMWARE_VERSION 
    |   |   '-- {0:4} pTab=564AFF3A8428 fg.af=800000.n
    |   |-- AS DS_SIGNON_ID 
    |   |   '-- {0:5} pTab=564AFF3A8428 fg.af=800000.n
    |   |-- AS DS_PASSWORD 
    |   |   '-- {0:6} pTab=564AFF3A8428 fg.af=800000.n
    |   |-- AS DS_CONNECTION_TYPE 
    |   |   '-- {0:7} pTab=564AFF3A8428 fg.af=800000.n
    |   |-- AS DS_MASTER_REF 
    |   |   '-- {0:8} pTab=564AFF3A8428 fg.af=800000.n
    |   |-- AS DS_MOBILE_PREFIX 
    |   |   '-- {0:9} pTab=564AFF3A8428 fg.af=800000.n
    |   |-- AS DS_MOBILE 
    |   |   '-- {0:10} pTab=564AFF3A8428 fg.af=800000.n
    |   '-- AS DS_DTS_UPDATED 
    |       '-- {0:11} pTab=564AFF3A8428 fg.af=800000.n
    '-- FROM
        '-- {0:*} dir_settings tab='DIR_SETTINGS' nCol=12 ptr=564AFF3A8428 used=fff

How can I interpret this info? ptr is point to the address of the variable nCol and so on.

(2) By Richard Hipp (drh) on 2020-06-24 21:02:35 in reply to 1 [link]

The graph is drawn by code in the treeview.c source file.  (NB:  the treeview.c
source file is included in debugging builds only.  It is #ifdef-ed out of
release builds.)  If you want to understand what is being printed, you
need to find the place where it is being printed in treeview.c and see.
The details of the treeview output change.  Often.