explain plan
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: explain plan

  1. #1
    Join Date
    Mar 2002
    Posts
    10

    Arrow

    Hi,
    I just wanted to know how to interpret the explain plan:

    explain plan for select count(*) from fot WHERE AGENCIA='edc' order by cod_doc desc;

    | SELECT STATEMENT
    | SORT AGGREGATE
    TABLE ACCESS BY INDEX..
    INDEX RANGE SCAN

    the index created is desc.
    Thanks


  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Why do you need order by clause as the select only returns count?

  3. #3
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    510
    Your explain plan says your table was scanned using an index, one or more rows were returned by using index rowid, and an aggreate was performed to return a single row for a group. A sort is a waste here since you are returning only count(*).
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width