Storing LOBs in ASSM tablespace
Hello,
I'd like to know if a lob (clob, nlob, etc). can be stored in an ASSM (automatic segment space management) tablespace in Oracle 10g R1.
Thanks!
Gabriel.
Yes ... [Just try it?!?!]
flip@FLOP> select default_tablespace from user_users;
DEFAULT_TABLESPACE
USERS
flip@FLOP> select SEGMENT_SPACE_MANAGEMENT from user_tablespaces where tablespace_name='USERS';
SEGMEN
AUTO
flip@FLOP> create table yes ( c clob );
Table created.
flip@FLOP> select dbms_metadata.get_ddl('TABLE','YES') from dual;
DBMS_METADATA.GET_DDL('TABLE','YES')
CREATE TABLE "FLIP"."YES"
( "C" CLOB
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS"
LOB ("C") STORE AS (
TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
NOCACHE
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
Similar Messages
-
Too many extents for table on locally managed uniform ASSM tablespace
Running Oracle 9.2.0.8 on solaris 10, Enterprise edition.
Tablespace configuration:
select extent_management, allocation_type, segment_space_management, block_size, initial_extent, next_extent
from dba_tablespaces
where tablespace_name = 'PCLARGE';
LOCAL UNIFORM AUTO 8192 2097152 2097152
A nightly peoplesoft SQR job inserts and updates the problem table. The job has been in place without change for four years. During that time, the database moved from 8i to 9i, and the tablespace parameters moved to uniform local ASSM. The job selects from a 70 million row table and then updates the target summary table.
Can somebody help me understand why the number of extents would grow way out of proportion to the number of rows?
When the row count was 9807427, this table had 233 extents.
Row count 10759033, table had 501 extents.
Row count 10764665, table has 1967 extents.
The table is not analyzed since the system is using RULE. DBMS_SPACE.SPACE_USAGE indicates no extents above the high water mark. Running SELECT name,value FROM v$sysstat WHERE name like '%table%' seems to indicate that chained rows are not a factor, since the row with name "table fetch continued row" returns a small amount of rows.
Any ideas? Is it possible there is a bug with ASSM that is causing this?
Unfortunately I don't have detailed extent history information after each nightly run. I just have the 3 data points above.Hi Hemant,
Thanks for your reply! No parallelism was involved in the SQR script.
Oracle support has pointed me to Metalink Note:469985.1: Sudden Increase in Unformatted Blocks. This behavior matches our symptoms. My company is going to pursue a backport, but in the meantime we may need to move data into tablespaces without ASSM.
Best regards,
Ben -
Fragmented free space in empty LMT ASSM tablespace?
select count(*) from dba_extents where file_id=127;COUNT(*)
0
select count(*) from dba_free_space where file_id=127;COUNT(*)
2
select block_id, blocks from dba_free_space where file_id=127;
BLOCK_ID BLOCKS
128 507904
508032 139616
select extent_management, segment_space_management, allocation_type
from dba_tablespaces
where tablespace_name=(select tablespace_name from dba_data_files where file_id=127);EXTENT_MANAGEMENT SEGMENT_SPACE_MANAGEMENT ALLOCATION_TYPE
LOCAL AUTO SYSTEM
alter tablespace ... coalesce;
select count(*) from dba_free_space where file_id=127;COUNT(*)
2
select version from product_component_version where product like 'Oracle%';VERSION
11.2.0.2.0
How is that possible?user5066799 wrote:
Thanks Jonathan, but, sorry - have not got - what do you mean? Do you mean that space management blocks occupy first 128 blocks of datafile or do they occupy blocks after last free extent block? The only management blocks I expect to find are these first 128 blocks (1M) which as I understand are datafile header (was 64K in earlier versions, but in 11.2 is 1M, with 8K results in 128 blocks).
Or do you mean the fact of using autoallocate extent size influences this matter? Should we consider "autoallocate start size" of 64K in relation to something?Your interpretation of what I was saying is correct - but I got the scale wrong, there's a different explanation of what you're seeing.
If you dump the first few blocks of the file, in your case using something like:
alter system dump datafile 129 block min 2 block max 6;you will see that block 2 will be the "file space header block" and the next blocks will be file space bitmap blocks.
Each file space bitmap block (in an 8KB block) loses a couple of hundred bytes to block headers and other control details, then has one bit for each 64KB of the data file, where the 64KB unit is dictated by the autoallocate option
Sample dump:
buffer tsn: 14 rdba: 0x01c00002 (7/2)
scn: 0x0b86.40279c3f seq: 0x01 flg: 0x04 tail: 0x9c3f1d01
frmt: 0x02 chkval: 0x3100 type: 0x1d=KTFB Bitmapped File Space Header
File Space Header Block:
Header Control:
RelFno: 7, Unit: 8, Size: 655360, Flag: 1
AutoExtend: NO, Increment: 0, MaxSize: 0
Initial Area: 126, Tail: 655359, First: 0, Free: 81904
buffer tsn: 14 rdba: 0x01c00003 (7/3)
scn: 0x0b86.40279b45 seq: 0x01 flg: 0x04 tail: 0x9b451e01
frmt: 0x02 chkval: 0x0afb type: 0x1e=KTFB Bitmapped File Space Bitmap
File Space Bitmap Block:
BitMap Control:
RelFno: 7, BeginBlock: 128, Flag: 0, First: 0, Free: 63488
buffer tsn: 14 rdba: 0x01c00004 (7/4)
scn: 0x0b86.40279b47 seq: 0x01 flg: 0x04 tail: 0x9b471e01
frmt: 0x02 chkval: 0xcafb type: 0x1e=KTFB Bitmapped File Space Bitmap
File Space Bitmap Block:
BitMap Control:
RelFno: 7, BeginBlock: 508032, Flag: 0, First: 0, Free: 63488 Note particularly the "Free: 63488" - which is bits, each bit represents 8 blocks for a total of 507904. Allowing for the first 128 blocks in the file this is why the map in block 7/4 has a BeginBlock of 508032.
A single extent in dba_free_extents is, apparently, not allowed to cross a space management block.
Regards
Jonathan Lewis
P.S. Since there are 126 available file space bitmap blocks, and 507904 blocks allowed per bitmap block, then when the file hits 63,995,904 blocks (488.25 GB) Oracle will have to add a secondary space management area. (At least, that's if you grow the file to that size; if you pre-create the tablespace at that something above that size then perhaps Oracle will allocate 2M of file header.)
P.P.S Here's a quote from my errata pages for Practical Oracle 8i: "Allowing for a little overhead, a single 8K block can hold information about 63,488 extents,..." so not a lot has changed in the interim, apart from the fact that the header is now 1MB rather than 64KB - possibly to cater for bigfile tablespaces, possibly to help ASM and Exadata align their extents and AUs.
Edited by: Jonathan Lewis on Dec 7, 2012 6:30 PM -
Migration LONG to LOB in manual space management tablespaces
Hi everyone,
We have Netweaver 7.0 and Oracle 11g and we are considering to migrate our manual tablespaces to ASSM. The first problem we've found is we can't do that online due to the LONG data type. So we decided to migrate LONG to LOB first. Note 835552 says that for Oracle version 11g the conversion is from LONG to SECUREFILE. But we follow seeking notes and in 1426979 (Oracle 11g: SecureFiles - The new way to store LOB data) one of the prerequisites for the conversion is to use ASSM tablespaces.
At this point, we can't migrate (online) to ASSM due to LONG data and neither can migrate to SECUREFILE due to the ASSM.
My question is: is it possible to make the migration from LONG to SECUREFILE specifying in the brspace a new tablespace with ASSM?
Thanks in advanced.Hello
It is in fact possible to reorganize segment to a specific target tablespace using brspace option -n|-newts
brspace -u / -f tbreorg -a long2lob -o sapsr3 -s <source_tablesapce> -t allsel -n <target_tablespace_in_ASSM>
It is odd that in 11g you are not in ASSM, so you upgrade to that version and never performed tablespace reorg ?
620803 - Oracle 9i: Automatic Segment Space Management
The new ASSM function is available as of Oracle Release 9i. As of Oracle 10g, ASSM is already contained in the standard system, and new tablespaces are by default created as ASSM tablespaces.
Regards -
ASSM and table with LOB column
I have a tablespace created with ASSM option. I've heard about that tables with LOB columns can't take the advantage of ASSM.
I made a test : create a table T with BLOB column in a ASSM tablespace. I succeeded!
Now I have some questions:
1. Since the segments of table T can't use ASSM to manage its blocks, what's the actrual approach? The traditional freelists??
2. Will there be some bad impacts on the usage of the tablespace if table T becomes larger and larger and is used frequently?
Thanks in advance.Can you explain what you mean by #1 because I believe it is incorrect and it does not make sense in my personal opinion. You can create a table in an ASSM tablespace that has a LOB column from 9iR2 on I believe (could be wrong). LOBs don't follow the traditional PCTFREE/PCTUSED scenario. They allocate data in what are called "chunks" that you can define at the time you create the table. In fact I think the new SECUREFILE LOBs actually require ASSM tablespaces.
HTH! -
User_lobs and user_segments view shows different tablespace for lob segment
Hi,
I am trying to move lob in different tablespace for partitioned table.
I used
alter table <table_name> move partition <partition_name> lob(lob_column) store as (tablespace <tablespace_name>);
alter index <index_name> rebuild partition <partition_name> tablespace <tablespace_name>
ALTER TABLE <table_name> MODIFY DEFAULT ATTRIBUTES TABLESPACE <tablespace_name>
ALTER INDEX <index_name> modify default ATTRIBUTES TABLESPACE <tablespace_name>
Database - 10.2.0.5
OS- HP Itanium 11.31
I can see in user_lob_partitions, user_segments and user_part_tables shows me new tablespace information
whereas user_lobs and user_part_indexes shows me different information regarding tablespace.
I checked some documents in metalink but didnt help me.
I think that I am missing something or doing some step wrong.
Please help.
SQL> select partition_name, lob_partition_name, tablespace_name from user_lob_partitions where table_name in ('TRB1_PUB_LOG','TRB1_SUB_ERRS','TRB1_PUB_LOG') ;
PARTITION_NAME LOB_PARTITION_NAME TABLESPACE_NAME
S2000 SYS_LOB_P8585 USAGE_REORG_TBS
S2001 SYS_LOB_P8587 USAGE_REORG_TBS
S2003 SYS_LOB_P8589 USAGE_REORG_TBS
S2004 SYS_LOB_P8591 USAGE_REORG_TBS
S2005 SYS_LOB_P8593 USAGE_REORG_TBS
S2006 SYS_LOB_P8595 USAGE_REORG_TBS
S2007 SYS_LOB_P8597 USAGE_REORG_TBS
S2008 SYS_LOB_P8599 USAGE_REORG_TBS
S2010 SYS_LOB_P8601 USAGE_REORG_TBS
S2011 SYS_LOB_P8603 USAGE_REORG_TBS
S2012 SYS_LOB_P8605 USAGE_REORG_TBS
S2013 SYS_LOB_P8607 USAGE_REORG_TBS
S2014 SYS_LOB_P8609 USAGE_REORG_TBS
S2015 SYS_LOB_P8611 USAGE_REORG_TBS
S2888 SYS_LOB_P8613 USAGE_REORG_TBS
S2999 SYS_LOB_P8615 USAGE_REORG_TBS
S3000 SYS_LOB_P8617 USAGE_REORG_TBS
S3001 SYS_LOB_P8619 USAGE_REORG_TBS
S3004 SYS_LOB_P8621 USAGE_REORG_TBS
S3005 SYS_LOB_P8623 USAGE_REORG_TBS
S3006 SYS_LOB_P8625 USAGE_REORG_TBS
S3007 SYS_LOB_P8627 USAGE_REORG_TBS
S3008 SYS_LOB_P8629 USAGE_REORG_TBS
S3009 SYS_LOB_P8631 USAGE_REORG_TBS
S3010 SYS_LOB_P8633 USAGE_REORG_TBS
S3011 SYS_LOB_P8635 USAGE_REORG_TBS
S3012 SYS_LOB_P8637 USAGE_REORG_TBS
S3013 SYS_LOB_P8639 USAGE_REORG_TBS
S3014 SYS_LOB_P8641 USAGE_REORG_TBS
S3015 SYS_LOB_P8643 USAGE_REORG_TBS
S3050 SYS_LOB_P8645 USAGE_REORG_TBS
SMAXVALUE SYS_LOB_P8647 USAGE_REORG_TBS
32 rows selected.
SQL> select TABLE_NAME,COLUMN_NAME,SEGMENT_NAME,TABLESPACE_NAME,INDEX_NAME,PARTITIONED from user_lobs where TABLE_NAME in ('TRB1_PUB_LOG','TRB1_SUB_ERRS','TRB1_SUB_LOG') ;
TABLE_NAME COLUMN_NAME SEGMENT_NAME TABLESPACE_NAME INDEX_NAME PAR
TRB1_SUB_ERRS GENERAL_DATA_C SYS_LOB0006703055C00017$$ TRBDBUS1LNN1 SYS_IL0006703055C00017$$ YES
TRB1_SUB_LOG GENERAL_DATA_C SYS_LOB0006703157C00017$$ TRBDBUS1LNN1 SYS_IL0006703157C00017$$ YES
TRB1_PUB_LOG GENERAL_DATA_C SYS_LOB0006702987C00014$$ TRBDBUS1LNN1 SYS_IL0006702987C00014$$ YES
SQL> SQL> select unique segment_name ,tablespace_name from user_Segments where segment_name in (select SEGMENT_NAME from user_lobs where TABLE_NAME in('TRB1_PUB_LOG','TRB1_SUB_ERRS','TRB1_SUB_LOG') );
SEGMENT_NAME TABLESPACE_NAME
SYS_LOB0006702987C00014$$ USAGE_REORG_TBS
SYS_LOB0006703055C00017$$ USAGE_REORG_TBS
SYS_LOB0006703157C00017$$ USAGE_REORG_TBS
SQL> select unique segment_name ,tablespace_name from user_Segments where segment_name in (select INDEX_NAME from user_lobs where TABLE_NAME in('TRB1_PUB_LOG','TRB1_SUB_ERRS','TRB1_SUB_LOG') );
SEGMENT_NAME TABLESPACE_NAME
SYS_IL0006702987C00014$$ USAGE_REORG_TBS
SYS_IL0006703055C00017$$ USAGE_REORG_TBS
SYS_IL0006703157C00017$$ USAGE_REORG_TBS
SQL> select unique index_name,def_tablespace_name from user_part_indexes where table_name in ('TRB1_PUB_LOG','TRB1_SUB_ERRS','TRB1_SUB_LOG');
INDEX_NAME DEF_TABLESPACE_NAME
SYS_IL0006702987C00014$$ TRBDBUS1LNN1
SYS_IL0006703055C00017$$ TRBDBUS1LNN1
SYS_IL0006703157C00017$$ TRBDBUS1LNN1
TRB1_PUB_LOG_PK USAGE_REORG_IX_TBS
TRB1_SUB_ERRS_1IX USAGE_REORG_IX_TBS
TRB1_SUB_ERRS_1UQ USAGE_REORG_IX_TBS
TRB1_SUB_ERRS_2IX USAGE_REORG_IX_TBS
TRB1_SUB_LOG_1IX USAGE_REORG_IX_TBS
TRB1_SUB_LOG_PK USAGE_REORG_IX_TBS
SQL> select unique def_tablespace_name from user_part_tables where table_name in ('TRB1_PUB_LOG','TRB1_SUB_ERRS','TRB1_SUB_LOG');
DEF_TABLESPACE_NAME
USAGE_REORG_TBS
Please let me know if some more details required.>whereas user_lobs and user_part_indexes shows me different information regarding tablespace.
do you see different results after starting a new session after the ALTER statements were issued? -
User objests stored in which tablespace
Hi,
if we assign two tablespaces to a user with particular quota, in which tablespace user objects are going to store.Hello,
if we assign two tablespaces to a user with particular quota, in which tablespace user objects are going to store. It depends on how you create the User and the Objects.
When you create a User you should always assign a Default Tablespace.
By that way, if you omit to specify the Tablespace when you create a Table / Index to this User, the Table or Index will be created into this Default Tablespace.
Else, if no Default Tablespace is assigned to the User, the Table or Index may be stored into the SYSTEM Tablespace which is not recommended.
So the best practice is to define a Default Tablespace for the User and to specify the Tablespace in the CREATE statement of the Table / Index.
For Objects others than Table or Index (Views, Procedure, Packages,...) their definitions are stored into the SYSTEM Tablespace.
Hope this help.
Best regards,
Jean-Valentin -
Storing and displaying LOB - pdf, images
Hi,
I am using Oracel 10g on Linux.
I need to store pdfs and images and display them using HTMLDB reports and Discoverer reports. the LOBs size vary from 30KB to 1700KB.
Which will be the best way to store these objects. since the sizes are not that big, i was thinking of storing them directly in the database tables instead of storing them externally.
and storing internally in the database, will it be better for a quick retrieval and display of the LOB in the reports.
Can somone guide me and maybe link me to some documents for storing LOB and displaying using HTMLDB and Discoverer.
Thanks,
Philip.Whether you store the documents in the database or not is totally dependent on your requirements (backup, security, etc). As for performance, you may need to test that for yourself once you have it configured.
You may want to walk through this How to Upload and Download Files in an Application. It provides detailed instructions for facilitating what you are looking for in Application Express (formerly HTMLDB). -
Hello members,
I am currently doing maintenance work on a 10.2 application. This has quite a few xmltype columns, and I've noticed one thing;
all of these are created with no considerations given to physical properties. Meaning - among other things - that all are enable storage in row.
I am planning to do something about this, but first I was reading through the lob developers guide (Both 11.2 and 10.2 since we are in our final year of 10g)
Doing this, I came across this little sentence:
TABLESPACE and LOB Index
Best performance for LOBs can be achieved by specifying storage for LOBs in a tablespace different from the one used for the table that contains the LOB. If many different LOBs are accessed frequently, then it may also be useful to specify a separate tablespace for each LOB column or attribute in order to reduce device contention.
Which strikes me as kind of odd, playing the performance card here. It makes me wonder if this is the "Separate Index Table Space" revived?
Or is there more to it? - Is there any reason for separate lob tablespace, and if no performance reason, what then?
Any comments?
Regards
Peter
P.S: I may decide to enjoy my week-end, so I may not follow up right away ;)Hi Peter,
I am reading this link :
http://asktom.oracle.com/pls/asktom/f?p=100:11:3400094338666934::::P11_QUESTION_ID:378418239571
And Sir Thomas's replies :
1.
lobs make sense in their own tablespace since they use a "versioning" scheme that is a little different from table data (they use space very differently)
2.
not just "another tablespace", for a tablespace is for ease of administration, not performance. You could have 100 tablespaces -- all on the same disk (leaving 50 other disks idle) for example.
It is about even IO distribution, not tablespaces.
3.
In general, tablespaces are NOT a performance thing, they are a "make my life as an admin easier" thing. They are a tool you can use to organize data.
A separate tablespace doesn't mean "separate IO system".
by default LOBS are not cached, depending on the size of your lobs - you might look at that detail. By default, when you insert a lob, you wait for the direct IO to the lob segment to complete. By default, when you read a lob, you wait for the direct IO to complete.
4.
A tablespace is a collection of one or more files in general. A tablespace is not a "tuning device" really (just because byte A and byte B are in different tablespaces does NOT mean that bytes A and B are on different devices at all)
So, i think here we get conflict of doc writing with Expert's (not only expert, but Oracle Legend) view.
Regards
Girish Sharma -
Buffer busy waits after cnanging lob storage to oracle securefiles
Hi Everyone
I need help resolving a problem with buffer busy waits in for a lob segment using securefiles for storage.
During the load the application inserts a record into a table with the lob segment and update the record after, populating lob data. The block size on the table space holding the lob is 8 kb and the chunk size on the lob segment is set to 8kb. The average size of the lob record is 6 kb and the minimum size is 4.03 KB. The problem occurs only when running a job with a big number of relatively small inserts (4.03 Kb) in to the lob column . The table definition allow in-row storage and the ptcfree set to 10%. The same jobs runs without problem when using basicfiles storage for the lob column.
According to [oracle white paper |http://www.oracle.com/technetwork/database/options/compression/overview/securefiles-131281.pdf] securefiles have a number of performance enhancements. I was particular interested to test Write Gather Cache as our application does a lot of relatively small inserts into a lob segment.
Below is a fragment from the AWR report. It looks like all buffer busy waits belong to a free list class. The lob segment is located in an ASSM tablespace and I cannot increase freelists.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning option
Host Name Platform CPUs Cores Sockets Memory(GB)
DB5 Microsoft Windows x86 64-bit 8 2 31.99
Snap Id Snap Time Sessions Curs/Sess
Begin Snap: 1259 01-Apr-11 14:40:45 135 5.5
End Snap: 1260 01-Apr-11 15:08:59 155 12.0
Elapsed: 28.25 (mins)
DB Time: 281.55 (mins)
Cache Sizes Begin End
~~~~~~~~~~~ ---------- ----------
Buffer Cache: 2,496M 2,832M Std Block Size: 8K
Shared Pool Size: 1,488M 1,488M Log Buffer: 11,888K
Load Profile Per Second Per Transaction Per Exec Per Call
~~~~~~~~~~~~ --------------- --------------- ---------- ----------
DB Time(s): 10.0 0.1 0.01 0.00
DB CPU(s): 2.8 0.0 0.00 0.00
Redo size: 1,429,862.3 9,390.5
Logical reads: 472,459.0 3,102.8
Block changes: 9,849.7 64.7
Physical reads: 61.1 0.4
Physical writes: 98.6 0.7
User calls: 2,718.8 17.9
Parses: 669.8 4.4
Hard parses: 2.2 0.0
W/A MB processed: 1.1 0.0
Logons: 0.1 0.0
Executes: 1,461.0 9.6
Rollbacks: 0.0 0.0
Transactions: 152.3
Top 5 Timed Foreground Events
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Avg
wait % DB
Event Waits Time(s) (ms) time Wait Class
buffer busy waits 1,002,549 8,951 9 53.0 Concurrenc
DB CPU 4,724 28.0
latch: cache buffers chains 11,927,297 1,396 0 8.3 Concurrenc
direct path read 121,767 863 7 5.1 User I/O
enq: DW - contention 209,278 627 3 3.7 Other
?Host CPU (CPUs: 8 Cores: 2 Sockets: )
~~~~~~~~ Load Average
Begin End %User %System %WIO %Idle
38.7 3.5 57.9
Instance CPU
~~~~~~~~~~~~
% of total CPU for Instance: 40.1
% of busy CPU for Instance: 95.2
%DB time waiting for CPU - Resource Mgr: 0.0
Memory Statistics
~~~~~~~~~~~~~~~~~ Begin End
Host Mem (MB): 32,762.6 32,762.6
SGA use (MB): 4,656.0 4,992.0
PGA use (MB): 318.4 413.5
% Host Mem used for SGA+PGA: 15.18 16.50
Avg
%Time Total Wait wait Waits % DB
Event Waits -outs Time (s) (ms) /txn time
buffer busy waits 1,002,549 0 8,951 9 3.9 53.0
latch: cache buffers chain 11,927,297 0 1,396 0 46.2 8.3
direct path read 121,767 0 863 7 0.5 5.1
enq: DW - contention 209,278 0 627 3 0.8 3.7
log file sync 288,785 0 118 0 1.1 .7
SQL*Net more data from cli 1,176,770 0 103 0 4.6 .6
Buffer Wait Statistics DB/Inst: ORA11G/ora11g Snaps: 1259-1260
-> ordered by wait time desc, waits desc
Class Waits Total Wait Time (s) Avg Time (ms)
free list 818,606 8,780 11
undo header 512,358 141 0
2nd level bmb 105,816 29 0
-> Total Logical Reads: 800,688,490
-> Captured Segments account for 19.8% of Total
Tablespace Subobject Obj. Logical
Owner Name Object Name Name Type Reads %Total
EAG50NSJ EAG50NSJ SYS_LOB0000082335C00 LOB 127,182,208 15.88
SYS SYSTEM TS$ TABLE 7,641,808 .95
Segments by Physical Reads DB/Inst: ORA11G/ora11g Snaps: 1259-1260
-> Total Physical Reads: 103,481
-> Captured Segments account for 224.4% of Total
Tablespace Subobject Obj. Physical
Owner Name Object Name Name Type Reads %Total
EAG50NSJ EAG50NSJ SYS_LOB0000082335C00 LOB 218,858 211.50
....Best regards
Yuri KogunHi Jonathan,
I was puzzled by the number of logical reads as well. This hasn't happened when the lob was stored as a basic fille and I assumed that the database is able to store the records in-row when we switched to securefiles. With regards to ASSM, according to the documentation this is the only option when using securefiles.
We did have high number of HW-enqueue waits in the database when running the test with basic files and had to set 44951 event
alter system set EVENTS '44951 TRACE NAME CONTEXT FOREVER, LEVEL 1024' There are 2 application servers running 16 jobs each, so we should not have more than 32 sessions inserting the data in the same time but I need to check wheter jobs can be brocken to smaller peaces. I that case the number of concurrent session may be bigger. Each session is configured with bundle size of 30 and it will issue commit every 30 inserts.
I am not sure how exactly the code does insert, as I've been told it should be straight insert and update I will be able to check this on Monday.
Below is the extract from the AWR reports with top SQL, I could not find any SQL related to the $TS table in the report. The query to the V$SEGMENT_STATISTICS was executed by me during the job run.
?SQL ordered by Elapsed Time DB/Inst: ORA11G/ora11g Snaps: 1259-1260
-> Resources reported for PL/SQL code includes the resources used by all SQL
statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
into the Total Database Time multiplied by 100
-> %Total - Elapsed Time as a percentage of Total DB time
-> %CPU - CPU Time as a percentage of Elapsed Time
-> %IO - User I/O Time as a percentage of Elapsed Time
-> Captured SQL account for 91.3% of Total DB Time (s): 16,893
-> Captured PL/SQL account for 0.1% of Total DB Time (s): 16,893
Elapsed Elapsed Time
Time (s) Executions per Exec (s) %Total %CPU %IO SQL Id
7,837.5 119,351 0.07 46.4 28.3 .7 2zrh6mw372asz
Module: JDBC Thin Client
update JS_CHANNELDESTS set CHANNELID=:1, DESTID=:2, CHANNELDESTSTATUSDATE=:3, ST
ATUS=:4, BINOFFSET=:5, BINNAME=:6, PAGECOUNT=:7, DATA=:8, SORTORDER=:9, PRINTFOR
MAT=:10, ENVELOPEID=:11, DOCID=:12, CEENVELOPEID=:13, CHANNELTYPE=:14 where ID=:
15
7,119.0 115,997 0.06 42.1 23.1 .2 3vjx93vur4dw1
Module: JDBC Thin Client
insert into JS_CHANNELDESTS (CHANNELID, DESTID, CHANNELDESTSTATUSDATE, STATUS, B
INOFFSET, BINNAME, PAGECOUNT, DATA, SORTORDER, PRINTFORMAT, ENVELOPEID, DOCID, C
EENVELOPEID, CHANNELTYPE, ID) values (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :
11, :12, :13, :14, :15)
85.6 2 42.80 .5 98.3 .0 cc19qha9pxsa4
Module: SQL Developer
select object_name, statistic_name, value from V$SEGMENT_STATISTICS
where object_name = 'SYS_LOB0000082335C00011$$'
35.0 111,900 0.00 .2 74.3 7.6 c5q15mpnbc43w
Module: JDBC Thin Client
insert into JS_ENVELOPES (BATCHID, TRANSACTIONNO, SPOOLID, JOBSETUPID, JOBSETUPN
AME, SPOOLNAME, STEPNO, MASTERCHANNELJOBID, SORTKEY1, SORTKEY2, SORTKEY3, ID) va
lues (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12)
34.9 111,902 0.00 .2 63.0 2.6 a0hmmbjwgwh1k
Module: JDBC Thin Client
insert into JS_CHANNELJOBPROPERTIES (NAME, VALUE, CHANNELJOBID, ID) values (:1,
:2, :3, :4)
29.2 950 0.03 .2 95.9 .1 du0hgjbn9vw0v
Module: JDBC Thin Client
SELECT * FROM JS_BATCHOVERVIEW WHERE BATCHID = :1
?SQL ordered by Executions DB/Inst: ORA11G/ora11g Snaps: 1259-1260
-> %CPU - CPU Time as a percentage of Elapsed Time
-> %IO - User I/O Time as a percentage of Elapsed Time
-> Total Executions: 2,476,038
-> Captured SQL account for 96.0% of Total
Elapsed
Executions Rows Processed Rows per Exec Time (s) %CPU %IO SQL Id
223,581 223,540 1.0 22.4 63.7 .0 gz7n75pf57c
Module: JDBC Thin Client
SELECT SQ_CHANNELJOBPROPERTIES.NEXTVAL FROM DUAL
120,624 120,616 1.0 8.1 99.0 .0 6y3ayqzubcb
Module: JDBC Thin Client
select batch0_.BATCHID as BATCHID0_0_, batch0_.BATCHNAME as BATCHNAME0_0_, batch
0_.STARTDATE as STARTDATE0_0_, batch0_.PARFINDATE as PARFINDATE0_0_, batch0_.PRO
CCOMPDATE as PROCCOMP5_0_0_, batch0_.BATCHSTATUS as BATCHSTA6_0_0_, batch0_.DATA
FILE as DATAFILE0_0_, batch0_.BATCHCFG as BATCHCFG0_0_, batch0_.FINDATE as FINDA
119,351 227,878 1.9 7,837.5 28.3 .7 2zrh6mw372a
Module: JDBC Thin Client
update JS_CHANNELDESTS set CHANNELID=:1, DESTID=:2, CHANNELDESTSTATUSDATE=:3, ST
ATUS=:4, BINOFFSET=:5, BINNAME=:6, PAGECOUNT=:7, DATA=:8, SORTORDER=:9, PRINTFOR
MAT=:10, ENVELOPEID=:11, DOCID=:12, CEENVELOPEID=:13, CHANNELTYPE=:14 where ID=:
15
116,033 223,892 1.9 8.0 92.2 .0 406wh6gd9nk
Module: JDBC Thin Client
select m_jobprope0_.CHANNELJOBID as CHANNELJ4_1_, m_jobprope0_.ID as ID1_, m_job
prope0_.NAME as formula0_1_, m_jobprope0_.ID as ID4_0_, m_jobprope0_.NAME as NAM
E4_0_, m_jobprope0_.VALUE as VALUE4_0_, m_jobprope0_.CHANNELJOBID as CHANNELJ4_4
_0_ from JS_CHANNELJOBPROPERTIES m_jobprope0_ where m_jobprope0_.CHANNELJOBID=:1
115,997 115,996 1.0 7,119.0 23.1 .2 3vjx93vur4d
Module: JDBC Thin Client
insert into JS_CHANNELDESTS (CHANNELID, DESTID, CHANNELDESTSTATUSDATE, STATUS, B
INOFFSET, BINNAME, PAGECOUNT, DATA, SORTORDER, PRINTFORMAT, ENVELOPEID, DOCID, C
EENVELOPEID, CHANNELTYPE, ID) values (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :
11, :12, :13, :14, :15)
115,996 115,996 1.0 15.9 75.0 4.5 3h58syyk145
Module: JDBC Thin Client
insert into JS_DOCJOBS (CREATEDATE, EFFDATE, JURIST, LANG, IDIOM, DD, DDVID, USE
RKEY1, USERKEY2, USERKEY3, USERKEY4, USERKEY5, USERKEY6, USERKEY7, USERKEY8, USE
RKEY9, USERKEY10, USERKEY11, USERKEY12, USERKEY13, USERKEY14, USERKEY15, USERKEY
16, USERKEY17, USERKEY18, USERKEY19, USERKEY20, REVIEWCASEID, ID) values (:1, :2
115,440 115,422 1.0 11.5 63.3 .0 2vn581q83s6
Module: JDBC Thin Client
SELECT SQ_CHANNELDESTS.NEXTVAL FROM DUAL
...The tablespace holding the lob segment has system extent allocation and the number of blocks for the lob segments roughly the same as the number of blocks in allocated extents.
select segment_name, blocks, count (*)
from dba_extents where segment_name = 'SYS_LOB0000082335C00011$$'
group by segment_name, blocks
order by blocks
SEGMENT_NAME BLOCKS COUNT(*)
SYS_LOB0000082335C00011$$ 8 1
SYS_LOB0000082335C00011$$ 16 1
SYS_LOB0000082335C00011$$ 128 158
SYS_LOB0000082335C00011$$ 256 1
SYS_LOB0000082335C00011$$ 1024 120
SYS_LOB0000082335C00011$$ 2688 1
SYS_LOB0000082335C00011$$ 8192 117
SELECT
sum(ceil(dbms_lob.getlength(data)/8000))
from EAG50NSJ.JS_CHANNELDESTS
SUM(CEIL(DBMS_LOB.GETLENGTH(DATA)/8000))
993216
select sum (blocks) from dba_extents where segment_name = 'SYS_LOB0000082335C00011$$'
SUM(BLOCKS)
1104536 Below is the instance activity stats related to securefiles from the AWR report
Statistic Total per Second per Trans
securefile allocation bytes 3,719,995,392 2,195,042.4 14,415.7
securefile allocation chunks 380,299 224.4 1.5
securefile bytes non-transformed 2,270,735,265 1,339,883.4 8,799.6
securefile direct read bytes 1,274,585,088 752,089.2 4,939.3
securefile direct read ops 119,725 70.7 0.5
securefile direct write bytes 3,719,995,392 2,195,042.4 14,415.7
securefile direct write ops 380,269 224.4 1.5
securefile number of non-transfo 343,918 202.9 1.3Best regards
Yuri
Edited by: ykogun on 02-Apr-2011 13:33 -
LOB pctversion vs retention definition
I am trying to understand the difference between pctversion and retention definitions of LOB column.
I am using outline LOB (5.5Kb size) that is stored in ASSM tablespace with UNIFORM size .
If i create a LOB without any settings then default is RETENTION that is derived from UNDO_RETENTION of the instance.
In addition i can see in user_lobs PCTVERSION is set to 10 which is a default value.
The question is what definition is taken precedence RETENTION or PCTVERSION ?
What is the exact meaning of RETENTION inside the LOB definition , does it mean that previous LOB pages are not overwritten for the UNDO_RETENTION period of time ?
My application is running massive update commands against LOB column with very few select statemnets .
I see that my LOB Segment is growing and application is waiting for "enq HW contention" wait.
Thank you
MichaelYes, of course i read the docs but got confused by what is defined in the docs and especially what was not written there.
Oracle documentation does not mention that in ASSM tablespaces LOBS default definition is retention and not pctversion. This information i found in metalink.
My question was when i see both definitions in user_lobs what definition is really taken place.
I have played a little with PCTVERSION by setting it to 100 or to 0.
When i set it to 100 i see that each time i do an update LOB segment allocates new extent and does not overwrite any of already allocated extents in a future.
Test case:
Create table with LOB
In a LOOP update LOB column one by one (all table rows) doing a commit after each update.
The result of this test case with PCTVERSION 0 is that LOB segment is increased by initial value of extents
If at the begining it was 100 extents , after 1 full update it was extended to 200 extents and so on.
The question is for how long time old versions will be kept (please notice that all these old versions are from committed changes) ?
Another question about RETENTION, does it mean that for X sec (defined by UNDO_RETENTION) Oracle is keeping old versions of the LOB without doing overwrite ?
If this is true then this may very quickly lead to significant LOB segment growth.
For example application that performs massive updates on LOBS and UNDO_RETENTION is defined for 12 hours.
The problem here that i can not tune RETENTION period on a LOB level .
Michael -
PDF's storing in Compressed BLOB Securefile doesn't save space
Hello 1 have a Test-table in 10G with 1 LOB-segment of 1700 Mb , 1743 records with PDF's
In 11G 11.1.0.7 i create a table with SCEUREFILE in ASSM tablespace, the table is partitioned.
When 1 insert the 1743 records wioth PDF's the total segmentsize is even 1900 MB...???
Why are my PDF's not more compressed?
CREATE TABLE SNL_SCAN.DOCUMENTEN_LGE
OWNER VARCHAR2(50 BYTE),
COMPANY VARCHAR2(50 BYTE),
SCAN_ID VARCHAR2(50 BYTE) NOT NULL,
DOCUMENT BLOB,
FILENAME VARCHAR2(255 BYTE),
CONTENT_TYPE VARCHAR2(50 BYTE),
ORDER_DATE DATE,
SCAN_DATE DATE,
STATUS VARCHAR2(1 BYTE),
CUSTOM_01 VARCHAR2(50 BYTE),
CUSTOM_02 VARCHAR2(50 BYTE),
CUSTOM_03 VARCHAR2(50 BYTE),
CUSTOM_04 VARCHAR2(50 BYTE),
CUSTOM_05 VARCHAR2(50 BYTE),
CUSTOM_06 VARCHAR2(50 BYTE),
OWNER_ID NUMBER(9) NOT NULL,
SCAN_PLACE_DATE DATE DEFAULT sysdate
TABLESPACE SCAN_DATA
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
PARTITION BY RANGE (SCAN_DATE)
INTERVAL( NUMTOYMINTERVAL(1,'MONTH'))
PARTITION DOCUMENTEN_LGE_200605 VALUES LESS THAN (TO_DATE(' 2006-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
LOGGING
COMPRESS FOR ALL OPERATIONS
TABLESPACE SCAN_DATA
LOB (DOCUMENT) STORE AS SECUREFILE
( TABLESPACE SCAN_DATA
ENABLE STORAGE IN ROW
CHUNK 8192
RETENTION
NOCACHE
COMPRESS HIGH
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
COMPRESS FOR ALL OPERATIONS
NOCACHE
NOPARALLEL
MONITORING
ENABLE ROW MOVEMENT;Hello Sushil,
i have used the securefileperformancepaper.pdf as test doument, i also simplefied the test:
1.
Inserted the pdf into a table:
declare
Dest_loc BLOB;
Src_loc BFILE;
BEGIN
INSERT INTO SNL_SCAN.DOCUMENTEN (scan_id,owner_id, document) VALUES (1,1, EMPTY_BLOB())
RETURNING document INTO Dest_loc;
Src_loc := BFILENAME ('DIR_TESTCASE', 'sec.pdf');
DBMS_LOB.FILEOPEN (Src_loc, DBMS_LOB.LOB_READONLY);
DBMS_LOB.LOADFROMFILE (Dest_loc, Src_loc, dbms_lob.getlength (Src_loc));
DBMS_LOB.FILECLOSE (Src_loc);
INSERT INTO SNL_SCAN.DOCUMENTEN (scan_id,owner_id, document) VALUES (2,2, EMPTY_BLOB())
RETURNING document INTO Dest_loc;
Src_loc := BFILENAME ('DIR_TESTCASE', 'sec.pdf');
DBMS_LOB.FILEOPEN (Src_loc, DBMS_LOB.LOB_READONLY);
DBMS_LOB.LOADFROMFILE (Dest_loc, Src_loc, dbms_lob.getlength (Src_loc));
DBMS_LOB.FILECLOSE (Src_loc);
END;
2.
created table
CREATE TABLE NOCOMP ( a BLOB)
LOB(a) STORE AS SECUREFILE
( CACHE ) ;
inserted 10 documents
10x-----
insert into nocomp
(select document from snl_scan.documenten where scan_id= '1');
commit;
the lobsegment is now 4,19 MB
3.
inserted another 100 rows
the lobsegment is now 42,2 MB
4.
Created table with compressed LOB
CREATE TABLE COMP ( a BLOB)
LOB(a) STORE AS SECUREFILE
( COMPRESS HIGH
CACHE ) ;
inserted 10 documents
10x-----
insert into comp
(select document from snl_scan.documenten where scan_id= '1');
commit;
the lobsegment is now 4,25 MB
inserted another 100 rows
the lobsegment is now 42,2 MB
5.
so there is no compression.
6.
Created table with compressed LOB an DEDUPLICTION
CREATE TABLE COMP_DEDUP ( a BLOB)
LOB(a) STORE AS SECUREFILE
( COMPRESS HIGH
DEDUPLICATE
CACHE ) ;
7,
inserted 10 documents
10x-----
insert into comp
(select document from snl_scan.documenten where scan_id= '1');
commit;
the lobsegment is now 1,25 MB
inserted another 100 rows
the lobsegment is now 1,25 MB
Deduplication is working, compression with the oracle pdf isn't saving any space......
8.
VIEW DBA_LOBS
TABLE_NAME COL SEGMENT_NAME CACHE LOGGING ENCRYPT COMPRESSION DEDUPLICATION IN_ROW FORMAT PARTITIONED SECUREFILE
COMP_DEDUP A SYS_LOB0000107972C00001$$ YES YES NO HIGH LOB YES N/A NO YES
COMP A SYS_LOB0000107981C00001$$ YES YES NO HIGH NO YES N/A NO YES
NOCOMP A SYS_LOB0000107984C00001$$ YES YES NO NO NO YES N/A NO YES
Hope this helps.
Rob Tousain
00 31 6 28660287 -
Can we create new tablespace in Oracle Database 10g Express Edition?
Hi,
Can we create new tablespace in Oracle Database 10g Express Edition instead of using the default "users" tablespace provided?
Please advise.
Thank you.Correct. The sum of all user tablespaces is not allowed to exceed 4 GIG.
You could try shrinking your tablespaces. Theres a script called maxshrink on http://asktom.oracle.com which is useful for this.
You could compress your tables.
If you are storing lobs, you could consider storing them as bfiles.
Or upgrade to Oracle Standard Edition 1. Its not that expensive. -
Dear All ,
I have 10g database on rehl5 .I move table's(T_TRANSACTION_TABLE) tablespace(USERS) to tablespace (IMAGES) .
It completed successfully
MY command is
ALTER TABLE USERS MOVE TABLESPACE IMAGES
and
ALTER INDEX USERS REBUILD TABLESPACE IMAGES
Problem is transaction_images table show using table space IMAGES but store data in USERS table space .
I check this using em->administrator->schema->Table
and i also check DBA_SEGMENT,DBA_EXTENTS both are show tablespace USERS
Note :- 1) This table contain BLOB column for save image .
2) I am also rebuild index also.
Thanks in advance
Shaikh Abdul MoyedA LOB (CLOB or BLOB) can be stored in a different tablespace than the rest of the table. Are you certain that you're looking at the tablespace for the table segment rather than the LOB segment?
If you want to move the LOB segment to a different tablespace
ALTER TABLE <<table name>>
MOVE LOB( <<name of BLOB column>> )
STORE AS( TABLESPACE <<new tablespace>> )Additionally, I'm a bit confused by the DDL you posted
ALTER TABLE USERS MOVE TABLESPACE IMAGES
ALTER INDEX USERS REBUILD TABLESPACE IMAGESYou use USERS as a table name and as an index name in these DDL statements. But then you later talk about the USERS tablespace. I'm guessing that you really put the table name (TRANSACTION_IMAGES) in the ALTER TABLE command and that you used the correct index name in your ALTER INDEX.
Justin -
Advanced Table Compression Create Table with LOBs
Hi,
I need some help with the Advanced Table Compression when creating a table especially when they contain a LOB.
Here are 3 examples:
Exp#1
CREATE TABLE emp (
emp_id NUMBER,
first_name VARCHAR2(128),
last_name VARCHAR2(128)
) COMPRESS FOR OLTP;
This one is ok - all elements are compressed.
Exp#2
CREATE TABLE photos (
photo_id NUMBER,
photo BLOB)
LOB(photo) STORE AS SECUREFILE (COMPRESS LOW);
This one I am confused - is it just the LOB(photo) that is compressed or the whole table. If it is just the LOB then what syntax do I need for the whole table?
I also assume that the LOB is being stored in the default tablespace associated with this table - correct me if I am wrong!
Exp#3
CREATE TABLE images (
image_id NUMBER,
image BLOB)
LOB(image) STORE AS SECUREFILE (TABLESPACE lob_tbs COMPRESS);
This one I am confused - I think it is telling me that LOB(image) is being compresses and stored in tablespace lob_tbs and the other elements are being stored uncompressed in the default tablespace.
Again if it is just the LOB then what syntax do I need for the whole table?
Thanks & regards
-AWelcome to the forums !
Pl post details of OS, database and EBS versions. Pl be aware that Advanced Compression is a separately licensed product. Pl see if these links help
http://blogs.oracle.com/stevenChan/2008/10/using_advanced_compression_with_e-business_suite.html
http://blogs.oracle.com/stevenChan/2008/11/early_benchmarks_using_advanced_compression_with_ebs.html
http://blogs.oracle.com/stevenChan/2010/05/new_whitepaper_advanced_compression_11gr1_benchmar.html
HTH
Srini
Maybe you are looking for
-
Support for multiple pdf document with signature
I have a question about signatures. Does the PDF specification support the combination of multiple pdf documents into one pdf document with the following constraint: - each individual pdf document has been signed (by an X.509 certificate), - the indi
-
How to print from pantech element via Bluetooth?
how to print from my pantech element tablet via bluetooth
-
HELP using print function in Finder
When you right click a selection of Word documents or photos in the finder, I see an option for Print. I thought that if I used this option, the selection would automatically print. Instead, it just opens the application and documents (for example, M
-
Sql server does not exist or access is denied.
Hi, i am trying to connect a dadabase to the server from client pc. and i take the sql error [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied to the client pc. i using .udl file and ia trying to connect with sql auth
-
Mobility group between controller 4400 and virtual wlc
Hello everybody... I read the configuration guide about the 7.3 release. And I figured out that you will need a hash key for establishing a mobility group relation between a controller and a virtual controller. The 7.3 release for the 5500 series wor