Coalesce free space in blocks

Hi
Assume I insert a row into the block and there are small free spaces inside the block.
Does oracle automatically coalesce the free spaces in the block for my new row ?

Assume I insert a row into the block and there are small free spaces inside the block.If there is small free space inside the block the row will be inserted into new block. The block will allocated from the free list of the tablespace for that table. If the records are freed from the block such as delete than PCTFREE and PCTUSED comes into account. PCTFREE is limitation upto which the block should be free and PCTUSED is the pecentage of space upto which the blocks to be used.
Does oracle automatically coalesce the free spaces in the block for my new row ?Free spaces are not coalesced from blocks its from the extents of the table. If there is free blocks before HWM(High Water Mark) then the block is allocated to new row.
Thanks.
Edited by: virendra.k on Aug 1, 2009 4:20 PM

Similar Messages

  • How SMON coalesces free space in oracle 9i and 10g

    how SMON coalesces free space in oracle 9i and 10g?
    Is it doing same as it was behaving in oracle 7 like looking through free extent table every five minutes (sys.fet$) to see if there are any adjacent free extents that can be coalesced into a single extent, and on every 25th cycle (i.e. every two hours and five minutes) it looks at the segment table (sys.seg$) to see if there are any temporary segments that need to be eliminated, as explained by jonathan lewis?
    what are extent and segment tables available in oracle 9i and 10g like sys.fet$ and sys.seg$ in oracle7?

    >
    how SMON coalesces free space in oracle 9i and 10g?
    Is it doing same as it was behaving in oracle 7 like looking through free extent table every five minutes (sys.fet$) to see if there are any
    adjacent free extents that can be coalesced into a single extent, and on every 25th cycle (i.e. every two hours and five minutes) it looks
    at the segment table (sys.seg$) to see if there are any temporary segments that need to be eliminated, as explained by jonathan lewis?
    what are extent and segment tables available in oracle 9i and 10g like sys.fet$ and sys.seg$ in oracle7?I think you need to go and have a look at the Oracle 9i documentation here
    http://www.oracle.com/technology/documentation/oracle9i_arch_901.html
    and automatic segment management in 10g
    http://www.oracle.com/technology/pub/articles/10gdba/week15_10gdba.html
    HTH.
    Paul...
    Software - OS (+ version), Server,
    Hardware - CPU + Disk configuration.
    Please include all of the above information with database queries.
    This will help those who are trying to help you!
    Furthermore, please do not top-post and do try to trim your replies!

  • Oracle 11g - How to repair block corruption(on free space) in datafile

    Hi,
    I have a tablesopace with 3 datafiles, out of which one datafile has corrupted block. But no objects or data is affected as the corrupted block os in free space. This was shown in the alert logs.
    Please see below the details:
    Wed Apr 06 15:30:04 2011
    SMON: Restarting fast_start parallel rollback
    SMON: ignoring slave err,downgrading to serial rollback
    ORACLE Instance geooap (pid = 12) - Error 1578 encountered while recovering transaction (10, 6) on object 149755.
    Errors in file f:\oracle11g\diag\rdbms\geooap\geooap\trace\geooap_smon_5540.trc:
    ORA-01578: ORACLE data block corrupted (file # 7, block # 54053)
    ORA-01110: data file 7: 'F:\ORACLE11G\ORADATA\GEOOAP\ORDER_DATA_01.DBF'
    GEOAP:
    Fri Apr 01 14:57:48 2011
    Errors in file f:\oracle11g\diag\rdbms\geop\geop\trace\geop_arc1_2156.trc:
    ORA-00235: control file read without a lock inconsistent due to concurrent update
    Fri Apr 01 14:57:58 2011
    ================================================================
    The corruption is being reported in a free space block of the ORDER_DATA_01.DBF.
    I’ve checked all the tables (and indexes) in this tablespace and none report corruption.
    =====================================================Is there any action I need to take to remove corruption at this point?It is not affected any operation on the database yet.
    What is the best way to do get rid of the corrupt block, without dropping and rebuillding the full tablespace(which is around 6 GB -total of 3 datafiles)
    Thanks a lot

    Can RMAN recover the datablock from this cold backup(which is a week old, the data file was not corrupted then) ?Please note that to do the recovery, you would need the backup and the archivelog files since the backup. Think about what you are asking to do. Its a single block whose recovery you are asking from a week old backup which obviously would be on an much older SCN compared to the rest of the database. How would you make that block consistent with the rest of the datafile. If you don't have archivelog in that db whose block is corrupted, you may forget that block and any data that it might ever had. Also, please read the documentation about the block recovery which explains the requirements very clearly,
    http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmblock.htm#BRADV89784
    From the above link, 1st point,
    The target database must run in ARCHIVELOG mode and be open or mounted with a current control file.HTH
    Aman....

  • Block corruption in Free Space

    Hi,
    Environment:-
    Oralce 10.2.0
    Windows platform
    I am facing problem of Logical block corruption.
    RMAN validate block corruption (DBVerify as well) But no entry in Alert log file.
    When I check Which segment has block corruption I found that block corruption are in free blocks of tablespace (DBA_FREE_SPACE).
    To Fix it I create table and allocate corrupted block to that table. I confirm corrupted block allocation in table (using DBA_EXTENTS).
    But when I insert rows in that table to reuse corrupted block Oracle give error of ora-1578 Block corruption, and I am not able to reuse corrupted block(as many expert suggest to overcome block corruption in free space).
    I dropped table and recreate and repeat this process many times but still no success.
    So. can anybody help me on this.
    I appreciate your efforts and time you spend to read this
    Thanks

    Hello,
    Please check the link i posted.
    Example: Detecting Corruption
    The CHECK_OBJECT procedure checks the specified object, and populates the repair table with information about corruptions and repair directives. You can optionally specify a range, partition name, or subpartition name when you want to check a portion of an object.
    Validation consists of checking all blocks in the object that have not previously been marked corrupt. For each block, the transaction and data layer portions are checked for self consistency. During CHECK_OBJECT, if a block is encountered that has a corrupt buffer cache header, then that block is skipped.
    The following is an example of executing the CHECK_OBJECT procedure for the scott.dept table.
    SET SERVEROUTPUT ON
    DECLARE num_corrupt INT;
    BEGIN
    num_corrupt := 0;
    DBMS_REPAIR.CHECK_OBJECT (
    SCHEMA_NAME => 'SCOTT',
    OBJECT_NAME => 'DEPT',
    REPAIR_TABLE_NAME => 'REPAIR_TABLE',
    CORRUPT_COUNT => num_corrupt);
    DBMS_OUTPUT.PUT_LINE('number corrupt: ' || TO_CHAR (num_corrupt));
    END;
    SQL*Plus outputs the following line, indicating one corruption:
    number corrupt: 1

  • Block Corruption In Free Space Chuck Of A Datafile

    Hi all,
    I have run into this issue where both dbv and rman have caught a block corruption on one of the datafiles. When I checked these blocks, they did not belong to any segments and I was able to verify that this block ID falls in the block_id + blocks range in the dba_free_space where file_id = 41.
    My questions are ...
    - why is rman complaining about a bad block in free space? It will never need to back it up any way?
    - According to note 28814.1, this type of corruption can be ignored and if when oracle needs to use this block, it will simply create/rewrite a new image without the corrupted data. Have you been affected by this issue? If yes, what did you do?
    Thank you

    1. "why is rman complaining about a bad block in free space? It will never need to back it up any way?"
    Because it is doing its job.
    2. "Have you been affected by this issue? If yes, what did you do?"
    In what version? I generally find it helpful to read the docs and check discussions of issues on metalink.

  • Blocks have much more free space specified by pctfree moved off freelist.

    We have a table with pctfree=0 and pctused=90 and experienced high session against it. During the high session, we saw lots of "read by other session", cbc chain, and "buffer busy wait" caused by the same sql (INESRT). The row size of of an average 4K with long raw. After got the block info for the "read by other session" and "buffer busy wait", I dumped the block. The strange thing is that all the of blocks dumped are not in the freelist and the available free space is over 1K.
    My idea is: When the session named waiting_a experienced "read by other session" to find the block to insert data, that block must be in the freelist, otherwise the waiting_a wouldn't try to read it in buffer and wouldn't be waiting for it to be ready. Very shortly other session reading_b which was reading the block put the data in buffer and did the insert operation, and the reading_b completed its work of insert. My dump should be after reading_b completed. So the dumped block should contain the data inserted by reading_b. After that the block was got off from freelist.
    But why blocks with 0x520 (1312)and 0x104c (4172) freespace got off from freelist? As pctuse is 90, a block will be got off from freelist when free space is less than 10% of the block size, and these two blocks have much more freespace.
    TEST-prod-test$> grep tosp TEST_ora_23095.trc
    tosp=0x2a2
    tosp=0x104c
    tosp=0x520
    TEST-prod-TEST$> grep avsp TEST_ora_23095.trc
    avsp=0x2a2
    avsp=0x104c
    avsp=0x520
    TEST-prod-test$> grep flg TEST_ora_23095.trc
    scn: 0x0328.47520b02 seq: 0x02 flg: 0x04 tail: 0x0b020602
    seg/obj: 0x14e05  csc: 0x328.47520b02  itc: 1  flg: -  typ: 1 - DATA
    scn: 0x0328.47520f41 seq: 0x02 flg: 0x04 tail: 0x0f410602
    seg/obj: 0x14e11  csc: 0x328.47520f41  itc: 1  flg: -  typ: 1 - DATA
    scn: 0x0328.4752153a seq: 0x02 flg: 0x04 tail: 0x153a0602
    seg/obj: 0x14e0d  csc: 0x328.4752153a  itc: 1  flg: -  typ: 1 - DATA

    knowing Oracle specifically warns against using multiple blocksizes
    Nope.  Oracle does not warn against using multiple blocksizes, anywhere in the documentation.
    The only warnings I've seen (By Daniel Morgan, and unverified) claims that Oracle was negligent and only tested the SQL optimizer with an 8k blocksize.
    I'm not sure that this is true, since it would constitute misfeasance.
    I know that Oracle does extensive tesing on their new features, and the docs offer the multiple blocksize feature without reservation.
    Uisng multiple blocksizes is a well established, proven concept.
    DBA's have been using them for decades with IMS, IDMS and DB2 before Oracle came along.
    I first saw multiple blocksized used with great success in the 1980's, and they are still in use today on many large databases.
    provide a measurable idea what 'lots' constitute, and how much I/O is reduced in the shops you saw?There is load of verifiable evidence out there:
    http://www.google.com/search?&q=site%3Awww.tpc.org+db_16k_cache_size
    This UNISYS Oracle benchmark used multiple blocksizes to achieve optimal performance
    db_cache_size = 4000M
    db_recycle_cache_size = 500M
    db_8k_cache_size = 200M
    db_16k_cache_size = 4056M
    db_2k_cache_size = 35430M
    http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP100883
    The IBM Oracle Technical Brief titled "Oracle Architecture and Tuning on AIX" (November 2006) notes that careful evaluation is required before implementing multiple blocksizes:
    While most customers only use the default database block size, it is possible to use up to 5 different database block sizes for different objects within the same database.
    Having multiple database block sizes adds administrative complexity and (if poorly designed and implemented) can have adverse performance consequences. Therefore, using multiple block sizes should only be done after careful planning and performance evaluation.
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:4123909781200375285::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,46757.1,1,1,1,helvetica
    Metalink Note:46757.1 titled "Notes on Choosing an Optimal DB BLOCK SIZE" says that there are some benefits from having larger blocksizes

  • How to find block free space  and PCTUSED FOR THE TABLE

    HI all,
    Due to performance issues for my database , my management ask me to reset the PCTUSED and PCTFREE values , and my doubt is
    1)How to find the current PCTUSED and PCTFREE values.
    2)How to find block free space and PCTUSED FOR THE TABLE.
    Please help me out regarding this.
    Regards,
    Vamsi.

    1)version is 10.2.0.4
    2)output of query
    tablespace extent_management allocation_type segment_space_management
    SYSTEM     LOCAL     SYSTEM     MANUAL
    UNDOTBS1     LOCAL     SYSTEM     MANUAL
    SYSAUX     LOCAL     SYSTEM     AUTO
    TEMP     LOCAL     UNIFORM     MANUAL
    USERS     LOCAL     SYSTEM     AUTO
    UNDOTBS2     LOCAL     SYSTEM     MANUAL
    INS     LOCAL     SYSTEM     AUTO
    CONFTBS     LOCAL     SYSTEM     AUTO
    REINS     LOCAL     SYSTEM     AUTO
    ANALYST     LOCAL     SYSTEM     AUTO
    BI     LOCAL     SYSTEM     AUTO
    INTRFC     LOCAL     SYSTEM     AUTO
    COGNOS     LOCAL     SYSTEM     AUTO
    TS_INDX     LOCAL     SYSTEM     AUTO
    TS_CHOLAWEB     LOCAL     SYSTEM     AUTO
    TS_DASBOARD     LOCAL     SYSTEM     AUTO

  • 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

  • Find the free space of autoextensible enabled tablespaces

    Hi All,
    I need to create a shell script to find the free space of an autoextensible tablespaces and send an alert when the free space is < 700MB.
    I tried checking with the dba_free_space, but I did not get the exact free space.
    Can someone tell me the logic to find the exact free space of autoextensible enabled tablespaces?
    Thanks,
    VBK

    You may want to look into dba_free_space_coalesced table.
    SQL> desc dba_free_space_coalesced;
    Name                                      Null?    Type
    TABLESPACE_NAME                                    VARCHAR2(30)
    TOTAL_EXTENTS                                      NUMBER
    EXTENTS_COALESCED                                  NUMBER
    PERCENT_EXTENTS_COALESCED                          NUMBER
    TOTAL_BYTES                                        NUMBER
    BYTES_COALESCED                                    NUMBER
    TOTAL_BLOCKS                                       NUMBER
    BLOCKS_COALESCED                                   NUMBER
    PERCENT_BLOCKS_COALESCED                           NUMBERTablespace Name - Name of tablespace
    Total Extents - Total number of free extents in tablespace
    Extents Coalesced - Total number of coalesced free extents in tablespace
    % Extents Coalesced - Percentage of coalesced free extents in tablespace
    Total Bytes - Total number of free bytes in tablespace
    Bytes Coalesced - Total number of coalesced free bytes in tablespace
    Total Blocks - Total number of free oracle blocks in tablespace
    Blocks Coalesced - Total number of coalesced free Oracle blocks in tablespace
    % Blocks Coalesced - Percentage of coalesced free Oracle blocks in tablespace
    so for getting the usage you can query like
    select     a.TABLESPACE_NAME,
      2     a.BYTES bytes_used,
      3     b.BYTES bytes_free,
      4     b.largest,
      5     round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used
      6  from
      7     (
      8             select  TABLESPACE_NAME,
      9                     sum(BYTES) BYTES
    10             from    dba_data_files
    11             group   by TABLESPACE_NAME
    12     )
    13     a,
    14     (
    15             select  TABLESPACE_NAME,
    16                     sum(BYTES) BYTES ,
    17                     max(BYTES) largest
    18             from    dba_free_space
    19             group   by TABLESPACE_NAME
    20     )
    21     b
    22  where      a.TABLESPACE_NAME=b.TABLESPACE_NAME
    23  order      by ((a.BYTES-b.BYTES)/a.BYTES) desc
    24  ;I think this is what you were asking.

  • Logical Volume Group and Logical Partition not matching up in free space

    I was dual booting Windows 7 and Mountain Lion. Through Disk Utility, I removed the Windows 7 Partition and expanded the HFS+ partition to encompass the entire hard drive. However, the Logical Volume Group does not think that I have that extra free space. The main problem is that I cannot resize my partition. I am wanting to dual boot Ubuntu with this. Any ideas? Any help is appreciated. I will post some screenshots with the details. Furthermore, here are some terminal commands I ran: /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *250.1 GB disk0
    1: EFI 209.7 MB disk0s1
    2: Apple_CoreStorage 249.2 GB disk0s2
    3: Apple_Boot Recovery HD 650.0 MB disk0s3
    /dev/disk1
    #: TYPE NAME SIZE IDENTIFIER
    0: Apple_HFS MAC OS X *248.9 GB disk1 Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on
    /dev/disk1 243031288 153028624 89746664 64% 38321154 22436666 63% /
    devfs 189 189 0 100% 655 0 100% /dev
    map -hosts 0 0 0 100% 0 0 100% /net
    map auto_home 0 0 0 100% 0 0 100% /home CoreStorage logical volume groups (1 found)
    |
    +-- Logical Volume Group 52A4D825-B134-4C33-AC8B-39A02BA30522
    =========================================================
    Name: MAC OS X
    Size: 249199587328 B (249.2 GB)
    Free Space: 16777216 B (16.8 MB)
    |
    +-< Physical Volume 6D7A0A36-1D86-4A30-8EB5-755D375369D9
    | ----------------------------------------------------
    | Index: 0
    | Disk: disk0s2
    | Status: Online
    | Size: 249199587328 B (249.2 GB)
    |
    +-> Logical Volume Family FDC4568F-4E25-46AB-885A-CBA6287309B6
    Encryption Status: Unlocked
    Encryption Type: None
    Conversion Status: Converting
    Conversion Direction: backward
    Has Encrypted Extents: Yes
    Fully Secure: No
    Passphrase Required: No
    |
    +-> Logical Volume BB2662B7-58F3-401C-B889-F264D79E68B4
    Disk: disk1
    Status: Online
    Size (Total): 248864038912 B (248.9 GB)
    Size (Converted): 130367356928 B (130.4 GB)
    Revertible: Yes (unlock and decryption required)
    LV Name: MAC OS X
    Volume Name: MAC OS X
    Content Hint: Apple_HFS

    Here is another try via the command line:
    dhcp-10-201-238-248:~ KyleWLawrence$ diskutil coreStorage resizeVolume BB2662B7-58F3-401C-B889-F264D79E68B4 210g
    Started CoreStorage operation
    Checking file system
    Performing live verification
    Checking Journaled HFS Plus volume
    Checking extents overflow file
    Checking catalog file
    Incorrect block count for file 2012.12.11.asl
    (It should be 390 instead of 195)
    Checking multi-linked files
    Checking catalog hierarchy
    Checking extended attributes file
    Checking volume bitmap
    Checking volume information
    Invalid volume free block count
    (It should be 21713521 instead of 21713716)
    The volume MAC OS X was found corrupt and needs to be repaired
    Error: -69845: File system verify or repair failed

  • "How do I defrag my mac?" "You don't need to, it does it itself" Fragmented Free Space: 99%. READ THIS NOW

    Just a heads up for my fellow Mac users.
    "How do I defrag my mac?"
    "You don't need to, ever. It does it automatically."
    "But it's running really slowly..."
    "Repair permissions or something. Defragging is not necessary on a mac."
    Techtool pro is now defragmenting my mac. Looks like the job's going to take about 4 hours. I thought I'd give everyone the truth about this while waiting (on a different computer obviously)
    The truth is, Apple's defragmenting system ***** BALLS. It has two massive, massive flaws which I feel people urgently need to be made aware of.
    #1: It only defragments files up to 20mb. If you're a movie producer, a songwriter, a photographer, or anything which involves working with many massive files, the built in defragmenting program WILL NOT HELP YOU IN THE SLIGHTEST.
    #2: It only defragments FILES. Free space is ignored, which eventually causes absolutely hrrendous problems.
    Let me give you an analogy here. Imagine your mac's hard drive is a bookcase with lots of books on it.
    File fragmentation is when it can't find a gap in the bookcase big enough for the entire book, so it breaks the book into pieces and srotes them in different gaps.
    Space fragmentation is when there are gaps all over the bookcase, instead of all the books being pushed to one side so there's a long gap elsewhere.
    Apple's built in defragmenting program will only fix the first problem - and even then, it will ignore any book bigger than 20 pages long, if you have bigger books which are broken up, you're screwed.
    Why is space fragmentation a problem? It's a problem because it directly LEADS TO file fragmentation. If there is a large block of free space all in one part of the disk, then an entire file can be written to it. However, if there is no single free block big enough for the file, it HAS NO CHOICE but to fragment it.
    So basically you might have 5 GB free and want to save a 2GB imovie project. That's cool. But what you may not realize is, the biggest single area of free space is only say 600MB. Others are around 300 and 400. Therefore the file MUST be fragmented into all these different areas, which wouldn't be necessary if all the free space was in one area of the disk.
    But apple's built in tools don't do anything about this, at least not in Tiger. PErhaps this has been fixed in later installations but I'm almost certain the same issues exist in leopard.
    Your only option is to buy a defragmenting program. I know this ***** but believe me, this IS something you NEED to do if your activity on your laptop involves disk space - intensive projects. I'm using TechTool Pro which has been recommended to me as hands down the best. It has a number of other functions as well, right now I'm only using the defragmenting tools but it has others for repairing damages disk sectors and other mantainence tools. There are other programs such as iDefrag out there as well.
    Why am I telling you this? I'm telling you because I experienced mind numbing frustration trying to get answers from the Apple community. Google it or ask the question yourself and you will most likely be whacked in the face with the intro to my post here - "You don't need to, it's not necessary, macs do it themselves, blah blah blah"
    Even worse, Apple's own webpage on the subject is nothing short of a disaster. It basically says "You PROBABLY don't need to defragment, unless you work with large files." That's it. You'd expect it to have an extra section saying "If you DO happen to work with large files, here's what you do" but no such section exists. It basically says "You don't need to defrag most of the time, and on the rare occasions when you do, well, too bad, you're screwed."
    I urge everyone to heed this or they will be tearing their hair out at how slow their mac has become and the fact that no one will offer any meaningful advice other than the standard, generic, "Repair permissions" - the Mac equivelant of "have you tried turning it off and on again".
    My disk is at 99% fragmented free space. NINTEY NINE PERCENT. In other words, although I have 25GB of free space, there was not a single contiguous block on the entire machine. I had almost 5,000 fragmented files as well, mostly imovies. Defragmenting got this down to about 300.
    The defrag job is taking more than 4 hours and will probably go on to take a lot longer than that. This machine has been slowly grinding to a halt over the last 3 years and now I know why.
    Please don't listen to anyone. Get yourself a defragmenting folder, and email Apple to tell them it's just not good enough to give their customers half assed answers and inadequate basic maintainence tools. Mac OS X must literally be the only operating system out there where something as basic as defragmenting is not only almost impossible to get answers on, but actually costs money to fix once you DO get answers.
    As customers, we should not accept this any longer. I intend to spread the above message far and wide.
    I LOVE Apple. I've always been "a mac" and I always will be. This in no way a mac bashing post or a windows endorsing one. I wouldn't switch back to windows if you gave me a million euro.
    But sometimes even the best developers can royally f*ck up. This is one of them.
    There is no readon people should be forced to put up with this crap. Absolutely no reason at all. I've had 3 months of crappy performance with no official explanation whatsoever.
    Apple if you're reading this: I love your products. I'm a loyal customer. People are more forgiving than you think, speak up, admit you dropped the ball, and DO something about it in your next updates to Lion and whichever versions of Leopard you are still actively maintaining.
    There's no shame in admitting when you're wrong. The shame is in hiding behind false promises and walls of silence.
    --Loyal customer, but feeling rather betrayed by all this.

    The old rule of thumb was to keep 10-12 GB free. Any lower than that and you will start to have trouble. I was very close to that for a long time and never had any complaints. Now, Lion "encourages" 20% free space (on my newer 250 GB drive) so I try to keep it with more than 50 GB free.
    Do you still have the original memory in that machine too? The metal plate you have to remove in the battery compartment also provides access to the RAM. Your machine will take 2 GB of RAM, possibly 3. You definitely want to max that out too.
    Regardless, you definitely need a new hard drive. When Apple switched to PC components, they had to take a quality hit. These 2.5" notebook hard drives are not very reliable. I'm surprised your hard drive hasn't died by now. I usually get a new hard drive with every major OS upgrade. A $ 50 investment every couple of years is no big deal.
    Unfortunately, you (and I) suffer from being an early adopter in 2006. Those 32-bit machines only accept 2 GB RAM (maybe 3) and are only 32-bit so they can't be upgraded to Lion. Because of this limitation, you won't see as dramatic an improvement as you would with a 2007 machine. If you run more than a couple of applications, your hard drive is always going to have to be doing some VM work. My 2006 machine has even lost its bluetooth. I gave it to my brother. My very similar 2007 Macbook is still running great.
    So, you must get a new hard drive because your old one is likely on death's door. If you don't have at least 2 GB - get it. If you can't afford a new machine, you might want to consider an SSD. That might help mitigate your RAM limitations. You can spend from $ 100 to $ 350 and get a dramatic speed improvement.

  • Performance problem - Tablespace Free Space

    Hi,
    Version 10204
    I am running the following statment in order to monitor tablespace free space.
    There are some tablespaces that i am not interesting to monitor , and i also whant to be alert
    only when less than 4 GB left in the tablespace.
    I build the following statment.
    Using the hint : /*+ NO_CPU_COSTING */ gave me the best performance but there are alot of time
    that its took to this statment few minute to run befor it finished.
    Could one help to improve its performance ?
    Please note that it performe even less good when i used the RULE hint or not using hint at all.
    SELECT  /*+ gather_plan_statistics */  'tablespace_free_space;'||to_char(pct_used,'999.99')||','||TBSNAME
    FROM( SELECT *
          FROM( SELECT NVL(b.tablespace_name, NVL(a.tablespace_name,'UNKOWN')) TBSNAME,
                       MBytes_alloc,
                           maxbytes,
                           MBytes_max,
                       ROUND(MBytes_alloc-NVL(MBytes_free,0),2) used,
                       ROUND(NVL(MBytes_free,0),2) free,
                       MBytes_free,
                       ROUND(DECODE( MBytes_max, 0,((MBytes_alloc-NVL(MBytes_free,0))/MBytes_alloc)*100,100*(MBytes_alloc) / maxbytes),2)PCT_USED
                FROM ( SELECT /*+ NO_CPU_COSTING */  SUM(bytes)/1024/1024 MBytes_free,
                              MAX(bytes)/1024/1024 largest,
                              tablespace_name
                       FROM   sys.DBA_FREE_SPACE
                       WHERE  TABLESPACE_NAME NOT IN
                              ('Q405_CALLS_TS','Q405_ICALLS_TS',
                               'Q305_CALLS_TS','Q305_ICALLS_TS',
                               'Q205_ICALLS_TS','Q306_CALLS_TS',
                               'Q406_CALLS_TS','Q206_CALLS_TS',
                               'Q205_CALLS_TS','Q105_CALLS_TS',
                               'Q105_ICALLS_TS','Q206_CALLS_TS','Q106_CALLS_TS',
                               'Q306_ICALLS_TS','Q107_ICALLS_TS','Q406_ICALLS_TS',
                               'Q206_ICALLS_TS','UNLMT_INTERNET_CALLS_2006_TS',
                               'UNLMT_INTERNET_CALLS_2007_TS',
                               'UNLMT_INTERNET_CALLS_2008_TS',
                               'Q107_ICALLS_TBS','Q107_CALLS_TBS',
                               'Q207_ICALLS_TBS','Q207_CALLS_TBS',
                               'Q307_ICALLS_TBS','Q307_CALLS_TBS',
                               'Q407_ICALLS_TBS','Q407_CALLS_TBS',
                               'Q408_ICALLS_TS','Q408_CALLS_TS',
                               'Q308_ICALLS_TS','Q308_CALLS_TS',
                               'Q208_ICALLS_TS','Q208_CALLS_TS',
                               'Q108_ICALLS_TS','Q108_CALLS_TS',
                               'Q109_ICALLS_TS','Q109_CALLS_TS',
                               'UNLMT_INT_CALLS_Q308_TS',
                               'UNLMT_INT_ICALLS_Q308_TS',
                               'UNLMT_INT_CALLS_Q408_TS',
                               'UNLMT_INT_ICALLS_Q408_TS'
                       GROUP BY tablespace_name ) a,
                     ( SELECT  SUM(bytes)/1024/1024 MBytes_alloc,
                              SUM(maxbytes)/1024/1024 MBytes_max,
                              SUM(DECODE (autoextensible,'YES',maxbytes/1024/1024,'NO', BYTES/1024/1024 )) maxbytes,
                              tablespace_name
                       FROM   DBA_DATA_FILES
                       WHERE  TABLESPACE_NAME NOT IN
                              ('Q405_CALLS_TS','Q405_ICALLS_TS',
                               'Q305_CALLS_TS','Q305_ICALLS_TS',
                               'Q205_ICALLS_TS','Q306_CALLS_TS',
                               'Q406_CALLS_TS','Q206_CALLS_TS',
                               'Q205_CALLS_TS','Q105_CALLS_TS',
                               'Q105_ICALLS_TS','Q206_CALLS_TS',
                               'Q106_CALLS_TS','Q306_ICALLS_TS',
                               'Q107_ICALLS_TS','Q406_ICALLS_TS',
                               'Q206_ICALLS_TS','UNLMT_INTERNET_CALLS_2006_TS',
                               'UNLMT_INTERNET_CALLS_2007_TS',
                               'UNLMT_INTERNET_CALLS_2008_TS',
                               'Q107_ICALLS_TBS','Q107_CALLS_TBS',
                               'Q207_ICALLS_TBS','Q207_CALLS_TBS',
                               'Q307_ICALLS_TBS','Q307_CALLS_TBS',
                               'Q407_ICALLS_TBS','Q407_CALLS_TBS',
                               'Q408_ICALLS_TS','Q408_CALLS_TS',
                               'Q308_ICALLS_TS','Q308_CALLS_TS',
                               'Q208_ICALLS_TS','Q208_CALLS_TS',
                               'Q108_ICALLS_TS','Q108_CALLS_TS',
                               'Q109_ICALLS_TS','Q109_CALLS_TS',
                               'UNLMT_INT_CALLS_Q308_TS',
                               'UNLMT_INT_ICALLS_Q308_TS',
                               'UNLMT_INT_CALLS_Q408_TS',
                               'UNLMT_INT_ICALLS_Q408_TS'
                       GROUP BY tablespace_name) b
                WHERE a.tablespace_name (+) = b.tablespace_name
                AND (a.MBytes_free<4000 or a.MBytes_free is null)
             ORDER BY PCT_USED DESC
    WHERE TBSNAME not in (select tablespace_name from dba_tablespaces where contents in ('UNDO'))
    and ROWNUM =1;
    select * from table(dbms_xplan.display_cursor('42hppgtx2h1gb',0,'ALLSTATS LAST'));
    Plan hash value: 2979461796
    PLAN_TABLE_OUTPUT
    | Id  | Operation                               | Name             | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |  OMem |  1Mem | Used-Mem |
    |*  1 |  COUNT STOPKEY                          |                  |      1 |        |      1 |00:00:15.52 |     146K|   8927 |       |       |      |
    |*  2 |   FILTER                                |                  |      1 |        |      1 |00:00:15.52 |     146K|   8927 |       |       |      |
    |   3 |    VIEW                                 |                  |      1 |      3 |      1 |00:00:15.52 |     146K|   8927 |       |       |      |
    |   4 |     SORT ORDER BY                       |                  |      1 |      3 |      1 |00:00:15.52 |     146K|   8927 |  2048 |  2048 | 2048  (0)|
    |*  5 |      FILTER                             |                  |      1 |        |     16 |00:00:15.52 |     146K|   8927 |       |       |      |
    |*  6 |       HASH JOIN OUTER                   |                  |      1 |      3 |     25 |00:00:15.52 |     146K|   8927 |   561K|   561K|  982K (0)|
    |   7 |        VIEW                             |                  |      1 |      2 |     25 |00:00:02.95 |     105K|      0 |       |       |      |
    |   8 |         HASH GROUP BY                   |                  |      1 |      2 |     25 |00:00:02.95 |     105K|      0 |   447K|   447K|  977K (0)|
    |   9 |          VIEW                           | DBA_DATA_FILES   |      1 |      2 |    217 |00:00:03.25 |     105K|      0 |       |       |      |
    |  10 |           UNION-ALL                     |                  |      1 |        |    217 |00:00:03.25 |     105K|      0 |       |       |      |
    |  11 |            NESTED LOOPS                 |                  |      1 |      1 |      0 |00:00:00.67 |     219 |      0 |       |       |      |
    |  12 |             NESTED LOOPS                |                  |      1 |      1 |      0 |00:00:00.67 |     219 |      0 |       |       |      |
    |  13 |              MERGE JOIN CARTESIAN       |                  |      1 |      1 |  52297 |00:00:00.22 |       0 |      0 |       |       |      |
    |* 14 |               FIXED TABLE FULL          | X$KCCFN          |      1 |      1 |    217 |00:00:00.01 |       0 |      0 |       |       |      |
    |  15 |               BUFFER SORT               |                  |    217 |    100 |  52297 |00:00:00.06 |       0 |      0 | 11264 | 11264 |10240  (0)|
    |  16 |                FIXED TABLE FULL         | X$KCCFE          |      1 |    100 |    241 |00:00:00.01 |       0 |      0 |       |       |      |
    |* 17 |              TABLE ACCESS BY INDEX ROWID| FILE$            |  52297 |      1 |      0 |00:00:00.52 |     219 |      0 |       |       |      |
    |* 18 |               INDEX UNIQUE SCAN         | I_FILE1          |  52297 |      1 |    217 |00:00:00.24 |       2 |      0 |       |       |      |
    |* 19 |             TABLE ACCESS CLUSTER        | TS$              |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |       |       |      |
    |* 20 |              INDEX UNIQUE SCAN          | I_TS#            |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |       |       |      |
    |  21 |            NESTED LOOPS                 |                  |      1 |      1 |    217 |00:00:02.58 |     105K|      0 |       |       |      |
    |  22 |             NESTED LOOPS                |                  |      1 |      1 |  52297 |00:00:01.89 |     104K|      0 |       |       |      |
    |  23 |              MERGE JOIN CARTESIAN       |                  |      1 |      1 |  52297 |00:00:00.22 |     217 |      0 |       |       |      |
    |  24 |               NESTED LOOPS              |                  |      1 |      1 |    217 |00:00:00.02 |     217 |      0 |       |       |      |
    |* 25 |                FIXED TABLE FULL         | X$KCCFN          |      1 |      1 |    217 |00:00:00.01 |       0 |      0 |       |       |      |
    |* 26 |                FIXED TABLE FIXED INDEX  | X$KTFBHC (ind:1) |    217 |      1 |    217 |00:00:00.01 |     217 |      0 |       |       |      |
    |  27 |               BUFFER SORT               |                  |    217 |    100 |  52297 |00:00:00.11 |       0 |      0 | 11264 | 11264 |10240  (0)|
    |  28 |                FIXED TABLE FULL         | X$KCCFE          |      1 |    100 |    241 |00:00:00.01 |       0 |      0 |       |       |      |
    |* 29 |              TABLE ACCESS CLUSTER       | TS$              |  52297 |      1 |  52297 |00:00:01.41 |     104K|      0 |       |       |      |
    |* 30 |               INDEX UNIQUE SCAN         | I_TS#            |  52297 |      1 |  52297 |00:00:00.37 |       2 |      0 |       |       |      |
    |* 31 |             TABLE ACCESS BY INDEX ROWID | FILE$            |  52297 |      1 |    217 |00:00:00.57 |     219 |      0 |       |       |      |
    |* 32 |              INDEX UNIQUE SCAN          | I_FILE1          |  52297 |      1 |    217 |00:00:00.28 |       2 |      0 |       |       |      |
    |  33 |        VIEW                             |                  |      1 |   1401 |     25 |00:00:12.56 |   40846 |   8927 |       |       |      |
    |  34 |         HASH GROUP BY                   |                  |      1 |   1401 |     25 |00:00:12.56 |   40846 |   8927 |   465K|   465K|  982K (0)|
    |  35 |          VIEW                           | DBA_FREE_SPACE   |      1 |   1401 |  73133 |00:00:14.19 |   40846 |   8927 |       |       |      |
    |  36 |           UNION-ALL                     |                  |      1 |        |  73133 |00:00:14.04 |   40846 |   8927 |       |       |      |
    |  37 |            NESTED LOOPS                 |                  |      1 |      1 |      0 |00:00:00.01 |      45 |      0 |       |       |      |
    |  38 |             NESTED LOOPS                |                  |      1 |      1 |      0 |00:00:00.01 |      45 |      0 |       |       |      |
    |  39 |              TABLE ACCESS FULL          | FET$             |      1 |      1 |      0 |00:00:00.01 |      45 |      0 |       |       |      |
    |* 40 |              INDEX UNIQUE SCAN          | I_FILE2          |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |       |       |      |
    |* 41 |             TABLE ACCESS CLUSTER        | TS$              |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |       |       |      |
    |  42 |            NESTED LOOPS                 |                  |      1 |      5 |   7271 |00:00:00.20 |    1156 |      0 |       |       |      |
    |  43 |             NESTED LOOPS                |                  |      1 |      6 |   7271 |00:00:00.14 |    1154 |      0 |       |       |      |
    |* 44 |              TABLE ACCESS FULL          | TS$              |      1 |      2 |     25 |00:00:00.01 |      45 |      0 |       |       |      |
    |* 45 |              FIXED TABLE FIXED INDEX    | X$KTFBFE (ind:1) |     25 |      3 |   7271 |00:00:00.11 |    1109 |      0 |       |       |      |
    |* 46 |             INDEX UNIQUE SCAN           | I_FILE2          |   7271 |      1 |   7271 |00:00:00.04 |       2 |      0 |       |       |      |
    |  47 |            NESTED LOOPS                 |                  |      1 |   1394 |  65862 |00:00:17.73 |   39476 |   8927 |       |       |      |
    |  48 |             NESTED LOOPS                |                  |      1 |  30528 |  65862 |00:00:16.94 |   39474 |   8927 |       |       |      |
    |* 49 |              HASH JOIN                  |                  |      1 |   2540 |   8927 |00:00:00.03 |      90 |      0 |   811K|   811K| 1397K (0)|
    |  50 |               TABLE ACCESS FULL         | RECYCLEBIN$      |      1 |   8319 |   8935 |00:00:00.01 |      45 |      0 |       |       |      |
    |* 51 |               TABLE ACCESS FULL         | TS$              |      1 |      2 |     25 |00:00:00.01 |      45 |      0 |       |       |      |
    |* 52 |              FIXED TABLE FIXED INDEX    | X$KTFBUE (ind:1) |   8927 |     12 |  65862 |00:00:11.66 |   39384 |   8927 |       |       |      |
    |* 53 |             INDEX UNIQUE SCAN           | I_FILE2          |  65862 |      1 |  65862 |00:00:00.45 |       2 |      0 |       |       |      |
    |* 54 |            TABLE ACCESS BY INDEX ROWID  | RECYCLEBIN$      |      1 |      1 |      0 |00:00:00.01 |     169 |      0 |       |       |      |
    |  55 |             NESTED LOOPS                |                  |      1 |      1 |      1 |00:00:00.01 |     169 |      0 |       |       |      |
    |  56 |              NESTED LOOPS               |                  |      1 |      1 |      0 |00:00:00.01 |     169 |      0 |       |       |      |
    |  57 |               NESTED LOOPS              |                  |      1 |      1 |      0 |00:00:00.01 |     169 |      0 |       |       |      |
    |  58 |                TABLE ACCESS FULL        | UET$             |      1 |      1 |      0 |00:00:00.01 |     169 |      0 |       |       |      |
    |* 59 |                INDEX UNIQUE SCAN        | I_FILE2          |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |       |       |      |
    |* 60 |               TABLE ACCESS CLUSTER      | TS$              |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |       |       |      |
    |* 61 |                INDEX UNIQUE SCAN        | I_TS#            |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |       |       |      |
    |* 62 |              INDEX RANGE SCAN           | RECYCLEBIN$_TS   |      0 |   1188 |      0 |00:00:00.01 |       0 |      0 |       |       |      |
    |* 63 |    TABLE ACCESS FULL                    | TS$              |      1 |      1 |      0 |00:00:00.01 |      45 |      0 |       |       |      |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM=1)
       2 - filter( IS NULL)
       5 - filter(("A"."MBYTES_FREE"<4000 OR "A"."MBYTES_FREE" IS NULL))
       6 - access("A"."TABLESPACE_NAME"="B"."TABLESPACE_NAME")
      14 - filter(("INST_ID"=USERENV('INSTANCE') AND "FNNAM" IS NOT NULL AND BITAND("FNFLG",4)<>4 AND "FNTYP"=4))
    PLAN_TABLE_OUTPUT
      17 - filter(("F"."SPARE1" IS NULL AND "F"."TS#" IS NOT NULL))
      18 - access("FE"."FENUM"="F"."FILE#")
           filter("FNFNO"="F"."FILE#")
      19 - filter(("TS"."NAME"<>'Q405_CALLS_TS' AND "TS"."NAME"<>'Q405_ICALLS_TS' ... AND "TS"."NAME"<>'UNLMT_INT_ICALLS_Q408_TS'))
      20 - access("F"."TS#"="TS"."TS#")
      25 - filter(("INST_ID"=USERENV('INSTANCE') AND "FNNAM" IS NOT NULL AND BITAND("FNFLG",4)<>4 AND "FNTYP"=4))
      26 - filter("FNFNO"="HC"."KTFBHCAFNO")
      29 - filter(("TS"."NAME"<>'Q405_CALLS_TS' AND "TS"."NAME"<>'Q405_ICALLS_TS' AND ... AND "TS"."NAME"<>'UNLMT_INT_ICALLS_Q408_TS'))
      30 - access("HC"."KTFBHCTSN"="TS"."TS#")
      31 - filter("F"."SPARE1" IS NOT NULL)
      32 - access("FE"."FENUM"="F"."FILE#")
           filter("FNFNO"="F"."FILE#")
      40 - access("F"."TS#"="FI"."TS#" AND "F"."FILE#"="FI"."RELFILE#")
    PLAN_TABLE_OUTPUT
           filter(("FI"."TS#" IS NOT NULL AND "FI"."RELFILE#" IS NOT NULL))
      41 - filter(("TS"."TS#"="F"."TS#" AND "TS"."BITMAPPED"=0 AND "TS"."NAME"<>'Q405_CALLS_TS' AND "TS"."NAME"<>'Q405_ICALLS_TS' AND
                  "TS"."NAME"<>'Q305_CALLS_TS' AND "TS"."NAME"<>'Q305_ICALLS_TS' AND ... "TS"."NAME"<>'UNLMT_INT_ICALLS_Q408_TS'))
      44 - filter(("TS"."BITMAPPED"<>0 AND INTERNAL_FUNCTION("TS"."ONLINE$") AND .... "TS"."NAME"<>'UNLMT_INT_ICALLS_Q408_TS'))
      45 - filter("TS"."TS#"="F"."KTFBFETSN")
      46 - access("F"."KTFBFETSN"="FI"."TS#" AND "F"."KTFBFEFNO"="FI"."RELFILE#")
           filter(("FI"."TS#" IS NOT NULL AND "FI"."RELFILE#" IS NOT NULL))
      49 - access("TS"."TS#"="RB"."TS#")
      51 - filter(("TS"."BITMAPPED"<>0 AND INTERNAL_FUNCTION("TS"."ONLINE$") AND...."TS"."NAME"<>'UNLMT_INT_ICALLS_Q408_TS'))
      52 - filter(("U"."KTFBUESEGTSN"="RB"."TS#" AND "U"."KTFBUESEGFNO"="RB"."FILE#" AND "U"."KTFBUESEGBNO"="RB"."BLOCK#"))
      53 - access("RB"."TS#"="FI"."TS#" AND "U"."KTFBUEFNO"="FI"."RELFILE#")
           filter(("FI"."TS#" IS NOT NULL AND "FI"."RELFILE#" IS NOT NULL))
    PLAN_TABLE_OUTPUT
      54 - filter(("U"."SEGFILE#"="RB"."FILE#" AND "U"."SEGBLOCK#"="RB"."BLOCK#"))
      59 - access("U"."TS#"="FI"."TS#" AND "U"."SEGFILE#"="FI"."RELFILE#")
           filter(("FI"."TS#" IS NOT NULL AND "FI"."RELFILE#" IS NOT NULL))
      60 - filter(("TS"."BITMAPPED"=0 AND "TS"."NAME"<>'Q405_CALLS_TS' AND .... AND "TS"."NAME"<>'UNLMT_INT_CALLS_Q408_TS' AND
                  "TS"."NAME"<>'UNLMT_INT_ICALLS_Q408_TS'))
      61 - access("TS"."TS#"="U"."TS#")
      62 - access("U"."TS#"="RB"."TS#")
      63 - filter((DECODE("TS"."CONTENTS$",0,DECODE(BITAND("TS"."FLAGS",16),16,'UNDO','PERMANENT'),1,'TEMPORARY')='UNDO' AND "TS"."ONLINE$"<>3 AND
                  BITAND("FLAGS",2048)<>2048 AND LNNVL("TS"."NAME"<>:B1)))
    Note
    PLAN_TABLE_OUTPUT
       - cpu costing is off (consider enabling it)

    Version 10204
    I am running the following statment in order to monitor tablespace free space.
    There are some tablespaces that i am not interesting to monitor , and i also whant to be alert
    only when less than 4 GB left in the tablespace.
    And just adding to Dan's reply, if you are on 10g as you mentioned, why not to use the built in Alert mechanism to monitor and get alerts about the tablespace usage using the GC or Database Console than creating a home grown solution like the one you have posted?
    Aman....

  • Free space problem in / with oracle-xe-11.2.0-1.0.x86_64

    Hi,
    I'm trying to install Oracle-xe-11g on Red Hat 5.6, but I have the following problem:
    [root@localhost] rpm -ivhf oracle-xe-11.2.0-1.0.x86_64.rpm
    Preparing... ########################################### [100%]
    installing package oracle-xe-11.2.0-1.0.x86_64 needs 180MB on the / filesystem
    However I have enough free space in /, df command shows:
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/sda2 3960348 3326380 429544 89% /
    /dev/sda3 30368632 4066116 24734976 15% /home
    /dev/sda1 46633 11310 32915 26% /boot
    tmpfs 2198372 0 2198372 0% /dev/shmHow do I fix it?
    Thank you in advantage
    Edited by: 905637 on 03-ene-2012 4:43

    How do I fix it?Add Space.
    Looks like you've got a less than 4G total for / with about 420MB free. That's nowhere near enough space, out-of-the-box the datafiles alone take about 1G.
    Try bumping sda2 up another 4G, or add a (at least) 4G partition and mount it at /usr/lib/oracle
    Per the Linux install guide ... "Disk Space ... 1.5GB minimum" http://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm#BABHICJH
    Edited by: clcarter on Jan 3, 2012 11:40 AM
    add install doc URL

  • Claiming of free space in data files

    I have a problem for claiming the free space in few data files .There is the data in the files at fragmented places i.e. the free space is below the high water mark.DB is production db and Export/Import is not possible due to time consideration. How to get back that space. Please reply soon.....

    Dolly, the term HWM in Oracle is normally only used to describe the last used block in a table allocation. There is no way to reclaim unused blocks below the HWM in a table without reorganizing the table though Oracle will resuse the space for new rows if the pct_used threshold allows (or ASSM) allows it do so.
    You can sometimes release free (unused) blocks above the HWM of a table using the alter table shrink option.
    You can perform a similar function on extendable datafiles between the last allocated object extent and the end of file.
    As Justin said, you need to explain your situation better.
    -- Mark D Powell --

  • Re-use of free space

    Hi,
    after a large client delete or after important data archiving, does Oracle re-use new freed space into datafile ? ... we need to delete a large client and then copy e new mid-size client but we haven't a lot of free space in dev system.
    Regards.
    Ganimede Dignan.

    Hello Ganimede,
    >> after a large client delete or after important data archiving, does Oracle re-use new freed space into datafile ?
    Oracle reuses the freed space inside the same segment. For example if you have freed space in table MSEG, you can reuse the allocated space only for table MSEG (=same segment).
    For indexes its a little bit "special", because the freed space (in blocks) can only be reused if they are completely empty, because of the index must be sorted.
    You can take a look at the ALL_TABLES on column AVG_SPACE to estimate the freed size in the tables (but take care, the values are only updated on statistic gathering):
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2105.htm#i1592091
    Regards
    Stefan

Maybe you are looking for

  • BW authorizations for standard development

    For a training workshop, I need to define some authorizations for the trainees. They shouldn't be allowed to do whatever they want on the BW and R/3 systems. So I can't give them the SAP_ALL profile! On the source system, the users would be allowed t

  • Smart Projects ordered by "Lens model" – is it possible?

    I have 3 lenses on my Nikon, and I'll have more, but I still didn't find a way in Aperture to organize my library according to a Lens. Let's say I want to create a Smart Album containing only the photos taken with the 50mm. How do I do that? I could

  • How to maximize report script performance

    I have a report script that takes a while to run. Basically the script is zooming into 3 sparse dimensions and 1 dense dimension. <BR><BR><BR>The dense dimension has 732 stored members.<BR><BR>The sparse dimensions have 92, 280 and 576 members respec

  • [JS, ID5] Change fontStyle

    Hello, I have the following script for changing character overrides (bold) for character styles: app.findTextPreferences = null; app.changeTextPreferences = null; app.findTextPreferences.fontStyle = "Bold"; app.changeTextPreferences.appliedCharacterS

  • Expanding the datagrid column on double-click?

    The title says it all... How do i get it to expand to certain value?