Home > database >  What a great god help analysis
What a great god help analysis

Time:09-27

select AKB020,AKC190,AKC220,AAE072,AKC515,AKA135,AAC001,AKC516,AKC221,AAE040,AKC222,AKC223,AKA063,AKA065,AKC224,AKA113,AKC225,AKC226,AKC227,AKC228,AKC334,AKA068,AKC253,AKA069,AAE073,AKA064,AKA070,AKA097,AKC229,AKA071,AKA072,AKC202,AKA073,AKA076,AKC201,AKC325,AKC125,AAE100,AKC301,AKC127,AKC347,AKC384,AKC378,AKC379,AKC380,AKC381,AKC382,AKC383,AAE011,AAE036,OAE001,OAE300,OAE301,AKA609,AKC319,AKC163,AKA231,BKC228,AKA163 from kc22 where akb020=:"SYS_B_0"and akc190=:"SYS_B_1" and aae100=:"SYS_B_2"


In pl/SQL seconds out of the results, in the program anyway pass,

CodePudding user response:

Cannot be used in the program, "SYS_B_0" this bind variables,
In PL/SQL can be used to

CodePudding user response:

That how to break this problem? Was not on a service, cut to another service, run for a few days also not line,

CodePudding user response:

Or you will try this paragraph into a placeholder:
Where akb020=: "SYS_B_0 and akc190=" : "SYS_B_1 and aae100=" : "SYS_B_2
"To: the where akb020=? And akc190=? And aae100=?

CodePudding user response:

PLSQL dev so-called seconds may be false, and that in the database to perform, they may walk path is not the same, if the original poster said "pass" is the performance problems, or as the saying goes, "card", then Suggestions for execution plan after discussion again better,

In addition, from the point of the SQL itself, as akb020 akc190, aae100 the change of the three conditions, some may be seconds out, some may get stuck, it is related to the data distribution, under some conditions in the database layer, you may be powerless, but if no matter how changes in the value of these three conditions, eligible data volume is small, so the SQL may still can be optimized, it depends on the execution plan to settle,

Have SQL execution plan real bind variables may be more difficult, there is a relatively convenient point method (but it misses the predicate information, namely the conditions in the execution plan details will see) :

1, through the text matching, from v $SQL from accessing the SQL sql_id;
2, the use of database on the server side $ORACLE_HOME/RDBMS/admin/awrsqrpt SQL, according to the prompt sql_id, or the real SQL execution plan

CodePudding user response:

refer to the second floor yukwxiey response:
that how to break this kind of circumstance? Was not on a service, cut to another service, run again for a few days washed-up,


If the program no problem at the beginning, to run for a few days there is a problem, then change is likely to be the amount of data leads to a decline in performance, if you don't want to get the execution plan, want to take a chance to solve this problem, you can consider most likely is: SQL execution plan go table scan, you didn't create indexes on three conditions, can try to create composite index on these three fields to solve this problem,

CodePudding user response:

Temporarily solved, force index, make do do first, otherwise can't apply for to draw out the public's anger

CodePudding user response:

refer to 6th floor yukwxiey response:
temporarily solved, force index, make do do first, otherwise can't apply for to draw out the public's anger


If the value of the three conditions changing, but the amount of data has been eligible to stability in a smaller scale, so hard coded in SQL INDEX hint is a feasible and good solution,

And I wanted to think, have you this kind of situation is likely to be Oracle 11 g after the introduction of new "cardinality feedback" (feedback) literal translation: base function, the function simply is Oracle will base case according to the SQL execution before get to automatically change the SQL execution plan, this feature is well-meaning, but in actual production, often poked hornet's nest, fortunately, this function can be shut down by _optimizer_use_feedback hidden parameters,

CodePudding user response:

refer to 6th floor yukwxiey response:
temporarily solved, force index, make do do first, otherwise can't apply for to draw out the public's anger


If you don't want to add tip, actually can be done through the SQL profile similar to the implementation of the,
  • Related