jgohlke
My other hobby
- Joined
- Sep 15, 2004
- Messages
- 990
I know it's kind of long-shot posting here, but hey, you guys know everything right? I mean, as a community, we're a cigar-smoking version of Google!
I've been trying to find this out for a couple of days now and haven't been able to figure it out. It is very Oracle-database-specific. (you've been warned!)
We have a long-running query in the database and at the same time another process is flooding the schema with data inserts. At some point the query performance starts to be really slow. We have the tables set to self-monitor, but the process only runs about every 3 hours according to the Oracle documentation. We can run the analyze command (we use the dbms package for this), but it doesn't seem to help the query that is running unless we stop and restart the job. I suspect that the execution plan for the query isn't being changed by the new statistics generated from the analyze. Of course, restarting the job forces a new execution plan. We could also flush the shared pool, but that seems kind of drastic.
I'd like to be able to leave the query job running, re-gen the table stats and then force the query to re-plan.
edits:typos
I've been trying to find this out for a couple of days now and haven't been able to figure it out. It is very Oracle-database-specific. (you've been warned!)
We have a long-running query in the database and at the same time another process is flooding the schema with data inserts. At some point the query performance starts to be really slow. We have the tables set to self-monitor, but the process only runs about every 3 hours according to the Oracle documentation. We can run the analyze command (we use the dbms package for this), but it doesn't seem to help the query that is running unless we stop and restart the job. I suspect that the execution plan for the query isn't being changed by the new statistics generated from the analyze. Of course, restarting the job forces a new execution plan. We could also flush the shared pool, but that seems kind of drastic.
I'd like to be able to leave the query job running, re-gen the table stats and then force the query to re-plan.
edits:typos