Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6656161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:36:32+00:00 2026-05-26T01:36:32+00:00

We have an internal application based on .Net which calls certain procedures in Oracle

  • 0

We have an internal application based on .Net which calls certain procedures in Oracle (10g). One of these queries is run to get in/out parameters of these procedures. It’s a pretty simple select query. But even under the best of circumstances, it is taking 3 seconds. At lease few times a day it starts taking more than 40 seconds and causes our .Net application to time out.

Select query is:

SELECT   a.argument_name,
           a.data_type,
           a.in_out,
           NVL (a.data_length, 0) AS data_length,
           NVL (a.data_precision, 0) AS data_precision,
           NVL (a.data_scale, 0) AS data_scale
    FROM   ALL_ARGUMENTS a, all_objects o
   WHERE   o.object_id =
              (SELECT   object_id
                 FROM   all_objects
                WHERE       UPPER (object_name) = UPPER ('resourcemanager_pkg')
                        AND object_type = 'PACKAGE'
                        AND owner = 'OFFICEDBA')
           AND UPPER (a.object_name) = UPPER ('p_search_roles')
           AND a.OBJECT_ID = o.OBJECT_ID
ORDER BY   a.position ASC

This query returns the in/out parameters of particular procedure.

resourcemanager_pkg is package name, p_search_roles is procedure name.
We call this query for every database call for procedures.

Is there anything which is wrong with this query?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:36:33+00:00Added an answer on May 26, 2026 at 1:36 am

    Do you have the ability to modify the query that is being generated? It appears that it is doing an extraneous join to the ALL_OBJECTS table. It appears that your query is equivalent to this

    SELECT   a.argument_name,
               a.data_type,
               a.in_out,
               NVL (a.data_length, 0) AS data_length,
               NVL (a.data_precision, 0) AS data_precision,
               NVL (a.data_scale, 0) AS data_scale
        FROM   ALL_ARGUMENTS a,
               (SELECT   object_id
                  FROM   all_objects
                 WHERE       UPPER (object_name) = UPPER ('resourcemanager_pkg')
                         AND object_type = 'PACKAGE'
                         AND owner = 'OFFICEDBA') o
        WHERE  UPPER (a.object_name) = UPPER ('p_search_roles')
          AND  a.OBJECT_ID = o.OBJECT_ID
        ORDER  BY a.position ASC
    

    I would also expect that using ALL_PROCEDURES rather than ALL_OBJECTS to get the OBJECT_ID would be more efficient.

    Have you gathered dictionary statistics? Queries against the data dictionary views are generally rather hard to tune since you can’t add indexes or other structures to speed things up. But at least gathering dictionary statistics may give the optimizer better information to be able to pick a better plan.

    Finally, is it possible that you could materialize the data from the data dictionary in a materialized view that refreshes periodically that you could index? That would mean that the results wouldn’t immediately reflect changes to the definition of procedures. On the other hand, you don’t generally want to be making changes to procedure definitions live and you can always refresh the materialized views after making schema changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C# .net application which servers both company's internal users and external
I have an internal enterprise application I've developed for my company built on .Net
We have an internal .NET case management application that automatically creates a new case
We have an internal ASP.NET MVC application that requires a logon. Log on works
I have a Spring framework based Java web application, which has been built in
I have worked on a Web Application based on ASP.NET Web Forms for a
We have a fairly large Windows based 1.1 .NET application that we are considering
I am a developer working on an internal web-based application, and I have been
I have to devellop an internal web based application with codeigniter and I need
I have one controller that renders pages in an internal web application that needs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.