home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / database / oracle / 2133 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  3.0 KB

  1. Path: sparky!uunet!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sun4nl!orcenl!nl.oracle.com!kverruyt
  2. From: kverruyt@nl.oracle.com (Kees Verruyt)
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: View questions...
  5. Message-ID: <3197@nlsun1.oracle.nl>
  6. Date: 6 Nov 92 09:31:02 GMT
  7. References: <UN.92Nov5120254@gdstech.GRUMMAN.COM>
  8. Sender: news@nl.oracle.com
  9. Organization: Oracle Europe
  10. Lines: 56
  11. Nntp-Posting-Host: nlsu54
  12.  
  13. In article <UN.92Nov5120254@gdstech.GRUMMAN.COM>, un@gdstech.GRUMMAN.COM (Un Fu) writes:
  14. |> How can I get the block usage of a view I created?  Looked
  15. |> into "user_extents" and it only displays block usages of tables.
  16.  
  17. As their name implies, VIEWs don't use space. They retrieve their data from the
  18. underlying table.
  19.  
  20. |> 
  21. |> Also how do I direct the creation of a view or several views to use
  22. |> a temporary, TEMP_TS, tablespace.  I see one can specify which
  23. |> tablespace to create a table at, but not on the 'CREATE VIEW' command.
  24.  
  25. Again, selecting from a view is just the same as selecting from the underlying
  26. tables. The data is only stored in the tables.
  27.  
  28. The only thing that I can think of is that your view-definition joins tables which
  29. do not have indexes. In that case the server will have to do a sort-merge scan
  30. which can result in temporary tables. These are assigned to the TEMPORARY
  31. TABLESPACE for that user. If you haven't defined that for the user, that will
  32. be SYSTEM.
  33.  
  34. So it's very wise to create a separate tablespace (fi. TEMP) and then execute
  35. for every user in your system:
  36.  
  37. ALTER USER ... TEMPORARY TABLESPACE TEMP;
  38.  
  39. (This will prevent repeated allocation & deallocation of small extents in
  40.  your 'data-tablespaces'. In the temporary tablespace that cannot do harm since
  41.  all temporary tables are deallocated when they are no longer needed, thus
  42.  ensuring that the free extents are contiguous and can be coalesced into larger
  43.  ones.)
  44.  
  45. |> 
  46. |> I have been asking lots of question lately and this newsgroup has been
  47. |> tremendously responsive.  THANK YOU ALL, FOLKS!
  48. |> --
  49. |> ****************************************************************************
  50. |> Un Un Fu                                    Internet: un@gdstech.grumman.com
  51. |> Disclaimer: I am solely responsible for what I am saying here!
  52. |> ****************************************************************************
  53. |> -- 
  54. |> ****************************************************************************
  55. |> Un Un Fu                                    Internet: un@gdstech.grumman.com
  56. |> Disclaimer: I am solely responsible for what I am saying here!
  57. |> ****************************************************************************
  58.  
  59. You're welcome.
  60.  
  61. -- 
  62. EXEC SQL INCLUDE STD_DISCLAIMER; -- My views, not Oracle's.
  63. ------------------------------------------------------------------------
  64. Kees Verruijt                           Rijnzathe 6
  65. Software Engineer Gateway development   3454 PV  DE MEERN
  66. Oracle Europe                           The Netherlands
  67. Email: kverruyt@nl.oracle.com           Tel: +31 3406 94886
  68.    or: kverruyt@oracle.nl               Fax: +31 3406 65603
  69.