Re: Query performance is slow after recreation of table
Hello,
I think that it is OK with the DBMS_STATS.GATHER_TABLE_STATS that you've suggested, and I don't think that you need to delete old "ANALYZE" statistics.
Maybe you can show us the query that "should take 2 hours but takes 4 hours", with the execution plan, and/or an idea of the cardinalities of the various tables
SET LINES 300 PAGES 32000
EXPLAIN PLAN FOR
SELECT ...
;
SELECT * FROM TABLE( DBMS_XPLAN.DISPLAY );
and
SELECT table_name, num_rows
FROM user_tables
WHERE table_name IN ( 'TBL1', 'TBL2', ... )
;
(please use the font "Courier New" to give us the output)
Best regards,