Home Discussions Questions & Answers Detecting High Parsing Due to SQL Literals

Detecting High Parsing Due to SQL Literals

Avatar photoCustomer March 4, 2021 at 10:02 am

We suspect we have custom SQL being executed repeatedly that uses literals instead of bind variables, causing unnecessary parsing overhead. How can I use Blitz Report to identify these duplicate SQL statements in the Shared Pool?

Viewing 4 reply threads
  • Author
    Replies
    • Support March 6, 2021 at 8:26 am  

      You can use the DBA SGA SQL Performance Summary report. Set the parameter ‘Literals Duplication Count’ to a value greater than zero to display all SQL statements that are duplicated at least that number of times due to literal usage.

    • Avatar photoCustomer March 6, 2021 at 3:26 pm  

      If I find such SQL, what is the best practice recommendation for developers using parameters in Blitz Reports to avoid this issue in the future?

    • Support March 6, 2021 at 9:39 pm  

      Blitz Report strongly recommends using bind variables for parameterization to avoid performance issues associated with optional parameters coded as `column_name=nvl(:bind_variable, column_name)`. For parameters, always leverage bind variables unless you specifically need to enforce reparsing using the placeholder “.

    • Avatar photoCustomer March 8, 2021 at 11:47 am  

      If I need to identify which report parameters are incorrectly set up with a bind variable name that duplicates standard Oracle keywords, is there a validation report?

    • Support March 10, 2021 at 5:44 am  

      While not directly checking against Oracle reserved words, the Blitz Report Parameter Bind Variable Validation report helps check which bind variables were assigned to which Blitz Report parameter, useful if the same bind variable name is incorrectly used in different parameters.

Viewing 4 reply threads
  • You must be logged in to reply to this post.

Login with: