Wrong cardinality for a GTT whose stats have juste been gathered
Hello,
my DB version is 19.13.
I'm trying to understand why Oracle isn't showing the correct cardinality for a GTT used in a query of a bulk collect operation. The GTT's gets populated and its stats gathered just before the bulk collect. I used 100% as the estimate_percent for the stats gathering. The table has 18 rows, but Oracle shows 8168 in the "Rows" section of the explain plan.
The settings is session-private statistics for global temporary tables.
SELECT DBMS_STATS.get_prefs('GLOBAL_TEMP_TABLE_STATS') FROM dual; —> SESSION SELECT table_name, num_rows, scope
FROM dba_tab_statistics
WHERE owner = 'K_MUT_PP'