Hello World,
Context:
One problem is how to find (by a query) even if the btscanner is running.
In particular, I have a fragmented index and I want to check, through a sql
query, if it is clean or not - I mean I know that multiple deletes were done
on the table and I am not sure that corresponding index entries were removed
by the btscanner.
Something like the 'onstat -C clean' is providing...
I suspect that 'sysptnbit' table could be used but I am not sure (eg I don't
know much about 'pb_bitmap' field).
My approach is this:
I can use the 'partnum' asociated to each dbspace (on which the index is
fragmented) to query 'sysptnbit' table:
- if the 'pb_bitmap' field is 0, then the respective 'pb_pagenum' was
processed by the btscanner
- if the 'pb_bitmap' field is 8, then the respective 'pb_pagenum' is not
processed (yet).
Can you, please, confirm or not this approach?
And, widening the question, is there any sql query gainst SMI tables that
supplies same info like:
onstat -C
onstat -C hot
onstat -C part?
Any hints will be highly appreciated :)
Regards,
Emanuel