tag:blogger.com,1999:blog-6212636374045442782.post6745652309137022788..comments2023-05-26T17:26:38.914+03:00Comments on ORACLE DBA: Use DBMS_SQLTUNE.IMPORT_SQL_PROFILE to force a hint to a queryLefteris Tsekourashttp://www.blogger.com/profile/13896531464569159841noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-6212636374045442782.post-47555546239586715402019-10-08T18:29:51.581+03:002019-10-08T18:29:51.581+03:00question: Where did you obtain value for "pro...question: Where did you obtain value for "profile" parameter : SQLPROF_ATTR('FULL(@"SEL$1" "OBJECTS"@"SEL$1") FULL(@"SEL$1" "SEGMENTS"@"SEL$1")')<br /><br />answer: use outline to get this crazy names: <br />select plan_table_output from table(dbms_xplan.display_cursor('&sql_id',null,format=> '+OUTLINE'));Alexandre Verrihttps://www.blogger.com/profile/07911122819627864548noreply@blogger.comtag:blogger.com,1999:blog-6212636374045442782.post-64678991661689363512017-10-25T00:07:04.611+03:002017-10-25T00:07:04.611+03:00This link: http://www.online-database.eu/index.php...This link: http://www.online-database.eu/index.php/sql-tuning/214-create-manually-a-sql-profile-and-set-your-own-hints gives a method of producing the profile with dbms_xplan.display and an ADVANCED designation. It looks right although I have not tried it. Some of the character syntax on the page I reference was confusing to me, so I needed a second sample. I like the idea of retrieving the statement from v$sqlarea and naming the profile based on the sql_id shown here.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6212636374045442782.post-11990155973387391552017-04-27T08:49:32.265+03:002017-04-27T08:49:32.265+03:00You have to syntax it, according to what you want ...You have to syntax it, according to what you want to achieve. It's like putting a hint in your query. I have explained it in the last 3 sentences of this post.Lefteris Tsekourashttps://www.blogger.com/profile/13896531464569159841noreply@blogger.comtag:blogger.com,1999:blog-6212636374045442782.post-61299059322663530132017-04-26T21:01:38.535+03:002017-04-26T21:01:38.535+03:00Where did you obtain value for "profile"...Where did you obtain value for "profile" parameter : SQLPROF_ATTR('FULL(@"SEL$1" "OBJECTS"@"SEL$1") FULL(@"SEL$1" "SEGMENTS"@"SEL$1")')<br />Anonymousnoreply@blogger.com