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