Statistics for volatile tables (VTTs) are handled differently from statistics on base tables. Statistics collected from VTTs are not saved in DBC.StatsTbl. They are saved in memory for the given session. They get deleted when the session is logged off. They don’t accumulate history records and extrapolations are not performed against them.
The reason you are seeing 0 rows updated when you collect stats on a VT table is because there isn't a histogram or an entry in DBC.StatsTbl, but just a place in memory where these stats stay for the duration of the session.
The optimizer should by using the stats on a volatile table as it would any other table stats. I would suggest you look at the estimates and confidence levels in the explain text to see whether the stats appear to be being used or not. Because these stats are held in memory, it's possible, the diagnostic HELPSTATS has some issues in correctly identifying the presence of stats. So it keeps on recommending stats even when they exists. I think that is likely to be what is happening in your case.
If you see that the estimates/confidence levels in the explain don’t validate that VTT stats are being used, then I would recommend you open an incident. Otherwise, just ignore the recommendations you are getting from the diagnostic for stats that already exist.
Genner,
Statistics for volatile tables (VTTs) are handled differently from statistics on base tables. Statistics collected from VTTs are not saved in DBC.StatsTbl. They are saved in memory for the given session. They get deleted when the session is logged off. They don’t accumulate history records and extrapolations are not performed against them.
The reason you are seeing 0 rows updated when you collect stats on a VT table is because there isn't a histogram or an entry in DBC.StatsTbl, but just a place in memory where these stats stay for the duration of the session.
The optimizer should by using the stats on a volatile table as it would any other table stats. I would suggest you look at the estimates and confidence levels in the explain text to see whether the stats appear to be being used or not. Because these stats are held in memory, it's possible, the diagnostic HELPSTATS has some issues in correctly identifying the presence of stats. So it keeps on recommending stats even when they exists. I think that is likely to be what is happening in your case.
If you see that the estimates/confidence levels in the explain don’t validate that VTT stats are being used, then I would recommend you open an incident. Otherwise, just ignore the recommendations you are getting from the diagnostic for stats that already exist.
Thanks, -Carrie