SQL Tuning ... [message #500666] |
Tue, 22 March 2011 12:54 |
|
aucrun
Messages: 114 Registered: February 2011
|
Senior Member |
|
|
Hi,
I have a doubt about DBMS_SQLTUNE.
I have a query that is called regularly, and it consumes me a certain amount of time each time (about 40 seconds, and sometimes a little more).
The query is a little complex, and since it has somes Counts and Group Bys in the way it takes some time to execute.
Running the SQL Tuning Advisor it suggested me to use the DBMS_SQLTUNE.ACCEPT_SQL_PROFILE function.
I've used the next code to Accept the SQL Profile as suggested:
begin
dbms_sqltune.accept_sql_profile(task_name => 'staName1',
name => 'SQLProfile_1',
description => 'Tuning of SQL',
task_owner => 'UserDB',
replace => TRUE);
end;
After that, I've tried to run the SQL again to see if it would run faster, and the result was 30 seconds ...
Now I have a doubt ... did I missed any step along the way? Or by another hand, this is the best result of the tuning?
There is any other way to tune it faster?
Thanks!
|
|
|
|