Lob Index DDL

Hello

I have developed 1 application where in i Ran SQL advisor tunning to grant some queries and it created many clues.

So now I have to rename these indexes (LOB) to something like table_name_column name so I need to get the metadata in order to check the columns these lob indexes are cerated

But when I ran get ddl statement I do not get the names of columns on which these lob indexes are created.

Example:

SQL > select dbms_metadata.get_ddl('INDEX','SYS_IL0000113826C00055$$','XXI') from double;

DBMS_METADATA. GET_DDL('INDEX','SYS_IL0000113826C00055$$','XXCEMLI')

--------------------------------------------------------------------------------

CREATE A UNIQUE INDEX "XXI". "" SYS_IL0000113826C00055$ $' TO 'XX '. "" (tbs1_MV).

PCTFREE, INITRANS 10 2 MAXTRANS 255

STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)

PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1

USER_TABLES FLASH_CACHE, CELL_FLASH_CACHE DEFAULT DEFAULT)

TABLESPACE "XXI_D".

PARALLEL (INSTANCES OF DEGREE 0 0)

DBMS_METADATA. GET_DDL('INDEX','SYS_IL0000113826C00012$$','XXCEMLI')

--------------------------------------------------------------------------------

CREATE A UNIQUE INDEX "XXI". "" SYS_IL0000113826C00012$ $' ON 'XXCEMLI '. "" (tbs1_MV).

PCTFREE, INITRANS 10 2 MAXTRANS 255

STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)

PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1

USER_TABLES FLASH_CACHE, CELL_FLASH_CACHE DEFAULT DEFAULT)

TABLESPACE "XXI_D".

PARALLEL (INSTANCES OF DEGREE 0 0)

These indices are those that Oracle uses to find the content of the LOB column in the LOB segment when they are stored offline.  They are created and managed automatically by Oracle when you create a LOB column.  There is no need to change the names for those since you'll never use them, only Oracle internally.  In fact, I'm not entirely sure if you can change the name without breaking your BUSINESS.

John

Tags: Database

