Temporary tablespace full
My temporary tablespace is full, i dont know if i should drop the tablespace and re-cretae a new one or extend the the size of the file available
hi Olu,
You will only need to worry if you start to see errors in the alert log file. If you don't then temp being full is not an issue.
regards
alan
Similar Messages
-
Temporary tablespace Full error 10g RAC.
Hi All,
Can any one help me in below problem.
After migrating one of database from single node to two node RAC database. we are facing temporary tablespace full problem. The database previously have 2 GB of temporary tablespace but after moving to RAC enviornment it is filling 32 GB of space and still generate error.
Thanks & Regards
Shailendra WanjariFIND OUT WHO IS USING THAT TEMP.. I USE WHEN I SEE TEMP IS BEING EATEN UP...
column tablespace format a12
column username format a12
break on username nodup skip 1
select se.username
,se.sid
,su.extents
,su.blocks * to_number(rtrim(p.value)) as Space
,tablespace
,segtype
from v$sort_usage su
,v$parameter p
,v$session se
where p.name = 'db_block_size'
and su.session_addr = se.saddr
order by se.username, se.sid
/ -
OEM alert: temporary tablespace more than 100% full
Hi,
I created an event in OEM which checks tablespaces. Once in a while I'm having an alerts like:
Tablespace TEMP is 102.08% full. -339968.0 KBytes of free space remain
What to do ?Did you do the calc yourself?
Ideally a temporary tablespace will show roughly 100% full (95-105%) at all times, using standard extent calculations. Any small amount over 100% is usually the result of rounding error, or using several independent queries and catching the reuse and realloc of segments.
The only time a temporary tablespace should show nearly empty is shortly affter restarting the instance. Once it starts getting used, the temp tablespace should get blocks used by active sessions. When a session needs an empty block, it formats that block for the purpose (sort, global tempo table, hash area, etc.) Once sessions are finished with them, the blocks are reused - for performance, blocks are not cleared (reformatted to 'empty') and therefore simply show 'being used' in a typical dba_segments/dba_extents select.
The only time to worry about it is when a session (or the system) compains about being out of temp space. In which case, make it bigger ... or figger why it needs the extra space and fiux that. -
INCLUDED_IN_DATABASE_BACKUP for temporary tablespace
Hi,
The query output from v$tablespace shows the INCLUDED_IN_DATABASE_BACKUP value for temp tablespace in my db is "YES". The only way to have the value "NO" is to configure rman to exclude tbs. But you can not exclude temporary tablespace. Based on the size of total full backup files, the temp tablespace does not seem to be backup by rman. Is this a bug or is there other way to set this value for temporary tablespace to "NO"? I'm using 9iR2. Thanks.>...The only way to have the value "NO" is to configure rman to exclude tbs. But you can not exclude temporary tablespace.
RMAN doesn't include the temporary tablespace in the backups.
SQL> select * from v$tablespace;
TS# NAME INC
0 SYSTEM YES
7 TEST YES
3 USERS YES
4 TEMP YES
6 UNDO YES
RMAN> list backup of tablespace TEMP;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 01/26/2006 20:04:06
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20202: tablespace not found in the recovery catalog
RMAN-06019: could not translate tablespace name "TEMP"
RMAN> list backup of tablespace UNDO summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Tag
3125 B 0 A DISK 22-JUL-05 1 1 TAG20050722T102731
3207 B 0 A DISK 24-OCT-05 1 1 TAG20051024T163622
3248 B 1 A DISK 02-NOV-05 1 1 TAG20051102T225318
3360 B F A DISK 23-JAN-06 1 1 TAG20060123T172135Aron -
Rapid and Huge growth of of used space of temporary tablespace
Hi,
Have a query (select) that run quick (no more than 10 seconds).
As soon I insert the data into a temporary table or even on physical table, the temporary table used space starts to growth very fast. The used space is totally used and the query crash since e reach the limit (65GB), or even more if I add more table files to temporary tablespace!
The problem also happen only if the period (dates) is one year (2013). If the period is the first trimestre of 2013 (same amount of data), the problem does not happen!!
I also confirm that on another instance ( a test one), even with less resources this ORACLE behavior do not happen. I confirm differente execution plan queries, between the two instances .
What I really do not understant is the behavior of the ORACLE with the huge and rapid growth!!!
Any one experiment such a similiar situation?
Thanks in advance,Rui
Plan
INSERT STATEMENT ALL_ROWSCost: 15.776 Bytes: 269 Cardinality: 1
28 LOAD TABLE CONVENTIONAL MIDIALOG_OLAP.MED_INVCOMP_FACTTMP_BEFGROUPBY
27 FILTER
26 NESTED LOOPS
24 NESTED LOOPS Cost: 15.776 Bytes: 269 Cardinality: 1
22 NESTED LOOPS Cost: 15.775 Bytes: 255 Cardinality: 1
19 NESTED LOOPS Cost: 15.774 Bytes: 205 Cardinality: 1
17 NESTED LOOPS Cost: 15.773 Bytes: 197 Cardinality: 1
14 NESTED LOOPS Cost: 15.770 Bytes: 180 Cardinality: 1
11 NESTED LOOPS Cost: 15.767 Bytes: 108 Cardinality: 1
9 HASH JOIN Cost: 15.757 Bytes: 8.346.500 Cardinality: 83.465
7 HASH JOIN Cost: 13.407 Bytes: 6.345.012 Cardinality: 83.487
5 HASH JOIN Cost: 11.163 Bytes: 5.010.550 Cardinality: 100.211
3 HASH JOIN Cost: 5.642 Bytes: 801.288 Cardinality: 22.258
1 INDEX RANGE SCAN INDEX MIDIALOG.IX_INSCOMP_DTCEIDICIDLCPECIDOP Cost: 120 Bytes: 489.676 Cardinality: 22.258
2 INDEX FAST FULL SCAN INDEX (UNIQUE) MIDIALOG.IX_LINHACOMPRADA_IDLCIDOPSEQ Cost: 5.463 Bytes: 123.975.530 Cardinality: 8.855.395
4 INDEX FAST FULL SCAN INDEX (UNIQUE) MIDIALOG.IX_LINHACOMPRADA_IDLCIDOPSEQ Cost: 5.463 Bytes: 123.975.530 Cardinality: 8.855.395
6 TABLE ACCESS FULL TABLE MIDIALOG.ITEM_AV Cost: 1.569 Bytes: 6.963.736 Cardinality: 267.836
8 TABLE ACCESS FULL TABLE MIDIALOG.ITEM_AV Cost: 1.572 Bytes: 7.713.672 Cardinality: 321.403
10 INDEX UNIQUE SCAN INDEX (UNIQUE) MIDIALOG.IX_BOFINALBO_IDBOIDFINALBO Cost: 0 Bytes: 8 Cardinality: 1
13 TABLE ACCESS BY INDEX ROWID TABLE MIDIALOG.INSERCAO_COMPRADA Cost: 3 Bytes: 72 Cardinality: 1
12 INDEX RANGE SCAN INDEX (UNIQUE) MIDIALOG.IX_INSCOMPRADA_IDLCDATAPECAINS Cost: 2 Cardinality: 1
16 TABLE ACCESS BY INDEX ROWID TABLE MIDIALOG.INSERCAO_ITEMFACTURA Cost: 3 Bytes: 17 Cardinality: 1
15 INDEX RANGE SCAN INDEX MIDIALOG.IX_INSITFACT_INSCOMPRADA Cost: 2 Cardinality: 1
18 INDEX RANGE SCAN INDEX (UNIQUE) MIDIALOG.UQ_ITEMFACTURA_IDITF_IDFACT Cost: 1 Bytes: 8 Cardinality: 1
21 TABLE ACCESS BY INDEX ROWID TABLE MIDIALOG.FATURA Cost: 1 Bytes: 50 Cardinality: 1
20 INDEX UNIQUE SCAN INDEX (UNIQUE) MIDIALOG.PK_FATURA Cost: 0 Cardinality: 1
23 INDEX UNIQUE SCAN INDEX (UNIQUE) MIDIALOG.PK_TIPO_ESTADO Cost: 0 Cardinality: 1
25 TABLE ACCESS BY INDEX ROWID TABLE MIDIALOG.TIPO_ESTADO Cost: 1 Bytes: 14 Cardinality: 1
Edited by: rr**** on 19/Fev/2013 15:25I run the select with sucess, no more that 1 minute from on year of data. Few temporary used space used.
As soon I plug the insert (global temporary table, also experiment with physical table) the used space of temporary table space start to grow crazy!!
insert into midialog_olap.med_invcomp_facttmp_befgroupby
select fac.numefatura,
fac.codpessoa,
fac.dtemiss,
tef.nome as estado_factura,
opsorig.demid,
opsorig.anoplano,
opsorig.numplano,
opsorig.numplanilha,
ops.nome as ordem_publicidade,
ops.external_number as numero_externo,
ops.estado,
lic.seq,
inc.data,
inc.peca,
fac.id_versao_plano,
fac.ano_proforma || '.' || fac.numrf as num_proforma,
iif.tipo_facturacao,
opsorig.codveiculo as id_veiculo,
opsorig.codfm as id_fornecedor_media,
icorig.chkestado as id_estado_checking,
0 as percentagem_comissao_agencia,
0 as valor_pbv,
0 as valor_stxtv,
0 as valor_ptv,
0 as valor_odbv,
0 as valor_pbbv,
0 as valor_dnv,
0 as valor_pbnv,
0 as valor_stxv,
0 as valor_pbtv,
0 as valor_dav,
0 as valor_plv,
0 as valor_odlv,
0 as valor_pllv,
0 as valor_ca,
0 as valor_trv,
0 as valor_txv,
0 as valor_base_facturacao,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_pb_compra * fac.percentagem_facturada / 100))
as valor_pbc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_stxt_compra * fac.percentagem_facturada / 100))
as valor_stxtc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_pt_compra * fac.percentagem_facturada / 100))
as valor_ptc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_odb_compra * fac.percentagem_facturada / 100))
as valor_odbc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_pbb_compra * fac.percentagem_facturada / 100))
as valor_pbbc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_dn_compra * fac.percentagem_facturada / 100))
as valor_dnc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_pbn_compra * fac.percentagem_facturada / 100))
as valor_pbnc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_stx_compra * fac.percentagem_facturada / 100))
as valor_stxc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_pbt_compra * fac.percentagem_facturada / 100))
as valor_pbtc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_da_compra * fac.percentagem_facturada / 100))
as valor_dac,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_pl_compra * fac.percentagem_facturada / 100))
as valor_plc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_odl_compra * fac.percentagem_facturada / 100))
as valor_odlc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_pll_compra * fac.percentagem_facturada / 100))
as valor_pllc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_transcricoes * fac.percentagem_facturada / 100))
as valor_trc,
decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
inc.total_tx_compra * fac.percentagem_facturada / 100))
as valor_txc,
--nvl((select cfm.total_comprado
-- from fin_custos_facturados_media cfm
-- where cfm.id_factura = fac.id_factura and
- -- cfm.id_op = ops.id_op
-- ), 0) / opsorig.number_of_bought_insertions as custos_associados,
0 as custos_associados,
fac.iss as percentagem_iva,
fac.percentagem_facturada,
fac.currency_exchange as taxa_cambio,
iif.associated_code as insertions_associated_code
from fatura fac, item_fatura itf, insercao_itemfactura iif,
insercao_comprada icorig, linha_comprada lcorig, item_av opsorig,
med_bookingorder_finalbo opfin,
insercao_comprada inc,
linha_comprada lic, item_av ops,
--veiculo vei,
tipo_estado tef
where fac.id_factura = itf.id_factura and
itf.id_itemfactura = iif.id_itemfactura and
iif.id_ic = icorig.id_ic and
icorig.id_lc = lcorig.id_lc and
lcorig.id_op = opsorig.id_op and
opsorig.id_op = opfin.id_booking_order and
opsorig.number_of_bought_insertions > 0 and
opfin.id_final_booking_order = ops.id_op and
-- ops.id_op = (
-- select max(ops.id_op)
-- from item_av ops
-- start with ops.id_op = opsorig.id_op
-- connect by prior ops.id_opsubstituicao = ops.id_op) and
ops.id_op = lic.id_op and
lic.seq = lcorig.seq and
lic.id_op = inc.id_op and
lic.id_lc = inc.id_lc and
inc.data = icorig.data and
inc.peca = icorig.peca and
--opsorig.codveiculo = vei.codveiculo and
fac.estado = tef.estado and
fac.estado != 305 and
ops.estado != 223 and
iif.tipo_facturacao != 'SO_CA' and
icorig.data between :dtBeginDate and :dtEndDate and
(fac.codagenciafat = :iIdAgency or :iIdAgency is null); -
Problem with Temporary Tablespace in 8i
Hello friends,
I have the 8.1.7.4 version, with a 18GB Temporary Tablespace.
An external process (from Datawarehouse tool) is making a query over a 10.000.000 records.
It appeared the error:
SQL error 1652 occurred when accessing table XXX
It's supposed it occurs due to temporary tablespace is full
DWH tool makes different "big" queries.. but.. are the enough to grow up to 18GB???
Any idea?
[It's not possible to change sort_area_size or any other parameter in init.ora]
Apart form this: Which would be the best way to clean this temporary tablespace?
ThanksJose, I think you are right and the problem is that Oracle was unable to obtain additional temp tablespace extents for the query since you mention the problem occurred on a query.
The question is was the lack of free temp due to the combination of tasks running at the time or is the plan for the query in question the issue?
If you resubmit the query does the 01652 error re-occur. If it does then I suggest grabbing a copy of the contents of v$sort_usage and resubmitting the query. Monitor the sort usage every 30 seconds, minute, or several minutes depending on how long the query runs before returning the error. This will give you an idea of how much temp space the query wants and maybe why (see following).
Also get the explain plan and see where temp is being used. One query may use multiple allocations of temp space at a time such as one chunk to support hash joins, one to support aggregation, and one to support order by so the total sort space necessary may be a lot more than you would think just based on the result set size.
In the case where the query in question is using too much temp you have to ask if the plan is the issue or if you really need more temp. When the plan is not efficient then converting to using nested loops over hash joins might be one way to eliminate excess temp space usage.
HTH -- Mark D Powell -- -
Greetings,
oracle 10.2.0.4
suse linux 9
we have a group temporary tablespace called ATEMP which contains 9 tablespaces ATEMP01 - ATEMP09
but the in the alert log we have this warning
WARNING: the following temporary tablespaces contain no files.
this condition can occur when a backup controlfile has been restored.
it may be necessary to add files to these tablespace. that can be done using SQL.....
alternatively, if these temporary tablesapces are no longer needed, then
they can be dropped. Empty temporary tablespace: ATEMP
then I was confirmed on this forum after a question that...in this case oracle is using SYSTEM tablespace
as a temporary tablespace and this has a performance impact and the system may hung if SYSTEM tbs gets
full. which I totally agree according to oracle documentation
and my question for today is
how can I show to somebody that the current temp segments are in SYSTEM tablesapce because as I run
the query
SELECT TABLESPACE_NAME,BYTES_USED,BYTES_FREE FROM V$TEMP_SPACE_HEADER;
the return show the tablespaces are ATEMP01,ATEMP02....instead of SYSTEM which was my expectation.
thanksthank you
I just passed the query to the view
select tablespace,contents from v$tempseg_usage
and what I found is
ATEMP02 and TEMPORARY
now what is contradicting for me is that...the alert log is showing as if ATEMP which is a temporary
tablespace group is not having a file and we need to add files to it ...which implies that SYSTEM tablespace
is being used as a residing place for the temp segments but the query returns ATEMP02 as the temporary
tablesapce where temp segment is residing
can you help me reconsile this seemingly confusing scenario -
How to view what is using up the temporary tablespace
Hi all
I am running into a problem - my temporary tablespace is being completely used up.
How would i find out what is using up this? Technically it has enough space to function properly but now we are getting 0 bytes free.
thanks!There is nothing wrong if a temporary tablespace appears as full. It is very normal. I
For more information about temporary tablespace usage query V$SORT_USAGE and V$SORT_SEGMENT .
For more information go to this link
http://asktom.oracle.com/pls/ask/f?p=4950:8:14327914180898764224::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:374218170986 -
How can I purge a temporary tablespace?
How can i purge a temporary tablespace?, its size it's near to 3Gb.
Don't do that. Let it be full. If not enough, create more datafiles (or tempfiles if TEMPORAY TABLESPACE), or extend them.
Yong Huang -
Temporary tablespace not cleared
Hi,
I have a temporary tablespace in one of my Oracle 9i databases that does not ever get cleared of data. I have altered the tablespace to autoextend by a few megabytes each time but I was wondering why a temp tablespace remains full even after all sessions are done. Its grown larger than my datafiles and I need a solution. Any ideas?
Thanks in advance.
James.Hi James,
You need to alter your temporary tablespace with adding a fresh new (small) tempfile, and when done, you need to put your other 'old' tempfiles offline so that you can delete them afterwards.
Your temporary tablespace will not shrink/release the space even when you bounce your DB (the undo tbs will)
Regards,
Thierry -
Hi,
Temporary tablespace is getting full used.
Temp Tablespace details:
Size=110GB
I need to find out that how we can estimate actual size of Temporary tablespace.
Could you please guide me for the same.
Also PGA_AGGREGATE_TARGET is defined as size of 7GB.
Thanks,If you facing the size issue then create another temporary tablespace (lets call it TEMP2).
The next step would be to remove the temporary tablespace you want to resize from being the default temporary tablespace by making TEMP2 the default. perform these activities in off time .
Hope this may help you :)
--neeraj -
Problem on temporary tablespace
Hi all,
I created the temporary tablespace with following command;
create temporary tablespace rbitemp
tempfile 'E:\ORACLE\ORADATA\RBI\RBItemp.tmp' size 100m
autoextend on next 1m maxsize 2000m;
while running the query i received the error
ORA-01652: unable to extend temp segment by 256 in tablespace RBITEMP
Then I add tempfile , now still I receiving the same error.
Thanks in advance.Hi,
This tablespace is only for rbi user.
query is :
select distinct trim(wrk.bd_alcd) as ALCD, wrk.bd_typecd as TypeCD, wrk.bd_forcd as FORCD, wrk.bd_curcd as CURCD,
wrk.bd_councd as COUNCD, wrk.bd_sectcd as SECCD,
wrk.bd_matcd as MATCD, wrk.bd_c_u_cd as C_U_CD, wrk.bd_s_u_cd as S_U_CD,
0 as Org_FCBal,0 as ORG_Bal,case when wrk.bd_type='O' then wrk.bd_fc_bal else 0 end as Main_FCBal,
case when wrk.bd_type='O' then (wrk.bd_fc_bal * nvl(exchg.cer_exchangerate, 1)) else 0 end as main_Bal,
wrk.bd_rs_int,wrk.bd_rs_bal,wrk.bd_fc_int,wrk.bd_fc_bal,
' ' as TrackChangs
from ibs_work_bankdata wrk inner join ibs_org_bankdata org ON org.bd_yrqtr = wrk.bd_yrqtr and org.bd_bkcode=wrk.bd_bkcode and org.bd_forcd = wrk.bd_forcd
and wrk.BD_YRQTR=20044 and wrk.BD_BKCODE ='000'
and wrk.BD_ALCD = '51' and wrk.BD_FORCD ='IN' and wrk.BD_TYPECD = '11'
left join ibs_currencymaster curmst on curmst.cur_code = wrk.bd_curcd
left join ibs_currencyexchangerate exchg on exchg.cer_currencyid = curmst.cur_id
and exchg.cer_yearqtr = 20051 and exchg.CER_ACTIVE=1 union select distinct trim(wrk.bd_alcd) as ALCD, wrk.bd_typecd as TypeCD, wrk.bd_forcd as FORCD, wrk.bd_curcd as CURCD,
wrk.bd_councd as COUNCD, wrk.bd_sectcd as SECCD,
wrk.bd_matcd as MATCD, ' ' as C_U_CD, ' ' as S_U_CD,
0 as Org_FCBal,0 as ORG_Bal,case when wrk.bd_type='O' then wrk.bd_fc_bal else 0 end as Main_FCBal,
case when wrk.bd_type='O' then (wrk.bd_fc_bal * nvl(exchg.cer_exchangerate, 1)) else 0 end as main_Bal,
wrk.bd_rs_int,wrk.bd_rs_bal,wrk.bd_fc_int,wrk.bd_fc_bal,
' ' as TrackChangs
from ibs_work_bankdata wrk inner join ibs_org_bankdata org ON org.bd_yrqtr = wrk.bd_yrqtr and org.bd_bkcode=wrk.bd_bkcode and org.bd_forcd = wrk.bd_forcd
and wrk.BD_YRQTR=20044 and wrk.BD_BKCODE ='000'
and wrk.BD_ALCD = '51' and wrk.BD_FORCD ='IN' and wrk.BD_TYPECD = '11' and wrk.bd_rs_bal>0
left join ibs_currencymaster curmst on curmst.cur_code = wrk.bd_curcd
left join ibs_currencyexchangerate exchg on exchg.cer_currencyid = curmst.cur_id
and exchg.cer_yearqtr = 20051 and exchg.CER_ACTIVE=1 order by main_FCBal
explain plan is:
****************SELECT STATEMENT, GOAL = CHOOSE Cost=51 Cardinality=2 Bytes=314
SORT UNIQUE Cost=52 Cardinality=2 Bytes=314
UNION-ALL
TABLE ACCESS BY INDEX ROWID Object owner=RBI Object name=IBS_ORG_BANKDATA Cost=2 Cardinality=204 Bytes=2856
NESTED LOOPS Cost=26 Cardinality=1 Bytes=157
NESTED LOOPS OUTER Cost=24 Cardinality=1 Bytes=143
NESTED LOOPS OUTER Cost=23 Cardinality=1 Bytes=93
TABLE ACCESS BY INDEX ROWID Object owner=RBI Object name=IBS_WORK_BANKDATA Cost=22 Cardinality=1 Bytes=52
INDEX SKIP SCAN Object owner=RBI Object name=IBS_WORK_BANKDATA_IDX Cost=7 Cardinality=1
TABLE ACCESS FULL Object owner=RBI Object name=IBS_CURRENCYMASTER Cost=1 Cardinality=178 Bytes=7298
TABLE ACCESS FULL Object owner=RBI Object name=IBS_CURRENCYEXCHANGERATE Cost=1 Cardinality=19 Bytes=950
INDEX RANGE SCAN Object owner=RBI Object name=IBS_ORG_BANKDATA_IDX Cost=1 Cardinality=204
TABLE ACCESS BY INDEX ROWID Object owner=RBI Object name=IBS_ORG_BANKDATA Cost=2 Cardinality=204 Bytes=2856
NESTED LOOPS Cost=26 Cardinality=1 Bytes=157
NESTED LOOPS OUTER Cost=24 Cardinality=1 Bytes=143
NESTED LOOPS OUTER Cost=23 Cardinality=1 Bytes=93
TABLE ACCESS BY INDEX ROWID Object owner=RBI Object name=IBS_WORK_BANKDATA Cost=22 Cardinality=1 Bytes=52
INDEX SKIP SCAN Object owner=RBI Object name=IBS_WORK_BANKDATA_IDX Cost=7 Cardinality=1
TABLE ACCESS FULL Object owner=RBI Object name=IBS_CURRENCYMASTER Cost=1 Cardinality=178 Bytes=7298
TABLE ACCESS FULL Object owner=RBI Object name=IBS_CURRENCYEXCHANGERATE Cost=1 Cardinality=19 Bytes=950
INDEX RANGE SCAN Object owner=RBI Object name=IBS_ORG_BANKDATA_IDX Cost=1 Cardinality=204
please help. -
Using temporary tablespaces to improve sort
I have to do a select like "SELECT X FROM ABC ORDER BY X", where X is the primary key, thus, is indexed.
There is more than 80000 records, and its taking more than 10 seconds to get the response....
After creating a temporary tablespace, how do I do a Select using this tablespace?
nullHi everybody
Executing the script utlxplan.sql, and after the script explain.sql, I got the "route" done by the query I need.
The table's name is CADIT. Primary Key cod_cp. The column used for the where clause is familia,indexed with the index IT1.
In the first case, the query was
SELECT COD_CP FROM CADIT
WHERE FAMILIA='600' ORDER BY COD_CP
The plan is this:
OPERATION OPTIONS OBJECT_NAME
SELECT STATEMENT
SORT ORDER BY
TABLE ACCESS BY INDEX ROWID CADIT
INDEX RANGE SCAN IT1
In the second case, the query was SELECT COD_CP FROM CADIT WHERE FAMILIA='600'
The plan is this:
OPERATION OPTIONS OBJECT_NAME
SELECT STATEMENT
TABLE ACCESS BY INDEX ROWID CADIT
INDEX RANGE SCAN IT1
In the third case, the query was SELECT COD_CP FROM CADIT ORDER BY COD_CP
The plan is this:
OPERATION OPTIONS OBJECT_NAME
SELECT STATEMENT
SORT ORDER BY
TABLE ACCESS FULL CADIT
Thus, looking at it, I concluded that no index is used for the SORT operation. Is that correct?
I created another table, named cadit2, with the parameter ORGANIZATION INDEX at the end of the CREATE TABLE command. For that new table, the same query as the first one was much faster. Why?
Thanks
Guillermo Nudelman Hess -
Parallel execution and temporary tablespaces
I have a large long running (1 hour) data warehouse query in a materialized view.
If I parallelize it using the parallel hint then I run out of temporary tablespace.
I've tried creating a bunch of temporary tablespaces and putting them into a temp tablespace group but it still runs out of space. Parallel execution seems to use up way more temp tablespace than sequential execution.
I know it is a very general question, but what are the tips for parallelizing a long running query with respect to temporary tablespace management?
I've tried searching on the interwebs but I don't find anything that addresses this particular issue.And here is the parallel explain plan:
PLAN_TABLE_OUTPUT
Plan hash value: 1293981491
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
| 0 | SELECT STATEMENT | | 81M| 17G| | 19232 (2)| 00:00:01 | | | |
| 1 | TABLE ACCESS BY INDEX ROWID | MART$SC_SCORES | 1 | 13 | | 3 (0)| 00:00:01 | | | |
|* 2 | INDEX UNIQUE SCAN | SSCS_SDCC_FK_I | 1 | | | 2 (0)| 00:00:01 | | | |
| 3 | PX COORDINATOR | | | | | | | | | |
| 4 | PX SEND QC (RANDOM) | :TQ10017 | 81M| 17G| | 19232 (2)| 00:00:01 | Q1,17 | P->S | QC (RAND) |
|* 5 | HASH JOIN RIGHT OUTER BUFFERED | | 81M| 17G| | 19232 (2)| 00:00:01 | Q1,17 | PCWP | |
| 6 | PX RECEIVE | | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,17 | PCWP | |
| 7 | PX SEND BROADCAST | :TQ10014 | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,14 | P->P | BROADCAST |
| 8 | PX BLOCK ITERATOR | | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,14 | PCWC | |
| 9 | INDEX FAST FULL SCAN | I_DWH_ZIP_ZIPCODE_EIDIID | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,14 | PCWP | |
|* 10 | HASH JOIN | | 81M| 16G| | 19218 (2)| 00:00:01 | Q1,17 | PCWP | |
| 11 | JOIN FILTER CREATE | :BF0000 | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,17 | PCWP | |
| 12 | PX RECEIVE | | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,17 | PCWP | |
| 13 | PX SEND HASH | :TQ10015 | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,15 | P->P | HASH |
| 14 | PX BLOCK ITERATOR | | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,15 | PCWC | |
|* 15 | INDEX FAST FULL SCAN | I_DWH_ADDRESS_COMB_ZIP | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,15 | PCWP | |
| 16 | PX RECEIVE | | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,17 | PCWP | |
| 17 | PX SEND HASH | :TQ10016 | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,16 | P->P | HASH |
| 18 | JOIN FILTER USE | :BF0000 | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,16 | PCWP | |
|* 19 | HASH JOIN RIGHT OUTER BUFFERED | | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,16 | PCWP | |
| 20 | PX RECEIVE | | 42M| 409M| | 827 (2)| 00:00:01 | Q1,16 | PCWP | |
| 21 | PX SEND HASH | :TQ10012 | 42M| 409M| | 827 (2)| 00:00:01 | Q1,12 | P->P | HASH |
| 22 | PX BLOCK ITERATOR | | 42M| 409M| | 827 (2)| 00:00:01 | Q1,12 | PCWC | |
| 23 | MAT_VIEW ACCESS FULL | MBI$CMN_ACTION_COST | 42M| 409M| | 827 (2)| 00:00:01 | Q1,12 | PCWP | |
| 24 | PX RECEIVE | | 80M| 14G| | 17549 (1)| 00:00:01 | Q1,16 | PCWP | |
| 25 | PX SEND HASH | :TQ10013 | 80M| 14G| | 17549 (1)| 00:00:01 | Q1,13 | P->P | HASH |
|* 26 | HASH JOIN BUFFERED | | 80M| 14G| | 17549 (1)| 00:00:01 | Q1,13 | PCWP | |
| 27 | PX RECEIVE | | 6312K| 794M| | 7519 (1)| 00:00:01 | Q1,13 | PCWP | |
| 28 | PX SEND HASH | :TQ10010 | 6312K| 794M| | 7519 (1)| 00:00:01 | Q1,10 | P->P | HASH |
|* 29 | HASH JOIN RIGHT OUTER BUFFERED | | 6312K| 794M| | 7519 (1)| 00:00:01 | Q1,10 | PCWP | |
| 30 | VIEW | | 4443K| 80M| | 2125 (2)| 00:00:01 | Q1,10 | PCWP | |
| 31 | HASH GROUP BY | | 4443K| 33M| 158M| 2125 (2)| 00:00:01 | Q1,10 | PCWP | |
| 32 | PX RECEIVE | | 10M| 78M| | 950 (1)| 00:00:01 | Q1,10 | PCWP | |
| 33 | PX SEND HASH | :TQ10007 | 10M| 78M| | 950 (1)| 00:00:01 | Q1,07 | P->P | HASH |
| 34 | PX BLOCK ITERATOR | | 10M| 78M| | 950 (1)| 00:00:01 | Q1,07 | PCWC | |
| 35 | TABLE ACCESS FULL | DWH$PHONE | 10M| 78M| | 950 (1)| 00:00:01 | Q1,07 | PCWP | |
|* 36 | HASH JOIN | | 6312K| 680M| | 5392 (1)| 00:00:01 | Q1,10 | PCWP | |
| 37 | PX RECEIVE | | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,10 | PCWP | |
| 38 | PX SEND HASH | :TQ10008 | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,08 | P->P | HASH |
| 39 | PX BLOCK ITERATOR | | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,08 | PCWC | |
| 40 | INDEX FAST FULL SCAN | PK_DWH_DEBTOR | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,08 | PCWP | |
| 41 | PX RECEIVE | | 6312K| 644M| | 5259 (1)| 00:00:01 | Q1,10 | PCWP | |
| 42 | PX SEND HASH | :TQ10009 | 6312K| 644M| | 5259 (1)| 00:00:01 | Q1,09 | P->P | HASH |
|* 43 | HASH JOIN RIGHT OUTER BUFFERED| | 6312K| 644M| | 5259 (1)| 00:00:01 | Q1,09 | PCWP | |
| 44 | PX RECEIVE | | 3689K| 31M| | 4271 (1)| 00:00:01 | Q1,09 | PCWP | |
| 45 | PX SEND HASH | :TQ10005 | 3689K| 31M| | 4271 (1)| 00:00:01 | Q1,05 | P->P | HASH |
| 46 | VIEW | | 3689K| 31M| | 4271 (1)| 00:00:01 | Q1,05 | PCWP | |
| 47 | HASH GROUP BY | | 3689K| 56M| 84M| 4271 (1)| 00:00:01 | Q1,05 | PCWP | |
| 48 | PX RECEIVE | | 3689K| 56M| | 3653 (1)| 00:00:01 | Q1,05 | PCWP | |
| 49 | PX SEND HASH | :TQ10003 | 3689K| 56M| | 3653 (1)| 00:00:01 | Q1,03 | P->P | HASH |
|* 50 | HASH JOIN | | 3689K| 56M| | 3653 (1)| 00:00:01 | Q1,03 | PCWP | |
| 51 | BUFFER SORT | | | | | | | Q1,03 | PCWC | |
| 52 | PX RECEIVE | | 3 | 21 | | 1 (0)| 00:00:01 | Q1,03 | PCWP | |
| 53 | PX SEND BROADCAST | :TQ10000 | 3 | 21 | | 1 (0)| 00:00:01 | | S->P | BROADCAST |
| 54 | INLIST ITERATOR | | | | | | | | | |
|* 55 | INDEX RANGE SCAN | I_DWH_PAYMENT_TYPE_EIDIID | 3 | 21 | | 1 (0)| 00:00:01 | | | |
| 56 | PX BLOCK ITERATOR | | 28M| 242M| | 3648 (1)| 00:00:01 | Q1,03 | PCWC | |
|* 57 | TABLE ACCESS FULL | DWH$PAYMENT | 28M| 242M| | 3648 (1)| 00:00:01 | Q1,03 | PCWP | |
| 58 | PX RECEIVE | | 6312K| 589M| | 986 (2)| 00:00:01 | Q1,09 | PCWP | |
| 59 | PX SEND HASH | :TQ10006 | 6312K| 589M| | 986 (2)| 00:00:01 | Q1,06 | P->P | HASH |
|* 60 | HASH JOIN | | 6312K| 589M| | 986 (2)| 00:00:01 | Q1,06 | PCWP | |
| 61 | PX RECEIVE | | 2937 | 172K| | 5 (20)| 00:00:01 | Q1,06 | PCWP | |
| 62 | PX SEND BROADCAST | :TQ10004 | 2937 | 172K| | 5 (20)| 00:00:01 | Q1,04 | P->P | BROADCAST |
|* 63 | HASH JOIN BUFFERED | | 2937 | 172K| | 5 (20)| 00:00:01 | Q1,04 | PCWP | |
| 64 | PX RECEIVE | | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,04 | PCWP | |
| 65 | PX SEND HASH | :TQ10001 | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,01 | P->P | HASH |
| 66 | PX BLOCK ITERATOR | | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,01 | PCWC | |
| 67 | TABLE ACCESS FULL | DWH$MANDATOR | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,01 | PCWP | |
| 68 | PX RECEIVE | | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,04 | PCWP | |
| 69 | PX SEND HASH | :TQ10002 | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,02 | P->P | HASH |
| 70 | PX BLOCK ITERATOR | | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,02 | PCWC | |
| 71 | TABLE ACCESS FULL | DWH$PACKAGE | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,02 | PCWP | |
| 72 | PX BLOCK ITERATOR | | 6312K| 228M| | 980 (1)| 00:00:01 | Q1,06 | PCWC | |
| 73 | TABLE ACCESS FULL | DWH$CASE | 6312K| 228M| | 980 (1)| 00:00:01 | Q1,06 | PCWP | |
| 74 | PX RECEIVE | | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,13 | PCWP | |
| 75 | PX SEND HASH | :TQ10011 | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,11 | P->P | HASH |
| 76 | PX BLOCK ITERATOR | | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,11 | PCWC | |
|* 77 | TABLE ACCESS FULL | DWH$ACTION | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,11 | PCWP | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------ -
How can Temporary tablespace flush ?
Hi ,
I have user 0racle 10g on Unix platform.
My temporary tablespae alloways full , if increment tablespace size upto 2GB ,
any way to flush temporary tablespace like as shared pool.
ThanksFirst, you need to find out if your applications need all the space which they are using for the temp, and tune as appropriate.
Second, you may have falled into the trap of using OEM or some other such tool which does not show the 'true' space available in the temp tablespace. Such tools only show the maximum space ever allocated, not the current space allocated (or rather segments). A tool such as DB Console or Grid will show at any point in time the 'true' or current segments allocated. You can also use the scripts below:
SELECT SUM (u.blocks * blk.block_size) / 1024 / 1024 "Mb. in sort segments"
, (hwm.MAX * blk.block_size) / 1024 / 1024 "Mb. High Water Mark"
FROM v$sort_usage u
, (SELECT block_size
FROM DBA_TABLESPACES
WHERE CONTENTS = 'TEMPORARY') blk
, (SELECT segblk# + blocks MAX
FROM v$sort_usage
WHERE segblk# = (SELECT MAX (segblk#)
FROM v$sort_usage)) hwm
GROUP BY hwm.MAX * blk.block_size / 1024 / 1024;
Maybe you are looking for
-
I'm having a problem replacing the hard drive and restoring from a back up!
I only recently upgraded my 2007 (white) MackBook from Leopard to Snow Leopard so I could install the latest version of iTunes and sync my iPhone 5. I borrowed the discs from someone at work (because it's difficult to purchase them form Apple) and th
-
Change reconsilation a/c in vendor master
we want to change reconciliation a/c in vendor master but previously some postings had been made in this account kindly advise how i can transfer these balance from old one to new a/c ( version ECC 6) Thanks in advance, raju
-
Add a line on the Annual Budget by Month
I am working in the Personal Budget Template of Numbers '09. I want to add an additional Income and Expense line on the Annual Budget by Month. The table I made is a copy of the Monthly Expenses Table and I would like the line on the Annual Budget by
-
WLCS 2.0.1 sp2 commercePool failing with demo apps
When I start WLCS, I get the message below after various EJBs are deployed: Wed Sep 27 13:41:36 PDT 2000:<I> <JDBC Pool commercePool> A connection from pool commercePool was tested during reserve with a select count(*) from WLCS_IS_ALIVE and failed:
-
History does not clear on exit
When I exit Firefox and restart it all my history is still present even although I have it set to automatically clear the history when I close the application. In the privacy tab I'm using custom settings for history, I also have the checkbox selecte