Sequence Question
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Sequence Question

  1. #1

    Angry

    Why does it spend so much time on sequence selecting?

    ********************************************************************************

    select sequence_name.NEXTVAL
    from
    dual


    call count cpu elapsed disk query current rows
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------
    Parse 78531 12.71 12.72 0 0 0 0
    Execute 78531 3.75 3.45 0 0 0 0
    Fetch 78531 8.34 7.35 2 78531 314127 78531
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------
    total 235593 24.80 23.52 2 78531 314127 78531

    Misses in library cache during parse: 0
    Optimizer goal: RULE
    Parsing user id: 40 (USER_NAME)

    Rows Execution Plan
    ------- ---------------------------------------------------
    0 SELECT STATEMENT GOAL: RULE
    0 SEQUENCE OF 'SEQUENCE_NAME'
    0 TABLE ACCESS GOAL: ANALYZED (FULL) OF 'DUAL'

    ********************************************************************************
    Queyon Zeng

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    is that the whole tkprof'ed file?

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    You hard-parsed the statement 78531 times. I'm guessing you're not using bind variables...
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  4. #4

    Red face Sequence Question

    I'm selecting the next value of sequence from DUAL.
    I'm wondering whey it parses the statement everytime it runs.

    Queyon
    Queyon Zeng

  5. #5
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by marist89
    I'm guessing you're not using bind variables...
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  6. #6
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by marist89
    Originally posted by marist89
    I'm guessing you're not using bind variables...
    I'm just wondering how to use bind variables with the statement like this:
    Originally posted by Queyon
    select sequence_name.NEXTVAL
    from
    dual
    ???

    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  7. #7
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    Small question to Queyon:

    Did u analyze SYS schema or not:
    if yes u turn on CBO (not RULE) on SYS objects.
    because: ANALYZED (FULL) OF 'DUAL'

    0 TABLE ACCESS GOAL: ANALYZED (FULL) OF 'DUAL'

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