-
question on tunning an SQL
The following is being run by a user and is spiking the Database. I ran a tunning advisor for it and it came back with the following recomendation:
Predicate "TRX"."Procedure"<>:B1 used at line ID 7 of the execution plan is an inequality condition on indexed column "Procedure". This inequality condition prevents the optimizer from selecting indices on table "AXIUM"."TRX".
Here is the statement:
SELECT "PATIENT"."Chart", "CONTRACT"."Consent", "CONTRACT"."Deleted", "TRX"."Type", "TRX"."Procedure", "PROCEDUR"."Discipline", "TRX"."Status", "TRX"."Deleted", "TRX"."TreatmentDate", "NOTES2"."Code", "TRX"."Producer", "PATIENT"."Last", "PATIENT"."First", "CONTRACT"."Patient" FROM "AXIUM"."PATIENT" "PATIENT", "AXIUM"."TRX" "TRX", "AXIUM"."CONTRACT" "CONTRACT", "AXIUM"."PROCEDUR" "PROCEDUR", "AXIUM"."NOTES2" "NOTES2" WHERE ("PATIENT"."Patient"="TRX"."Patient" (+)) AND (("TRX"."Patient"="CONTRACT"."Patient" (+)) AND ("TRX"."TreatmentDate"="CONTRACT"."Date" (+))) AND ("TRX"."Procedure"="PROCEDUR"."Procedure" (+)) AND ("TRX"."ChartTrx"="NOTES2"."TxId" (+)) AND "PATIENT"."Chart"=:"SYS_B_0" AND "TRX"."Type"=:"SYS_B_1" AND ("TRX"."Status"=:"SYS_B_2" OR "TRX"."Status"=:"SYS_B_3") AND "TRX"."Deleted"=:"SYS_B_4" AND NOT ("TRX"."Procedure"=:"SYS_B_5" OR "TRX"."Procedure"=:"SYS_B_6") AND "TRX"."TreatmentDate">=TO_DATE (:"SYS_B_7", :"SYS_B_8") AND "TRX"."Producer"=:"SYS_B_9"
I don't really understand there recomendation. I don't see in the code where
"TRX"."Procedure"<>:B1 is.
would any one be able to explain there recomendation to me, please. thank you.
-
Are you sure you have the entire statement? Why not look at the original query instead of the formatted one?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|