oracle database 11g
IBM AIX 6.1
Running a select * from a view takes just a few minutes and produces 60K rows. When running the same query for a second time, it appears to hang. It's actually progressing in the background but taking a very long time.
The view is quite complex, many joins/sorts etc, and hits a list of tables. Seems to be hitting columns on tables that are not indexed also and so there's several full table scans etc.
We're under the impression it should run quicker the second time round if anything. Our question is , why would it be a lot slower on subsequent retries ? The explain plan seems to change, how can this happen?
when issuing the *rule* hint with the select statement, the command executes quickly each time, but this is not supported in 11g so cannot be used.
IBM AIX 6.1
Running a select * from a view takes just a few minutes and produces 60K rows. When running the same query for a second time, it appears to hang. It's actually progressing in the background but taking a very long time.
The view is quite complex, many joins/sorts etc, and hits a list of tables. Seems to be hitting columns on tables that are not indexed also and so there's several full table scans etc.
We're under the impression it should run quicker the second time round if anything. Our question is , why would it be a lot slower on subsequent retries ? The explain plan seems to change, how can this happen?
when issuing the *rule* hint with the select statement, the command executes quickly each time, but this is not supported in 11g so cannot be used.