Simple Query on Table with Billions of rows getting ORA-01652 [message #690044] |
Wed, 25 September 2024 13:27 |
wtolentino
Messages: 421 Registered: March 2005
|
Senior Member |
|
|
A simple query on a table with billions of rows is getting an error:
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
TEMP tablespace has 3 datafile and each has a maxsize of 32003mb. Currently no other session is active or is connected to the same database.
This query completes without error:
select count(*) cnt from TRANSACTION_tab;
Please advise thank you.
This query throws an error ORA-01652:
select * from TRANSACTION_tab describe trans_dt desc;
|
|
|
|
|
Re: Simple Query on Table with Billions of rows getting ORA-01652 [message #690047 is a reply to message #690046] |
Wed, 25 September 2024 21:01 |
wtolentino
Messages: 421 Registered: March 2005
|
Senior Member |
|
|
here's the explain plan.
explain plan for select count(*) cnt from TRANSACTION_tab;
Plan hash value: 3371900491
------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 1479K (1)| 00:00:58 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | INDEX FAST FULL SCAN| TRANSACTION_TAB_PK | 1290M| 1479K (1)| 00:00:58 |
------------------------------------------------------------------------------------------
explain plan for select * from TRANSACTION_tab order by trans_dt desc;
Plan hash value: 2017279614
----------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
----------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1290M| 103G| | 39M (1)| 00:25:34 |
| 1 | SORT ORDER BY | | 1290M| 103G| 161G| 39M (1)| 00:25:34 |
| 2 | TABLE ACCESS FULL| TRANSACTION_TAB | 1290M| 103G| | 4562K (1)| 00:02:59 |
----------------------------------------------------------------------------------------------------
note: not the actual table name
|
|
|
|
|
|
|
|
|
|