Running GATHER_TABLE_STATS results in following error:
Error starting at line : 1 in command -
BEGIN
DBMS_STATS.GATHER_TABLE_STATS ('mySchema', 'myTable', null, 1);
END;
Error report -
ORA-06532: Subscript outside of limit
ORA-06512: at "SYS.DBMS_STATS", line 15027
ORA-06512: at "SYS.DBMS_STATS", line 15049
ORA-06512: at line 2
06532. 00000 - "Subscript outside of limit"
*Cause: A subscript was greater than the limit of a varray
or non-positive for a varray or nested table.
*Action: Check the program logic and increase the varray limit
if necessary.
How can I fix this? Note that performance on this table is terrible and indexes are never used. I assume this is somehow related.