How to compress Segment/Table to 1 extent in Oracle 8.0.6?
The best strategy I find to compress a table's extent is to: 1) export the table 2) drop the table 3) import the table.
However, this is proving to be very problematic. When you export a table with constraints=y, it does not include the foreign key constraints on children tables. But, if you drop the table with "cascade constraints" option, all foreign key constraints on these children tables are dropped. There is no way to re-create them when the table is imported.
My export parameters are indexes=y constraints=y grants=y. And, the import parameters are rows=y constraints=y indexes=y grants=y
I came up with an alternate strategy which does not include dropping the table. Using ignore=y on the import would bring the extents down to 2.
Any suggestions?
Thank you,
Tom.
It's simple from the view perspective. What you see in the table is a reflection of the list data. So if your data in the list is setup like you want to show it in the UI you are done.
Conclusion is, that you have to setup the list in a way that it shows the aggregated data. However, this you have to do yourself. No help from the framework here.
Timo
Similar Messages
-
How to find Backend tables for a reports in oracle iSetup
Hi,
We are planning to implement oracle iSetup for our client.
Before that we would like to understand the functionality of iSetup in oracle Apps.
Also from where the report is getting the data.
I mean How is data collected from the backend tables?
How is data presented within Java Pages - for review as well as downloads?
Can anyone please answer my questions.
I would be glad to have ur suggestions.
Thanks,
SatyaHi Satya:
iSetup is a framework which works with a set of functional APIs provided by the respective teams within the E-Business suite. The 'extract' generation collects data from the required tables using these APIs. The reports are generated on these 'extracts' which are snapshots of setup data from an instance at a given point in time. iSetup provides seamless migration and reporting capabilities between one or more instances.
I would like to undestand more about the use case for which you are planning to use iSetup so that I can help you better.
Thanks,
Lokesh -
How to convert database table into xml file
Hi.
How to convert database table into XML file in Oracle HTML DB.
Please let me know.
Thanks.This not really a specific APEX question... but I search the database forum and found this thread which I think will help
Exporting Oracle table to XML
If it does not I suggest looking at the database forum or have a look at this document on using the XML toolkit
http://download-east.oracle.com/docs/html/B12146_01/c_xml.htm
Hope this helps
Chris -
How are the summary tables refreshed
hi all,
Can you please tell me how are the summary tables refreshed. Does the Oracle databse do it or the discoverer server performs the tasksHi,
Discoverer summary tables are stored as materialized views in the database. The database refreshes the MV depending on how the MV refresh has been set up.
Rod West -
How can I add a new column in compress partition table.
I have a compress partition table when I add a new column in that table it give me an error "ORA-22856: CANNOT ADD COLUMNS TO OBJECT TABLES". I had cretaed a table in this clause. How can I add a new column in compress partition table.
CREATE TABLE Employee
Empno Number,
Tr_Date Date
COMPRESS PARTITION BY RANGE (Tr_Date)
PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
PARTITION JUNK Values LESS THAN (MAXVALUE));
Note :
When I create table with this clause it will allow me to add a column.
CREATE TABLE Employee
Empno Number,
Tr_Date Date
PARTITION BY RANGE (Tr_Date)
PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
PARTITION JUNK Values LESS THAN (MAXVALUE));
But for this I have to drop and recreate the table and I dont want this becaue my table is in online state i cannot take a risk. Please give me best solution.Hi Fahed,
I guess, you are using Oracle 9i Database Release 9.2.0.2 and the Table which you need to alter is in OLTP environment where data is usually inserted using regular inserts. As a result, these tables generally do not get much benefit from using table compression. Table compression works best on read-only tables that are loaded once but read many times. Tables used in data warehousing applications, for example, are great candidates for table compression.
Reference : http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_data.html
Topic : When to Use Table Compression
Bug
Reference : http://dba.ipbhost.com/lofiversion/index.php/t147.html
BUG:<2421054>
Affects: RDBMS (9-A0)
NB: FIXED
Abstract: ENH: Allow ALTER TABLE to ADD/DROP columns for tables using COMPRESS feature
Details:
This is an enhancement to allow "ALTER TABLE" to ADD/DROP
columns for tables using the COMPRESS feature.
In 9i errors are reported for ADD/DROP but the text may
be misleading:
eg:
ADD column fails with "ORA-22856: cannot add columns to object tables"
DROP column fails with "ORA-12996: cannot drop system-generated virtual column"
Note that a table which was previously marked as compress which has
now been altered to NOCOMPRESS also signals such errors as the
underlying table could still contain COMPRESS format datablocks.
As of 10i ADD/SET UNUSED is allowed provided the ADD has no default value.
Best Regards,
Muhammad Waseem Haroon
[email protected] -
How to find segments for DB table fields?
Hi,
Please tell me how to know segments for perticular DB table fields.
We can search it manually by looking into the IDoc segment fields
But let me know if any other method is there?Hi Suman,
Go to WE30(Enter Idoc type , click display button) , it will display list of segments, from there we can find the table fields.
Regards,
Vijay -
Segments with many allocated extents
Dear all,
This is regarding the number of allocated extents in any segments.
Our environment is SAP ECC 6.0 in ORACLE (11.2.0.2.0) in AIX.
We are having 2218 allocated extents for table BSIS in the tablespace PSAP<SID>.
The table is 114GB in size and have the default value 2147483645 as max.extents.
Like the same we have around 30 to 40 tables having more than 200 allocated extents.
The CCMS monitoring templates have all these tables in RED for the node 'Most allocated extents in any segment'.
I have tried online reorg for some of these tables and the number of extents gets increased at times.
How can we decrease the number of extents for such tables.
Regards,
KiranKiran,
As others have stated, you do NOT want to waste your time reorganizing a table or index due to the number of extents (most of the type anyway).
First, let's determine what type of tablespaces you have:
sqlplus "/as sysdba"
set lines 132 pages 100
select TABLESPACE_NAME, NEXT_EXTENT, EXTENT_MANAGEMENT, ALLOCATION_TYPE, SEGMENT_SPACE_MANAGEMENT from dba_tablespaces order by 1;
For example here are my tablespaces I have created:
TABLESPACE_NAME NEXT_EXTENT EXTENT_MAN ALLOCATIO SEGMEN
PSAPGLPCAD 524,288,000 LOCAL UNIFORM AUTO
PSAPGLPCAI2 104,857,600 LOCAL UNIFORM AUTO
PSAPMEDD 524,288,000 LOCAL UNIFORM AUTO
PSAPMEDI2 104,857,600 LOCAL UNIFORM AUTO
PSAPSR3 LOCAL SYSTEM AUTO
PSAPSR3701 LOCAL SYSTEM AUTO
PSAPSR3USR LOCAL SYSTEM AUTO
PSAPTEMP 104,857,600 LOCAL UNIFORM MANUAL
PSAPUNDO2 LOCAL SYSTEM MANUAL
PSAPVBFSD2 524,288,000 LOCAL UNIFORM AUTO
PSAPVBFSI2 524,288,000 LOCAL UNIFORM AUTO
PSAPVBOXD 524,288,000 LOCAL UNIFORM AUTO
PSAPVBOXI2 524,288,000 LOCAL UNIFORM AUTO
SYSAUX LOCAL SYSTEM AUTO
SYSTEM LOCAL SYSTEM MANUAL
If your main tablespace PSAPSR3 is LOCALLY managed as shown by the "EXTENT_MANAGEMENT" and the ALLOCATION_TYPE is SYSTEM, then Oracle will determine the NEXT extent sizes and you do not have to worry about it.
Now the reason you don't really have to worry about extents is that when SAP sends a SQL statement, Oracle determines the execution plan and then Oracle will read date by Oracle blocks NOT by extents. So in R/3 the CBO almost always picks an index as the leader and that means we read the root -> branch -> leaf -> table blocks. We do NOT read by this extent and then that extent. Even FULL TABLESCANS are reading block ranges based on the db_file_multiblock_read_count value.
Usually the only time we have EXTENT issues is if the tablespace is of type DICTIONARY instead of LOCAL. A DICTIONARY managed tablespace has a different extent management process (UET$ and FET$). Having too many extents in a DICTIONARY managed tablespace "can" cause performance problems but usually only when you are DBA tasks like reorgs because of how Oracle manages the extents and the locking process for the UET$ and FET$. This does not mean the DICTIONARY managed tablespace are bad, just that we have to keep an eye on the extents.
If your tablespaces are LOCAL then your system is configured properly. If you like, you reorg very large objects into their own tablespaces as I have done, but I do this because of archiving and frequent reorgs to seperate tablespaces so I can just drop the old tablespace. Plus I planned this during a unicode conversion so I don't have to actively manage this over time.
And as a little big more information, when we use LOCALLY MANAGED AUTOALLOCATE type tablespaces, Oracle uses a formula for the extent sizes. That way, this frees up the DBA (usually) from having to maintain extents and such. What Oracle does is create the 1st 15 extents as 64K, then the batch of extents will be at 1 Mb, then 8 Mb, then 64 Mb. That's why the AUTOALLOCATE makes it "easier" for administration. When we create LOCALLY MANGED UNIFORM tablespace, we decide how large each extent will be an every object that is put in that tablespace will have the same extent sizes (good for very large objects).
You can test this with:
create table sapsr3.kiran (t1 number) tablespace psapsr3;
alter table sapsr3.kiran allocate extent;
........ keep adding extents to see how they change over time.
col segment_name format a20
set lines 132 pages 100
select segment_name, extent_id, bytes from dba_extents where segment_name = 'KIRAN' order by extent_id;
So that's the rational behind extents. I hope it helps.
Good luck.
Mike Kennedy -
How do you compress a table ?
Hi 404045 :-)
To compress
ALTER TABLE schema.table_name COMPRESS;
If you change your mind:
ALTER TABLE schema.table_name NOCOMPRESS;
data_segment_compression
The data_segment_compression clause is valid only for heap-organized tables. Use this clause to instruct Oracle whether to compress data segments to reduce disk and memory use. The COMPRESS keyword enables data segment compression. The NOCOMPRESS keyword disables data segment compression.
Note:
The first time a table is altered in such a way that compressed data will be added, all bitmap indexes and bitmap index partitions on that table must be marked UNUSABLE.
See Also:
Oracle9i Database Performance Tuning Guide and Reference for information on calculating the compression ratio and to Oracle9i Data Warehousing Guide for information on data compression usage scenarios
data_segment_compression clause of CREATE TABLE information on creating objects with data segment compression
Regards.
Daniel
Mensaje editado por:
DanielRey -
How to compress a bunch of .java files into a single .jar file?
Hello everyone! I am working on a Chinese segmentation job. Someone offers very excellent
such tool. When I copy his example, I find it imports
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.Token;
import org.apache.lucene.analysis.TokenStream;
import org.mira.lucene.analysis.IK_CAnalyzer;I have downloaded IK_CAnalyzer.jar file which contains org.mira.lucene.analysis.IK_CAnalyzer class.
I find that I need to download lucene, thus I went into the following website
http://lucene.apache.org/#06+May+2008+-+Lucene+Java+2.3.2+availableand downloaded the lucene-2.3.2-src.tar.gz. Aftre unzip, I found all java source files in java directory (and in many other different subdirectories). Now it seems I need to compile all the src files and compress them into a single .jar file while keeping their original hierarchy unchanged
I think I should use jar command and with some additional options.
Can anyone show me how to do that?
Many thanks!
Edited by: aaron9979215 on Jul 12, 2008 5:17 AMThanks for reply, I?ve read that tutorial before I post. Howevver, it do tells how to compress a jar file.
The question I have is how to compile two .java file stored in different packages like
rootPackage-->subPackage-->a.java
rootPackage-->subPackage2-->b.java
I want to compile a,java and b.java both and keep their hierarchy like rootPackage.subPackage.a unchanged. If I directly go into subPackage and compile a.java, I think the hierarchy is changed.
What do you think about it? -
Hi All,
Please help me out..
Where are IDOC segment values are stored.
Segment is a structure.... which is the corresponding tables where segments values are stored.
Kindly if any one have some sample code regarding this...hlep give me....
Also let me know the segment tables.
In my previous thread, I got replies from friends, that for data records, we can use the EDID4-SDATA...
How to pull the values from this field...
Please help me out....
Thanks in advance.
Jaffer Ali.SSay you have an IDoc segment E1EDKA1 you would do this.
DATA: W_E1EDKA1 TYPE E1EDKA1.
MOVE EDID4-SDATA to W_E1EDKA1.
Then you can access the fileds of this structure. -
How to view one table used percentage in sqlplus?
if the table only one record in dba_free_space,then use
'select round(block_id/blocks,4)*100
from dba_free_space
where tablespace_name='xxx'"
could list used percentage,
but one table have many records in dba_free_space,
how to display this table's used percentage?DBA_FREE_SPACE displays free extents in all tablespaces: there is no direct relationship with any given table.
If you want to get free space in a existing table you should use DBMS_SPACE package. Here a a old but nice demo on AskTom. -
hi all,
how can we set the table spaces and extent sizesHi
All the things you can do when you are trying to create a table.
You create a table using SE11.
After that you have assign the fields to the table and later you need to give the technical settings to a table.
Here you need to specify the table size which you call it as Extents.
Table spaces are also defined to a table there itself.
Reward if useful -
How to move segments from one tablespace to another tablespace?
I have created new tablespace now i want to move the old tablespace segments to new one but how?
Please guide
Thanks,
Waheed.If it is Oracle 10g you might consider expdp and impdp and use remap_tablespace. After that you can purge the objects from the old tablespace.
Throught PL/SQL scripting also it is possible.
tables
declare
cursor cursor1 is select table_name from dba_tables where tablespace_name in ('USERDATA1');
begin
for cur1_rec in cursor1 loop
execute immediate 'alter table '||cur1_rec.table_name||' move tablespace userdata2';
end loop;
end;
indexes
declare
cursor cursor1 is select index_name from dba_indexes where tablespace_name in ('USERDATA1');
begin
for cur1_rec in cursor1 loop
begin
execute immediate 'alter index '||cur1_rec.index_name||' rebuild tablespace userdata2';
exception
when others then
null;
end;
end loop;
end;
/ -
Export Issues with Compressed Partition Tables?
We recently partitioned and compressed some large tables. It appears, but I'm not sure yet, that this is causing the export to run extremely slow. The database is at 10.2.0.2 and we are using the exp utility, not datapump. Does anyone know of any known issues with using exp to export compressed, partitioned tables?
can you give more details of the table structure with dbms_metadata if possible, and how you are taking the export please?
did you try to take an sql*trace of the export process to see what is going on behind, this is an introduction if you may need;
http://tonguc.wordpress.com/2006/12/30/introduction-to-oracle-trace-utulity-and-understanding-the-fundamental-performance-equation/ -
How May i verify, table analyzed or not and if yes, when it was done?
How May i verify, table analyzed or not and if yes, when it was done?
SQL> desc user_tables
Name Null? Type
TABLE_NAME NOT NULL VARCHAR2(30)
TABLESPACE_NAME VARCHAR2(30)
CLUSTER_NAME VARCHAR2(30)
IOT_NAME VARCHAR2(30)
PCT_FREE NUMBER
PCT_USED NUMBER
INI_TRANS NUMBER
MAX_TRANS NUMBER
INITIAL_EXTENT NUMBER
NEXT_EXTENT NUMBER
MIN_EXTENTS NUMBER
MAX_EXTENTS NUMBER
PCT_INCREASE NUMBER
FREELISTS NUMBER
FREELIST_GROUPS NUMBER
LOGGING VARCHAR2(3)
BACKED_UP VARCHAR2(1)
NUM_ROWS NUMBER
BLOCKS NUMBER
EMPTY_BLOCKS NUMBER
AVG_SPACE NUMBER
CHAIN_CNT NUMBER
AVG_ROW_LEN NUMBER
AVG_SPACE_FREELIST_BLOCKS NUMBER
NUM_FREELIST_BLOCKS NUMBER
DEGREE VARCHAR2(10)
INSTANCES VARCHAR2(10)
CACHE VARCHAR2(5)
TABLE_LOCK VARCHAR2(8)
SAMPLE_SIZE NUMBER
LAST_ANALYZED DATE
PARTITIONED VARCHAR2(3)
IOT_TYPE VARCHAR2(12)
TEMPORARY VARCHAR2(1)
SECONDARY VARCHAR2(1)
NESTED VARCHAR2(3)
BUFFER_POOL VARCHAR2(7)
ROW_MOVEMENT VARCHAR2(8)
GLOBAL_STATS VARCHAR2(3)
USER_STATS VARCHAR2(3)
DURATION VARCHAR2(15)
SKIP_CORRUPT VARCHAR2(8)
MONITORING VARCHAR2(3)
CLUSTER_OWNER VARCHAR2(30)
DEPENDENCIES VARCHAR2(8)
COMPRESSION VARCHAR2(8)
SQL>
Maybe you are looking for
-
Screen EXITS and Badi's for MM01 t.code
Hai Guru's, I hav a requirment of add a aditional tab in the standard Master 'MM01' T.code. can any one please help me with all possible Screen exits or badi's. Also i want to know weather selecting correct exits depend on the position where we want
-
Cascading List of Values & Query Panel
Hello all! ADF BC JDev 11 I should use Cascading List of Values in Search Query Panel. I build CLOV like in this sample http://www.oracle.com/technology/obe/obe11jdev/11/adfbc_new_features/adfbc.html . But when i use it in Search Query Panel it does
-
Error: could not purchase... there is not enough memory available
Why do I keep getting the error: "Could not purchase... There is not enough memory available?" When I attempt to update any apps I get this error. I have uninstalled and reinstalled iTunes and just checked to see which version I have and it is 11
-
Hi all, how to convert the below query using EXISTS so tht i can give better performance select count(distinct material_no) from ot_raw_demand_plan_stg stg where material_no in (select distinct produced_part from ot_flat_bom bom)
-
I don't understand how to get audio from itunes into my project
i am new to elements but have some basic understanding, but I can't get any audio into my project from itunes, just keep getting an error.