Results 1 to 3 of 3

Thread: How can we know that the query are not using index

  1. #1
    Geek_Guest
    Guest

    How can we know that the query are not using index

    Can tell me How can we know that the query are not using index, What is its solutions?

    Question asked by visitor nitesh


  2. #2
    Expert Member
    Join Date
    Jun 2006
    Answers
    410

    Re: How can we know that the query are not using index

    you can use "explain plan" command to get the execution plan for the query.

    This execution plan is basically a step by step instruction for how the statement must be executed. That is, the order in which tables are read, if indexes are used, which join methods are used to join tables and so on.

    This is the syntax

    explain plan for your-sql-statement;

    If you do an EXPLAIN PLAN, Oracle will analyze the statement and fill a special table(PLAN_TABLE) with the Execution plan for that statement.

    Hope this helps


  3. #3
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: How can we know that the query are not using index

    set autotrace to on

    to use this feature u have to create a table called PLAN TABLE in the usser schema .
    to create this table find and run a script named UTLXPLAN.SQL in oracle home directory.
    ..\oracle\product\10.2.0\db_1\rdbms\admin

    the location may differ from version tio version

    next u need to enable PLUSTRACE role.

    next everytime u execute any query ,after showing the result it will also show the execution plan that has been followed by oracle optimizer.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact