-- INTO LR_TAG. QTY
The FROM TTAG_INSOUT_D A
WHERE 1=1
AND (A.S TKINSOUTNO=M_STKINSOUTNO OR M_STKINSOUTNO IS NULL)
AND (A.S TKINSOUTID=M_STKINSOUTID OR M_STKINSOUTID IS NULL)
AND (a. ATCHMARKID=M_BATCHMARKID OR M_BATCHMARKID IS NULL)
AND (a. USSSTATUS=10 OR: M_ISCREATETAG IN (0));
CodePudding user response:
Basic nothing optimization spaceCodePudding user response:
Store operation when the time of highCodePudding user response:
The execution plan posted and have a lookCodePudding user response:
The specific business logic and execution parameter information and execution planCodePudding user response:
Replace the or to switch to the unionCodePudding user response:
CodePudding user response:
Can't see your specific parameters and index information guess all index and high selectivity with/* + use_concat */give it a tryCodePudding user response:
Concurrent directly,CodePudding user response:
Probably saw, estimates that will help add index, four columns, see which is better, or which a few selectivity indexed try,CodePudding user response:
Use bind variables + dynamic SQL assembled, if the following these variables, which is not null, where a splicing,M_STKINSOUTNO
M_STKINSOUTID
M_BATCHMARKID
M_ISCREATETAG
CodePudding user response:
Have been used for dynamic SQL splicing has been solved, thank youCodePudding user response:
The OR UNION ALL instead, into two pieces of the SELECT, sure to be like this,