I am tracking active sessions in my database. I noticed that the number of sessions which are active where username is not null(to execlude background porcesses) comes back a certain number but v$sql for users_executing > 0 almost always has more.
I would think that the number of sql/cursors listed in v$sql which has a users_executing column value of > 0 would match the number of v$session rows with status = 'active'. I even tried to join the v$session.sql_address column with the v$sql.address column but nada.
I would start a long running SQL statement as myself in one session, in another I would see v$session showing it as active and last_call_et number incrementing which is good, and I would see it in v$sql with users_executing > 0, which is also good, but I would also see other rows in v$sql
with users_executing > 0 but no corresponding row in v$session for the sql_id, or address. I'm not using parallel servers or shared server or anything like that, which could potentially cause a session correlation confusion.
--Justin