Re: Why the TEMP tablespace is not being used while creating MV

From: Stefan Knecht <knecht.stefan_at_gmail.com>
Date: Fri, 26 Jun 2009 00:27:16 +0200
Message-ID: <486b2b610906251527g438257e3v666e8669965a1092_at_mail.gmail.com>



Hi Roger

The temporary tablespace would be used to perform sorts, or aggregations, should they not fit in memory.

But the temporary segment that will later become the actual materialized view is created in the tablespace where you're creating the object itself. It's the same with a "create table as select" for example.

If oracle would first create the whole MVIEW in the temp tablespace, and then copy it accross -- think about it, that would take a lot longer than necessary, and waste a lot of resources.

The segment basically is only of "temporary nature" while the creation process is running -- therefore oracle allocated "temporary extents". These are then "converted" to a normal set forming the segment, which makes up the final object.

Cheers

Stefan


Stefan P Knecht
CEO & Founder
s_at_10046.ch

10046 Consulting GmbH
Schwarzackerstrasse 29
CH-8304 Wallisellen
Switzerland

Phone +41-(0)8400-10046
Cell +41 (0) 79 571 36 27
info_at_10046.ch
http://www.10046.ch


On Fri, Jun 26, 2009 at 12:01 AM, Xu, Roger <Roger.Xu_at_dpsg.com> wrote:

> Oracle 10.2.0.4.0
>
>
>
> I am getting the following while creating MV. Why the TEMP tablespace is
> not being used? Thanks.
>
>
>
> *
>
> ERROR at line 58:
>
> ORA-01652: unable to extend temp segment by in tablespace
>
>
>
>
>
> SQL> show user
>
> USER is "BTPMUSER"
>
> SQL> select TEMPORARY_TABLESPACE from user_users;
>
>
>
> TEMPORARY_TABLESPACE
>
> ------------------------------
>
> TEMP
>
>
>
> SQL> !tail -5 /u01/app/oracle/admin/BTPMBID/bdump/ alert_BTPMBID.log
>
> Current log# 2 seq# 402 mem# 0: /u08/mirrlog/BTPMBID/redo/redo_g2_m1.dbf
>
> Current log# 2 seq# 402 mem# 1: /u07/origlog/BTPMBID/redo/redo_g2_m2.dbf
>
> Thu Jun 25 17:50:15 2009
>
> ORA-1652: unable to extend temp segment by 128 in
> tablespace BTPMTBL
>
> ORA-1652: unable to extend temp segment by 128 in
> tablespace BTPMTBL
>
>
>
> SQL>
>
>
>
> *Click here <http://www.drpeppersnapplegroup.com/about/corporate>* to
> learn more about Dr Pepper Snapple Group’s commitment to corporate* *
> social* *responsibility.
>
> Please be conscious of the environment and print this email only if
> absolutely necessary.
>
> This e-mail (including any attachments) is confidential and may contain
> privileged information of Dr Pepper Snapple Group, Inc. and/or its
> subsidiaries ("Dr Pepper Snapple Group"). If you are not the intended
> recipient or receive it in error, you may not use, distribute, disclose or
> copy any of the information contained within it and it may be unlawful to do
> so. If you are not the intended recipient, please notify us immediately by
> returning this e-mail to us at mailerror_at_dpsg.com and destroy all
> copies. Any views expressed by individuals within this e-mail do not
> necessarily reflect the views of Dr Pepper Snapple Group. This e-mail does
> not constitute a binding offer, acceptance, amendment, waiver or other
> agreement, unless the intent that an e-mail will constitute such is clearly
> stated in the body of the email. Recipients are advised to subject this
> e-mail and attachments to their own virus checking, in keeping with good
> computing practice. Please note that e-mail received by Dr Pepper Snapple
> Group may be monitored in accordance with applicable law.
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 25 2009 - 17:27:16 CDT

Original text of this message