DBAsupport.com Forums - Powered by vBulletin
Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: difefrences between v$...

  1. #1
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    Does anyone know what are the exact differences between

    v$sql
    v$sqlarea
    v$sqltext
    v$sqltext_with_newlines

    cheers

  2. #2
    Join Date
    Jul 2000
    Posts
    243
    Hi pando

    the diff between v$sql and v$sqlarea is a group by in $sqlarea. this makes a select statment on v$sql a less expencive in resource terms.

    V$SQLTEXT contains the text of sql statements belonging to shared cursors in the sga. the diff btween this and te first two is that there main interest is to show statistics on shared sql area. in v$sqltext you sometimes see the sql statment broken into parts. you caqn connect them in the piece order for row with thesame hash_value

    for table v$sqltext_with_newlines, well i neverused it, but looking at the oracle documentation i saw this (copyed for oracle doc):"This view is identical to the V$SQLTEXT view except that, to improve legibility,
    V$SQLTEXT_WITH_NEWLINES does not replace newlines and tabs in the SQL
    statement with spaces. For more information"

    Hope this helps




  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    well actually I dont see the difference between v$sql and v$sqltext and I still dont see the difference :o

  4. #4
    Join Date
    Jul 2000
    Posts
    243
    Hi pando

    in v$sqltext you just have the text of sql statements in the shared sql cursors. in v$sql you have statistics like the number of users executing the sql statement, the amount of sharable memory this cursor and so on...
    shawish_sababa

    shawish_sababa@hotmail.com

  5. #5
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    well so basically they both show same sql_text? since v$sql also shows shared sql cursors?

  6. #6
    Join Date
    Jul 2000
    Posts
    243
    Hi pando

    If you look at it from the text point of view, well yes. in v$sqlarea the text limited to 1000 characters. in $sqltext, full text is available in 64 byte chunks, order by column piece
    and connected by hash_value.

  7. #7
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    hmm I sm wondering when I query v$sql joining with v$session and filter by a SID I get more than one SQL (expected) but if I join v$sqltext with v$session with same conditions I get one sql statement only (last SQL issued) why is this?

  8. #8
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    Does anyone know the difference between v$sql and v$sqltext :-?

  9. #9
    Join Date
    Jul 2000
    Posts
    243
    Hi pando

    I can only tell you that i looked at oracle documentation, and on the metalink, and my confusion just got bigger. this is the reason why i did not answer you until now. if any one can tell me on a good book to read about this. i'll be more then happy.

  10. #10
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    Hmmm so I am not alone :D

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