Similar Questions

  • LOB index segment

    Hi all:
    LOB Index segment not deleted when you delete the table containing the LOB. Is this a beaviour expected?

    1 create the table
    SQL > Create table DemoLob (a number, B clob)
    2 LOB (b) STORE AS lobsegname
    1 j
    4 TABLESPACE datseg
    5 (INDEX) lobindexname
    6 TABLESPACE idxseg
    7)
    4%
    9 TABLESPACE tabseg;

    Table created.

    2 drop table

    3. the DataDictionay query
    SQL > select nom_segment, segment_type, nom_tablespace, bytes/1024/1024 of dba_segments where nom_segment = 'LOBINDEXNAME ';

    NOM_SEGMENT, SEGMENT_TYPE BYTES/1024/1024 NOM_TABLESPACE
    ------------- ------------------ ------------------------------ ---------------
    LOBINDEXNAME LOBINDEX DATSEG.0625


    Thank you
    San ~

    This is because the table is always in the recyclebin. If you use a fall with the purge option or if you are serving the recyclebin then the entry will disappear.

  • LOB index are not deleted when delete a table

    Hello

    I dropped a table with a blob column by running 'drop table table_name ". When I try to recreate, Oracle complained that this object already exists.

    I checked dba_tables, the table disappeared. Then I checked dba_lobs, the lob index is still there with the name of the table and the name of the renamed lob segment in "BIN$ XIlKa53KaoDgRAAUTw8jtg == $0". I have to purge recyclebin. Now, I don't see any line in recyclebin, but business index is still in dba_lobs. As a result, I still can't recreate the table.

    How can I remove the index of business so that I can recreate the table? How am I supposed to drop a table with lob columns so that I no longer experience this problem?

    Thank you.

    user632535 wrote:
    It's the Oracle 10 g.

    I just found the solution. I have flashback the table before the fall, and then performed "drop table t purge. I am able to recreate the table now.

    I tried to imitate this problem, with some variations, 10.2.0.3 and couldn't get the anomaly appears - what is your exact version?

    I think you did your oil change and recreate your in the scheme of the difference, like the purge should make it impossible to do a "flashback table from before the fall." If this isn't the case, then something went wrong with the purge if he hid the table since the return of flame, but not did not fall out of the database.

    Concerning
    Jonathan Lewis
    http://jonathanlewis.WordPress.com
    http://www.jlcomp.demon.co.UK

    "The premature temptation to theories of shape on the lack of data is the scourge of our profession."
    Sherlock Holmes (Sir Arthur Conan Doyle) in "the Valley of fear."

  • What LOB index is really

    Hi friends!

    I have a very simple question. I was a little confused, read the docs on oracle 11g. I don't remember the exact number of topic, but it was working with LOB data types. So in the first statement, they say that when the null value is assigned to a LOB field this field is no clue, is not possible to extract it and use in some plsql block to associate the field with lob data. In the same paragraph, they say that if using empty_blob rather for purposes of initialization, we can get later inside the plsql block and bind it to some data.

    On this subject a bit down the text it is said that there is always a hint of any value has been assigned to the field: null, empty_blob or other. How can it be? If a Web address must be thinking as a pointer, then what region it references after you have created with the emp_LOB method?

    Thank you.

    Timin wrote:
    Please look at the first paragraph and find the note that includes the following:

    A LOB Locator still exists for any instance LOB regardless of the properties of LOB storage or LOB - NULL, empty, or another value.

    I think the confusion is where he uses the word "instance". If you have stored a NULL value in the column, then it isn't actually an instance of a LOB it. Instance exist that once there is an empty lob or a lob with data in it, in which case it will be the lob Locator.

  • Moving the huge LOBs

    Hello

    We have a table with LOB which must be reorg with in the tablespace. These tables have the LOB index.

    These segments are up to 500 GB in size.

    We tried to eat with 15 parallel with nologging option but it takes ages (more than one day) to finish which is not acceptable by our customers.

    Let me know the fast and effective way to do this?

    Thank you

    Yes, you can migrate to a new tablespace using the DBMS_REDEFINITION.

    When you create the temp table, you can specify the new name of the tablespace for the LOB.

    Redef finish makes the exchange table original black and white data dictionary and the interim. The interim table will be your actual table after finishing redef procedure ends successfully

  • tablespace as defined in the model of the index is not used for manually defined indexes

    Hello

    in the 4.0.1.836 version, I defined under model in Modeler, model, physics, use index of preferences / Data (I use the German version, I hope that I have translated correctly) an index template that contains a value for the attribute tablespace.

    For indexes that are generated automatically (as defined in the properties of my model under the generation of index DDL/auto/properties") it works fine. There was a thread on this already Tablespace for the automatically generated index. It works very well. However, for indexes that manually in a table there is no tablespace clause in the generated ddl script generated. Is this a bug or am I missing something?

    Thanks for your help,

    Jochen

    Hello Jochen,

    Yes.  You are right.  For manually defined indexes, the Index model is applied when the Index is created in the first place.  As these properties are in the physical model, it is only effective if the relevant physical model is open when the Index is created in the first place.  The Tablespace defined in the template is applied only if the physical model contains a Tablespace with the same name.

    I guess it's a bit inconsistent for the automatically generated index Tablespace clause is generated when the physical model is not open.

    David

  • Delete tablespace in DDL

    Hello

    Is it possible to delete the terms of STORAGE and a TABLESPACE when displaying tables and index DDL?   I've looked through PREFERENCES and that you do not see the correct options. Please let me know if this is possible.

    Thank you

    Anand

    Tools > Preferences > Database > utilities > Export

    Uncheck the box "Storage".

  • regarding type LOB data...

    I'm not so familiar with LOB and was hoping someone could shed some light for me.

    I am under Oracle 11.2.0.2 EE and made an interesting discovery of this new database I load.

    First of all, I discovered that I have a table which is about 7.4 G, but there two columns LOB that when I have a dba_lobs query, I found that they contains 365 G of lobs and the table itself has 22 G of LOB - don't know what the difference is.
    SQL> 1  select segment_name, round(sum(bytes)/1024/1024/1024,1) as "SIZE" , segment_type
      2  from dba_segments where owner = 'ARADMIN'
      3  group by segment_name, segment_type
      4  having round(sum(bytes)/1024/1024/1024,1) > 1
      5* order by 2
     /
    
    SEGMENT_NAME                                SIZE SEGMENT_TYPE
    -------------------------------- --------------- ------------------
    . . .
    SYS_LOB0000077517C00027$$                    4.2 LOBSEGMENT
    SYS_LOB0000210343C00029$$                    4.4 LOBSEGMENT
    SYS_LOB0000077480C00002$$                    4.6 LOBSEGMENT
    T465                                           5 TABLE
    T2052                                        8.3 TABLE
    T2115                                       12.4 TABLE
    T2444                                       13.4 TABLE
    T2179                                       14.8 TABLE
    T2192                                       21.8 TABLE
    SYS_LOB0000077549C00015$$                    182 LOBSEGMENT   <=== (related to table T2192)
    SYS_LOB0000077549C00016$$                  184.4 LOBSEGMENT  <=== (related to table T2192)
    
    30 rows selected.
    Now, let's look at the table these LOBS belong...
    SQL> select table_name, column_name, segment_name
      2  from dba_lobs
      3  where segment_name in (
      4  select segment_name from dba_segments where owner = 'ARADMIN'
      5   having round(sum(bytes)/1024/1024/1024,1) > 1
      6  group by segment_name
      7  )
      8  /
    
    
    TABLE_NAME                       COLUMN_NAME                      SEGMENT_NAME
    -------------------------------- -------------------------------- --------------------------------
    B1947C536880923                  C536880923                       SYS_LOB0000077310C00002$$
    T2051                            C536870998                       SYS_LOB0000077426C00041$$
    T2052                            C536870987                       SYS_LOB0000077440C00063$$
    T2115                            C536870913                       SYS_LOB0000077463C00009$$
    B2125C536880912                  C536880912                       SYS_LOB0000077480C00002$$
    B2125C536880913                  C536880913                       SYS_LOB0000077483C00002$$
    T2179                            C536870936                       SYS_LOB0000077517C00027$$
    T2192                            C456                             SYS_LOB0000077549C00015$$   <====
    T2192                            C459                             SYS_LOB0000077549C00016$$   <====
    T2444                            C536870936                       SYS_LOB0000210343C00029$$
    T1990                            C536870937                       SYS_LOB0000250271C00026$$
    
    11 rows selected.
    So, in the light of the foregoing, I noticed in the first query that contains the table T2192 21.8 G of LOBS and that C456 and C459 of same table columns (181,7 + 183.9) total = 365.6 G.

    First question is how can the table be only 21.8 G, and business segments the columns of the table of 365,6 G of the Lobs?
    It seems that some type LOB data should be external, while others are part of the table.

    Then, I wonder if a line is removed from the table, would be the LOB associated with this line that is referenced by columns C456 and C459 also deleted.
    Discuss with our senior developer, he said, the table is purged of lines longer than 6 months, but my question is if the LOB is actually purged with the lines.

    Any ideas?

    Published by: 974632 on December 27, 2012 08:05

    The space occupied by business segments is not reported as part of space for table segment, welll, don't not all still. What is reported as part of the size of the table is the size of the lob index (a pointer to the segment of the 'real' job, 16 bytes if I remember correctly) and the LOB that are stored online in the table (those under 4 k). To get the "full" size of the table, you must add the space occupied by the ant lob columns.

    If you delete a line, then the space occupied in the business segments will be defined as free space inside the existing segment. He will thereafter (there are a number of round redo and undo that are managed differently from the lobs), be used by the data for the other lines, but it might take some time.

    There are a number of documents on My Oracle support in this regard, many are related to:

    Troubleshooting Guide (TSG) - large objects (LOBs) [ID 846562.1]

    John

  • Move the LOB to a new tablespace

    I want the users tablespace LOB to some other tablespace. But when I tried I got the error set-aside. I moved all the objects corresponding to the particular schema, but not the LOB. Can you please explain why Cant I move the LOB. And if you can explain that I want to know the importance of the lob indexex. Thank you in advance.

    SQL > select TABLE_NAME, INDEX_NAME, TABLESPACE_NAME from dba_lobs where owner = 'PC_DOM ';

    TABLESPACE_NAME INDEX_NAME TABLE_NAME
    ------------------------------ ------------------------------ ------------------------------
    PCSF_DOMAIN SYS_IL0000077924C00002$ $ USERS
    PCSF_CPU_USAGE_SUMMARY SYS_IL0000077933C00006$ $ USERS
    PCSF_REPO_USAGE_SUMMARY SYS_IL0000077936C00005$ $ USERS
    PCSF_USER SYS_IL0000077940C00002$ $ USERS
    PCSF_GROUP SYS_IL0000077944C00002$ $ USERS
    PCSF_ROLE SYS_IL0000077948C00002$ $ USERS
    PCSF_DOMAIN_USER_PRIVILEGE SYS_IL0000077952C00002$ $ USERS
    PCSF_DOMAIN_GROUP_PRIVILEGE SYS_IL0000077956C00002$ $ USERS

    8 selected lines.

    SQL > alter table PCSF_DOMAIN move lob (SYS_IL0000077924C00002$) store as (tablespace TS_PC_DOM);
    ALTER table PCSF_DOMAIN move lob (SYS_IL0000077924C00002$) store as (tablespace TS_PC_DOM)
    *
    ERROR on line 1:
    ORA-00942: table or view does not exist

    Do not use segment name of LOB but about the name of the column in the table and qualify the name of the table with the owner of the table if you are not logged in as owner of the table:

    Try:

    alter table PC_DOM.PCSF_DOMAIN move lob () store as ( tablespace TS_PC_DOM );
    

    Each LOB column is materialized with 2 segments:
    -a LOB segment containing LOB data
    -a LOB index that is a structure designed to facilitate access to the LOB data in the LOB segment.

    Edited by: P. Forstmann on 22 July. 2011 20:48

    Edited by: P. Forstmann on 22 July. 2011 20:52

  • Should I consider index tablespace too?

    Hello

    We have 6 Tablespaces that represent DATA and 6 other TABLESPACES which represent the INDEX, we db backup using RMAN.

    In order to cover ourself completely against the loss of a single table, I intend to perform the backup of data by Data Pump (expdp/impdp).

    The question I have is... what I have to do an EXPDP of Tablespaces INDEX also? If this isn't the case, then when I go to restore DATA STORAGE spaces on my test server, how can ensure me that the index entries are created automatically in the TS of the INDEX, so that data access is faster?


    Concerning

    Learner

    Dear learner1,

    This thread is going in recovery and the backup policy Manager, but I'll try to address your concerns.

    You can always use the flashback of the Oracle 10 g database feature (if it is already enabled) and you can use the recyclebin in flashback the paintings from before the fall.

    If there is a critical table or diagram of your database, you can use the datapump or the classic export for the operation of separate backup utility. However, as damorgan has already stated that the most reliable way to backup/restore/recover the database is the RMAN. This does not mean that you should not use other means as cold, utility backup etc export.

    You can separate the index and storage of data in your database and when you lost the index tablespace, you can recreate the indexes and storage space if you already have the DDL of the relevant indices. Restoration of databases with the impdp will not recover the index tablespaces because you did not save the front index tablespaces.

    Also, we have an application that uses separate storage for the data and the indexes and I had a problem once with a data index file and he was not very tall, so I simply removed the tablespace, data files, indexes and recreate the tablespace, index and its partitions because I had the index DDL. Of course, this is not connected with storage of data. If you lose the tablespace data, your data is lost and the recovery should be used.

    Hope that helps.

    Ogan

  • Dynamically generate instructions INDEX

    Hello

    I have a requirement for serving data 3 million lines by table for 4 tables. I intend to drop the index before you delete the data in each table and recreate them after the purge.

    I want to dynamically do this IE get the 'create' a few views of the dictionary index statement and then save the DDL in a file. Then, drag the index. Delete data. Run the above mentioned create index DDL.

    Please let me know if it works and if yes, how can I get the create index statement?

    Thank you
    PSES

    SAFRAN wrote:

    Now number one after another :-)...

    Create a script file and add

    THE VALUE 100000 LONG
    SET FEEDBACK OFF
    SET PAGESIZE 0
    SET TRIMSPOOL ON
    TERMOUT OFF SET
    SET LINESIZE 10000
    COIL spoolfile
    select statements
    SPOOL OFF
    OUTPUT

    SY.

    Published by: Solomon Yakobson, January 27, 2010 12:19

  • Size LOB in Oracle

    Hello

    How to find the size of a table containing a LOB in oracle 9i.

    Thank you
    Mariangela

    For each TRADE is created is a LOB segment created and also a type LOB index created: you also have to add this to your query.
    Check with

    select index_name from user_indexes where index_type='LOB';
    
  • Open and close the connection in oracle procedure

    Here is the procedure I'm in I insert data into the table temp_soap_monitoring using the select statement. I have soap_monitoring table FONIC_RETAIL database where I want to take the data and insert into the table temp_soap_monitoring. I play the position of planner of all 5 minutes for this procedure so that I get always the latest data in soap_monitoring@fonic_retail table. The problem of this procedure is that it takes too much cost and the query execution time to perform this procedure. Whenever he tries to extract the data from db link and save my local database. I remember in Java, php, and other programming languages, we have method in order to open the db connection when we tried to extract data from db link and then once integration is complete, we can close the db connection. So the performance improves and also has no load on db link. In this method, we have to assign link db to retrieve the data. So I think is it possible to apply this logic in my oracle procedure. The question arises because at this moment I am hard code the link db, but now I have 3 db more links and I will not reproduce the same procedure by assigning diffferent db links.

    PROCEDURE  "EXT_SOAP_MONITORING" AS

    LAST_SM_ID Number
    := 0;
    LAST_CAPT_DATE DATE
    ;

    BEGIN

    SELECT LAST_TASK_ID INTO LAST_SM_ID FROM CAPTURING where DB_TABLE='TEMP_SOAP_MONITORING';

    insert into TEMP_SOAP_MONITORING(ID,REQUEST_XML,RESPONSE_XML,WEB_SERVICE_NAME,WEB_METHOD_NAME,CREATE_DATE,ERROR_CODE,ERROR_MESSAGE)
    select ID,REQUEST_XML,RESPONSE_XML,WEB_SERVICE_NAME,WEB_METHOD_NAME,CREATE_DATE,ERROR_CODE,ERROR_MESSAGE from
    SOAP_MONITORING
    @FONIC_RETAIL WHERE WEB_SERVICE_NAME ='RatorWebShopService'  and WEB_METHOD_NAME = 'placeShopOrder' and ID > LAST_SM_ID order by ID desc;

    update
    CAPTURING
    set LAST_TASK_ID=
    CASE WHEN ((SELECT MAX(ID) from TEMP_SOAP_MONITORING) IS NULL) AND (LAST_TASK_ID  IS NULL)  THEN (SELECT MAX(ID) from SOAP_MONITORING@FONIC_RETAIL)
    WHEN (SELECT MAX(ID) from TEMP_SOAP_MONITORING) IS NULL THEN LAST_TASK_ID + 1
    ELSE (SELECT MAX(ID) from TEMP_SOAP_MONITORING) END,
    CAPTURING_DATE
    = CURRENT_TIMESTAMP, LAST_CAPTURED_DATE = LAST_CAPT_DATE where DB_TABLE='TEMP_SOAP_MONITORING';

    END EXT_SOAP_MONITORING;

    I have it here is the procedure which I insert data in

    temp_soap_monitoring table by using the select statement. I have

    soap_monitoring table of FONIC_RETAIL database where I want to take the data and insert into the table temp_soap_monitoring.

    WHY? Why you are moving the data? Why not just use it table, is it already?

    The problem of this procedure is that it takes too much cost and the query execution time to perform this procedure.

    The solution is to FIND THE PROBLEM. Troubleshoot the code and find out where is the problem, if any.

    Based SOLELY on what you have posted the solution might be to add just an appropriate index.

    Whenever he tries to extract the data from db link and save my local

    database. I remember in Java, php, and other programming languages, we

    method to open the db connection when we tried to extract data of

    DB link and then once integration is complete, we can close the db

    connection.  So the performance improves and also has no load on db link.

    What? The LAST thing you want to do is keep the closing and opening of the connections. I don't know how 'remember you' from Java or other languages. The main reasons pools of connections were invented to AVOID have to repeatedly open and close connections.

    A db link not a NOT a "charge" - the "charge" is the query is made. If you write a poor query or have a poor data without the necessary index model, or have missing statistics, then you will get poor results.

    In this method, we have to assign link db to retrieve the data. So I have
    is it possible to apply this logic in my oracle procedure to belive. The
    question arises because at the moment, I'm hardcode db link but now I
    have more ties db 3 and I will not reproduce the same procedure by
    assigning diffferent db links.

    You can certainly write Java code to connect to each database with a direct connection. But all write code PL/SQL must include the database link. And the only way to avoid hard-coding the link is to keep the names of link in a table and use dynamic sql statements to build and run the query. This isn't what you want to do if you're looking for performance.

    SELECT LAST_TASK_ID INTO LAST_SM_ID FROM CAPTURING where DB_TABLE='TEMP_SOAP_MONITORING';

    For all we know which could be the WHOLE CAUSE of your problem. If there is no index on the table, you could do a full table to a table with lines scan 800 billion;

    We have NO WAY of knowing since you haven't posted info. Please read the faq to find out how to post a request for tuning and the info you provide.

    1. the query

    2. the table and index DDL

    3. the execution plan

    4 RowCounts for tables and query predicates

    5. the info on the stats: how you collected them and if they are up to date

    update
    CAPTURING set LAST_TASK_ID=
    CASE WHEN ((SELECT MAX(ID) from TEMP_SOAP_MONITORING) IS NULL) AND (LAST_TASK_ID  IS NULL)  THEN (SELECT MAX(ID) from SOAP_MONITORING@FONIC_RETAIL)
    WHEN (SELECT MAX(ID) from TEMP_SOAP_MONITORING) IS NULL THEN LAST_TASK_ID + 1
    ELSE (SELECT MAX(ID) from TEMP_SOAP_MONITORING) END,
    CAPTURING_DATE = CURRENT_TIMESTAMP, LAST_CAPTURED_DATE = LAST_CAPT_DATE where DB_TABLE='TEMP_SOAP_MONITORING';

    My guess is that TERRIBLE method of trying to get a 'LAST ID' is what's causing ALL your problems of performance. This method will not scale, and it will NOT properly work in a multiuser environment.

    You need create a good BATCH_CONTROL table that all processes use during the creation and execution of lots.

    The MASTER of the process batch:

    1 Gets a new BATCH_ID using a sequence

    2 locks the current row in the table control and uses / change the value "last".

    3 creates a new line in the control table for the new batch process

    4. the line of control to date with the start time, end time, result State, County, etc. for the batch

    Your likely PROBLEM of has NOTHING to do with the links of the db.

  • moving to a different database schema (datapump or?)

    Friends and Experts,

    DB: 11 GR 2

    OS: Linux

    (Sorry for the long post but did not give us any information)

    I move a scheme from 1 host to another host-2 schema size is 400 GB.

    I had planned to use datapump since this method I'm more comfortable, export everything, including statistics.

    300 GB partition of a table. (including indexes)

    170 GB of segments like '% TABLE % '.

    Schema has the table to partition table, business segments, lob indexes, indexes, index partitions

    Then he was killed by mistake of snapshot has exported about 250GB of dumpfile.

    Host-1 have only 4 CPU can not really use more than 2 parallel channels in the file export settings, tried using 4 channels and host load reached 10 in a few minutes. Export was killed on the spot to avoid the closure of the host.

    Host-2 is faster, so no, I don't not delay while import.

    We no license for the Golden Gate, but helped advanced compression.

    Problem:

    I started to export but it was so slow that only generated 10 GB/HR, I let him turn to test and it failed after 14 hours with snapshot too old error.

    Not a lot of process runs on the host or the schema, main problem I see is host/drive is slow and not seen in any case to move this huge scheme to another real data base. In the worst case I have the schema lock before the interview for 15 hours and another 10 hours for import or so but I still don't think will end export.

    Issues related to the:

    1. What can be done here to move the schema using datapump?

    2. any other safe method to move the schema? I know that this can be done through transportable tablespace but I have never done this and this is the pattern of production in order to don't want to take the risk.

    3. how anyone with similar project sharing their experience?

    4. any other advice/method/suggestions?

    File export settings:

    DIRECTORY = DATA_PUMP_REFRESH

    DUMPFILE = EXP_01.DBF, EXP_02.DBF

    LOGFILE = EXP_USER1. JOURNAL

    PARALLEL = 2

    SCHEMAS = USER1

    CONTENT = ALL

    Add the parameter parallel and added the size of segments

    You pay conservation discard at least the hour of your longest running query (and ensure that this cancellation can develop that much space).

    Your 'senior' is correct in saying, "we will not do this for the first time in production", but one could say that whatever it is. If there is one, transportable tablespace will probably be the fastest and easiest option.

    Yes, you will still need enough UNDO for a network-link data pump job, but if the writing of the album is the cause of the problem of the speed, the approach of the network link * may * be faster, which means you need less to cancel.

  • Find the size of a table with partitions; Two questions

    DB version: 11.2.0.4

    Platform: Oracle Linux 6.4

    The slot table MH_PKT_HEADR in UTMSBL schema has more than 5000 partitions.

    Because there partitions, you cannot use just view DBA_SEGMENTS to determine the size of the table.

    So, I tried to use 2 SQLs mentioned below. Query1 returned 5 GB. But Query2 has returned a value zero. Query2 is actually a note metalink mentioned below, so he cannot deceive you, I guess.

    That is the reliable accurate query: Query1 or Query2?

    No idea why Query2 returns a Null value?

    - Query1

    fixed lines 200

    Col TABLE_NAME format a18

    with

    BaseData as)

    Select the owner

    nom_segment

    segment_type

    , round (sum (bytes) / 1024/1024/1024) GB

    sum (bytes) bytes

    count (*) segment_count

    of s dba_segments

    Group by owner, nom_segment, segment_type

    )

    ,

    LOB type as data)

    Select the owner

    table_name

    nom_segment

    of dba_lobs

    )

    ,

    all_segs like)

    Select coalesce (lobs.table_name, basedata.segment_name) table_name

    basedata.*

    of basedata

    left outer join

    type LOB data

    on (basedata.segment_name = lobs.segment_name

    and basedata.owner = lobs.owner)

    )

    Select table_name

    sum (bytes) bytes

    sum (gb) GB

    of all_segs

    where table_name = 'MH_PKT_HEADR'.

    and owner = 'UTMSBL. '

    Table_name group;

    TABLE_NAME BYTES GB

    ------------------ ---------- ----------

    5869469696 5 MH_PKT_HEADR

    - Request 2

    -Source: how to calculate the size of a Table that contains outline CLOB and BLOB (Doc ID 118531.1()

    SELECT

    (SELECT SUM (S.BYTES) - the Segment of Table size

    FROM DBA_SEGMENTS S

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (S.SEGMENT_NAME = UPPER ('MH_PKT_HEADR'))) +

    (SELECT SUM (S.BYTES) - the size of the Lob Segment

    FROM DBA_SEGMENTS S, DBA_LOBS L

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (L.SEGMENT_NAME = S.SEGMENT_NAME AND L.TABLE_NAME = UPPER('MH_PKT_HEADR') AND L.OWNER = UPPER('UTMSBL'))) +

    (SELECT SUM (S.BYTES) - the size of the Lob Index

    FROM DBA_SEGMENTS S, DBA_INDEXES I

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (I.INDEX_NAME = S.SEGMENT_NAME AND I.TABLE_NAME = UPPER('MH_PKT_HEADR') AND INDEX_TYPE = 'LOB' AND I.OWNER = UPPER('UTMSBL')))

    "TOTAL TABLE SIZE.

    FROM DUAL;

    TOTAL TABLE SIZE

    ----------------

    SELECT

    (SELECT nvl (SUM (S.BYTES), 0)-dimensions of the Segment Table)

    FROM DBA_SEGMENTS S

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (S.SEGMENT_NAME = UPPER ('MH_PKT_HEADR'))) +

    (SELECT nvl (SUM (S.BYTES), 0)-Segment Lob size)

    FROM DBA_SEGMENTS S, DBA_LOBS L

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (L.SEGMENT_NAME = S.SEGMENT_NAME AND L.TABLE_NAME = UPPER('MH_PKT_HEADR') AND L.OWNER = UPPER('UTMSBL'))) +

    (SELECT nvl (SUM (S.BYTES), 0)-size of the Lob Index)

    FROM DBA_SEGMENTS S, DBA_INDEXES I

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (I.INDEX_NAME = S.SEGMENT_NAME AND I.TABLE_NAME = UPPER('MH_PKT_HEADR') AND INDEX_TYPE = 'LOB' AND I.OWNER = UPPER('UTMSBL')))

    "TOTAL TABLE SIZE.

    FROM DUAL;

    David Fitzjarrell

Maybe you are looking for