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

Similar Messages

  • "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.

  • Lion takes long time to find free space after emptying trash

    After emptying the trash, I've noticed that Lion does not see the additional free space until after doing a reboot, and even after that it takes a long time for it to find all the new free space.  Anybody know what's wrong with the trash system?

    Absolutely nothing is wrong with it.  See Missing disk space in Lion.

  • 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....

  • Set tablespace free space (mb) for a single large tablespace?

    It seems that in EM, setting the free space (mb) for locally managed tablespaces affects all of my locally managed tablespaces in the database and not just one.
    I clicked on Tablespace, Edit (button), Thresholds and set the Free Space (MB) Warning and Critical. I thought I was setting it for a particular tablespace (because I chose Edit on a single tablespace). But then I got alerts from much smaller tablespaces because those tablespaces had much smaller MB than the thresholds that I just set.
    Using EM GC, is there a way to set the free space (mb) to alert for a single large tablespace where defining a critical free space mb is better than setting a free space percent?

    ok, go to the database you want to manage.
    Then click on Metric and Policy Settings (link at the very bottom).
    Scroll down to the 'Tablespace Space Used (%)' metric, and click on the edit button
    Now, click on the 'add' button to setup settings for individual tablespaces.
    Bazza

  • Doubt in considering temp tablespace's free space

    Hi All,
    Database: oracle 11.2
    Operating System: AIX
    I want to know how much free space available in my temp tablespace
    I ran below scripts
    select sum((bytes_free)/1024/1024/1024) GB from v$temp_space_header
    +52.904296875+
    select (tablespace_size)/1024/1024/1024 tablespace_size_in_gb,
    +(allocated_space)/1024/1024/1024 allocated_space_in_gb,+
    +(free_space)/1024/1024/1024 free_space_in_gb+
    from dba_temp_free_space
    tablespace_size_in_gb: 98.9990234375
    allocated_space_in_gb: 46.0947265625
    free_space_in_gb:151.81640625
    So my doubt is which one from above two script gives actual free space information ?
    Also in dba_temp_free_space view why free space size > tablespace size ?

    v$temp_space_header shows you how big the temp tablespace has got since the database was restarted. It doesn't give you the current free/used space.
    See the link for dba_temp_free_space, but I think it may be the way it reports free space which is why you're seeing it as more than the actual tablespace. As you can see form the description "space that is currently allocated and available for resuse" is calculated for both allocated space and free space.
    http://docs.oracle.com/cd/B28359_01/server.111/b28320/statviews_5056.htm
    >
    ALLOCATED_SPACE = space that is currently allocated and used + space that is currently allocated and available for reuse
    FREE_SPACE = space that is currently allocated and available for reuse + space that is currently unallocated>
    I use the below script which I've plagiarised from somewhere ages ago to get the used/free temp space.
    SELECT   A.tablespace_name tablespace, D.mb_total,
             SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_used,
             D.mb_total - SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_free
    FROM     v$sort_segment A,
             SELECT   B.name, C.block_size, SUM (C.bytes) / 1024 / 1024 mb_total
             FROM     v$tablespace B, v$tempfile C
             WHERE    B.ts#= C.ts#
             GROUP BY B.name, C.block_size
             ) D
    WHERE    A.tablespace_name = D.name
    GROUP by A.tablespace_name, D.mb_total;

  • Free space available in tablespace

    Hi, Any one help me how to check how much free space available on a particular Tablespace. Appreciate if you provide query.
    Thanks & Regards
    Bhaskara

    This SQL will return free space by datafile in the tablespace.
    SELECT a.name FileName, a.status, c.bytes/1024 CurrentSize, a.create_bytes/1024 SizeCreated,
    sum(b.bytes/1024) FreeSpace, max(b.bytes/1024) LargeFragment
    from sys.v_$datafile a, sys.dba_free_space b, sys.dba_data_files c
    where a.file# = b.file_id(+)
    and a.file#=c.file_id
    and c.tablespace_name='XXXXXXXXXXXXXXXXX'
    group by a.name, a.status, c.bytes, a.create_bytes
    ORDER BY a.name;
    I just posted an integrated set of GUI tools to administer the Oracle database.
    One of the many functions is to view and maintain all database objects including tablespaces and datafiles. It also has a graphical function to monitor space allocation for tablespaces. You may need same help to get started, so feel free to contact me ([email protected]). The link is http://www.barsoft.net/

  • Insufficient free space error

    Hello.
    I try to install EHP4 on ERP 6.0
    I have x86_64 windows server with two partitions: drive c: and large drive mounted to c:\oracle\SID
    Installation interrupts at PREP_GENCHECKS/SPACECHK_OPT with message
    ERROR> Insufficient free space in the database as follows:
    Create TABLESPACE PSAPSR3701           with 64637 MB
    - it cannot find enough free space on drive c:
    But tablespace should be created under c:\oracle\SID, and there is a lot of free space.
    Can I skip this delirious check of c:\ ?

    Hi,
    Please ensure your brtools is at the latest
    version as per note 12741.
    If the problem still persists, you can set the trace level for brspace
    to 11 as per note 29321 and re-run the phase.
    Usually in sap upgrade this is related to Oracle dba_free_space not the
    system free space, same theory should apply to EHP install. If you have
    an Oracle dba you may ask him to check the data dictionary view
    dba_free_space and available extents for each tablespace.
    Also please review carefully points within Note 716377 - Problem
    analysis in the upgrade: SPACECHK phases ?
    Regards,
    Aidan

  • How to find remaining free space in your schema

    Hi
    I am new to Oracle hence this question..
    What is the command that would help me know how much percent of space allocated to my schema has been used and also how to find remaining amount of space in bits or bytes or whatever from SQL or any where... I am not a database admin (fyi)
    Appreciate ur help in this reg
    Thanx
    Kris

    Kris, free space is not assigned to a schema in Oracle per say, but it you mean "how can I see how much of their quota a user has used?" then the following should help.
    You can find quotas in dba_ts_quotas (also user version)
    You can find how much space has been used in dba_extents (also user_extents)
    You should be able to write a query that compared the sum of the used space for a tablespace to the quota for the tablespace. Try the following query (notice how DBA's are treated)
    select q.username, q.tablespace_name,
    q.bytes as Quota, e.spcused as Used,
    round(q.bytes/e.spcused * 100,2) as Percentage
    from dba_ts_quotas q,
    (select tablespace_name, owner, sum(bytes) as spcused
    from dba_extents
    group by tablespace_name, owner
    ) e
    where q.tablespace_name = e.tablespace_name
    and q.username = e.owner
    If you are actually interested in how much free space is left in a tablespace you can look at dba_free_space (user_free_space), but the value returned is not adjusted for the quota limitation. You need the query above for that.
    HTH -- Mark D Powell --

  • Stange free space in tablespace

    Checking a space usage of my tablespace using those queries http://vsbabu.org/oracle/sect03.html (especially query which name USAGE) shows me that one of my table is about 100GB big, but 90GB is free space?! So only 10% of space is used. Can I do something with this "empty" space?

    Sure. Below is listing from my all tablespaces files:
    'FILE_NAME' USER_BYTES/1024/1024   BYTES/1024/1024        MAXBYTES/1024/1024     AUTOEXTENSIBLE
    file_name_1    4,9375                 5                      32767,984375           YES           
    file_name_2    32767,875              32767,984375           32767,984375           YES           
    file_name_3    613,125                613,1875               32767,984375           YES           
    file_name_4    5219,9375              5220                   32767,984375           YES           
    file_name_5    32767,875              32767,984375           32767,984375           YES           
    file_name_6    9071,625               9071,6875              32767,984375           YES           
    file_name_7    74,9375                75                     32767,984375           YES           
    file_name_8    32767,875              32767,984375           32767,984375           YES           
    file_name_9    32767,875              32767,984375           32767,984375           YES           
    file_name_10   24,9375                25                     32767,984375           YES           
    file_name_11   32767,875              32767,984375           32767,984375           YES           
    file_name_12   191,75                 191,8125               32767,984375           YES           
    file_name_13   124,9375               125                    32767,984375           YES           
    file_name_14   9669,9375              9670                   32767,984375           YES           
    file_name_15   29851,875              29852                  32767,984375           YES           
    file_name_16   1000,6875              1000,75                32767,984375           YES           
    file_name_17   32767,875              32767,984375           32767,984375           YES           
    file_name_18   32761,9375             32762,0625             32767,984375           YES           
    file_name_19   20031,9375             20032                  32767,984375           YES           
    file_name_20   22171,9375             22172                  32767,984375           YES           
    file_name_21   3999,9375              4000                   0                      NO            
    file_name_22   49,9375                50                     32767,984375           YES           
    22 rows selected At this output it doesn't look as bad as in previous queries, does it?
    Edited by: lesak on Jun 18, 2011 11:29 AM

  • Fragmentation. Inserts not using free space

    Hi,
    We are running Oracle version 10.2.04, and we have a tablespace with locally managed, uniform, extents with ASSM set to manual. As part of our ETL process, we delete rows one at a time in a loop and then commit every 10,000 rows. We then insert using the same method.
    Can anyone think of reasons why the inserts would not use the free space from the deletion statements?
    I'm going to try and run a few tests, so any recommendations for this would be appreciated.
    Thanks,
    Rob

    Thank you both for your comments. I have now performed some testing and concluded that it was due to the PCTUSED parameter being set to 40 which has caused the lack of space re-use. I did some testing and here are the results:
    The reason for using the MOD function is because I wanted to delete from different blocks and not just the same one because they are ordered by the sequence numner (PK_COL in my example).
    Test 1
    Manual SSM
    Default PCTFREE and PCTUSED
    Look at the NUM_ROWS and BLOCKS values
    dba@TEST> create table dba.rj_del_ins_test
      2  tablespace Tbs_tables_x128K
      3  as
      4  select *
      5  from table
      6  where PK_COL > 1135268669
      7  and PK_COL is not null
      8  order by PK_COL ;
    Table created.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                         1      84217        849            0          0         141           0
    dba@TEST> delete from dba.rj_del_ins_test
      2  where PK_COL > 1135268669
      3  and mod(PK_COL ,20) = 10;
    4143 rows deleted.
    dba@TEST> commit;
    Commit complete.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                         1      80074        849            0          0         141           0
    dba@TEST>
    dba@TEST> insert into dba.rj_del_ins_test
      2  select *
      3  from table
      4  where PK_COL > 1135268669
      5  and PK_COL is not null
      6  and mod(PK_COL ,20) = 6;
    4277 rows created.
    dba@TEST> commit;
    Commit complete.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                         1      84351        892            0          0         141           0TEST 2
    New tablespace created with same extent size as previous tablespace being used for TEST1
    One change: Automatic Segment Space Management (ASSM) is set to AUTO instead of manual, as in TEST1
    As you can see from the results below, we have the same problem here where the deleted space is not being reused when the new inserts come along
    dba@TEST> create table dba.rj_del_ins_test
      2  tablespace rj_test_X128K
      3  as
      4  select *
      5  from table
      6  where PK_COL > 1135268669
      7  and PK_COL is not null;
    Table created.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                                84217        868            0          0         141           0
    dba@TEST> delete from dba.rj_del_ins_test
      2  where PK_COL > 1135268669
      3  and mod(PK_COL ,20) = 10;
    4143 rows deleted.
    dba@TEST> commit;
    Commit complete.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                                80074        868            0          0         141           0
    dba@TEST> insert into dba.rj_del_ins_test
      2  select *
      3  from table
      4  where PK_COL > 1135268669
      5  and PK_COL is not null
      6  and mod(PK_COL ,20) = 6;
    4277 rows created.
    dba@TEST> commit;
    Commit complete.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                                84351        911            0          0         141           0TEST 3
    Manual segment space management
    Specifying the PCTFREE and PCTUSED parameters for the table being created
    The first sign that something has changed is the number of blocks for the same number of rows is reduced; we are only using 764 instead of 868
    Secondly, upon re-inserting the rows we are only using 3 additional blocks which shows that we are in fact re-using the space we freed up
    dba@TEST> create table dba.rj_del_ins_test PCTFREE 0 PCTUSED 99
      2  tablespace Tbs_tables_X128K
      3  as
      4  select *
      5  from table
      6  where PK_COL > 1135268669
      7  and PK_COL is not null;
    Table created.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                         1      84217        764            0          0         141           0
    dba@TEST> delete from dba.rj_del_ins_test
      2  where PK_COL > 1135268669
      3  and mod(PK_COL ,20) = 10;
    4143 rows deleted.
    dba@TEST> commit;
    Commit complete.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                         1      80074        764            0          0         141           0
    dba@TEST> insert into dba.rj_del_ins_test
      2  select *
      3  from table
      4  where PK_COL > 1135268669
      5  and PK_COL is not null
      6  and mod(PK_COL ,20) = 6;
    4277 rows created.
    dba@TEST> commit;
    Commit complete.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                         1      84351        767            0          0         141           0TEST 4
    Automatic segment space management, using same tablespace as in TEST2
    PCTFREE and PCTUSED has been changed to be the same as in TEST2
    The result of this shows that the space is not re-used when using manual segment space management
    dba@TEST> create table dba.rj_del_ins_test PCTFREE 0 PCTUSED 99
      2  tablespace rj_test_X128K
      3  as
      4  select *
      5  from table
      6  where PK_COL > 1135268669
      7  and PK_COL is not null;
    Table created.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                                84217        782            0          0         141           0
    dba@TEST> delete from dba.rj_del_ins_test
      2  where PK_COL > 1135268669
      3  and mod(PK_COL ,20) = 10;
    4143 rows deleted.
    dba@TEST> commit;
    Commit complete.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                                80074        782            0          0         141           0
    dba@TEST> insert into dba.rj_del_ins_test
      2  select *
      3  from table
      4  where PK_COL > 1135268669
      5  and PK_COL is not null
      6  and mod(PK_COL ,20) = 6;
    4277 rows created.
    dba@TEST> commit;
    Commit complete.
    dba@TEST> exec dbms_stats.gather_table_stats('DBA', tabname=>'RJ_DEL_INS_TEST',estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    dba@TEST> select TABLE_NAME, FREELISTS, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN, NUM_FREELIST_BLOCKS
      2  from dba_tables
      3  where table_name = 'RJ_DEL_INS_TEST';
    TABLE_NAME                      FREELISTS   NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE AVG_ROW_LEN NUM_FREELIST_BLOCKS
    RJ_DEL_INS_TEST                                84351        823            0          0         141           0So, that does prove one point that you are right, Robert. However, can you think of why when using AUTO segment space management we don't utilitize the space as efficiently as with manual SSM?
    Thanks,
    Rob

  • How to handle free space fragmentation index 30

    hi
    i need help with tablespaces that have free space fragmentation index lower than 30%..
    how will i be able to increase the value to best at 100..
    any suggestions?
    thanks.

    jjwhtn wrote:
    Ok, resizing the boot camp partition failed, but being unable to delete it and resize the os x partition is weird, and I'm thinking there must be a way to get that free space back into that partition. That is the current issue.
    If you don't believe me when I said you have to erase and format your drive then reinstall OSX, search this forum. Your issue has been addressed dozens or hundreds of times.

  • HT1284 Do I need to reformat my external hard drive before I backup to it?  It shows very little free space when in fact it is empty.

    I am new to Imac.  I want to use an external hard drive to backup to but the drive shows very little free space when in fact it is empty.  Do I need to reformat it and, if so How?  Thanks

    What is the external disk?
    Is it new?  If so, maybe it has a Windows file system on it (FAT, exFAT, or NTFS).  If so then reformat to "HFS+ Journaled".
    What backup utility are you using?  TimeMachine, Carbon Copy Cloner, SuperDuper, etc...?  If the external is suppose to be bootable because you are using a cloning backup (CCC or SuperDuper), then it is also important that the disk partition table be GUID.
    You can find out this information via Applications -> Utilities -> Disk Utility, select the disk (not volume on the disk) and the partition time will be shown at the botton of the window.   Now Select the volume and it will tell you how the file system on the disk is formatted.
    Also do you want to leave room for a recovery partition on the external disk?  Then repartition it with a small (2GB) partition that can hold a bootable recovery partition that you can setup via the Apple "Recovery Disk Assistant" which can be downloaded from Apple.

  • To know the amount of free space in a tablespace

    hi,
    I'm learning oracle 9i release 9.2.0.1.0 .I'd created a tablespace 'TOOLS' for being used as the default tablespace for Statspack.
    I wish to know the amount of free space available in this tablespace. For this purpose I ran the following query but there was no rows selected :-
    SQL> select tablespace_name,bytes from dba_free_space
    2 where tablespace_name='TOOLS';
    no rows selected
    SQL> select name from v$tablespace;
    NAME
    CWMLITE
    DRSYS
    EXAMPLE
    INDX
    ODM
    SYSTEM
    TOOLS
    UNDOTBS1
    USERS
    XDB
    TEMP
    Can anyone tell the reason for this.

    I tried your query
    SQL> select TABLESPACE_NAME,
    2 sum(BYTES) Total_free_space,
    3 max(BYTES) largest_free_extent
    4 from dba_free_space
    5 group by TABLESPACE_NAME;
    ♀TABLESPACE_NAME TOTAL_FREE_SPACE LARGEST_FREE_EXTENT
    CWMLITE 11141120 10878976
    DRSYS 10813440 10813440
    EXAMPLE 131072 131072
    INDX 26148864 26148864
    ODM 11206656 11206656
    SYSTEM 3211264 3080192
    UNDOTBS1 199229440 196149248
    USERS 26083328 26083328
    XDB 196608 196608
    9 rows selected.
    Again there were no rows for TOOLS tablespace.

  • Free space in external drive when trash is empty

    I had a big folder in my external hard disk (60 Gb) I sent it to the trash and then I empty the trash but the space the file occupied is still ocuppied in the drive. How do I free up the space in my external drive? I know it should be free but somehow emptying the trash didn't worked. Help!

    This issue happens to me to on ALL my Macs. For example if I have a flash drive that is 1024 MB and I put on 9 files that are 100 MB the used space is of course 900 MB. But, if I delete one of them then the use space does not go down to 800 MB it stays at 900 MB. You can empty trash and free up used space and it never shows it available again.
    I have tried all the Partition Schemes on the flash drives and hard drives I own. (All the drive are different manufactures.) I have tried different formats and it's still the same. I have used a New MacBook, New MacBook Pro, New iMac and they all do the same dang thing!!! I even used an old G4 eMac and same thing!
    It's defiantly an OS issue.
    So what's up anyone have a REAL fix for this? I am tried of having to take data off of an external drive store it in a folder, then format the external then add my data back. It's getting to be freaking ridiculous.
    My poodunk Windows doesn't do that!
    OH FYI, A good fact to note if I use a drive partitioned as Partition Scheme MBR and Format FAT32 (so both OS can use it). The drive of course will work just fine on the Windows I can free up space and reuse space. But, when I put it in the Mac I will free up space and it won't be recognized anymore same issue, however if I put it back into my Windows the Windows NO LONGER sees the space I tried to free up with my Mac. I can continue to work with the space I have left, but the Mac has completely removed those blocks of data from being used again until I reformat the drive. Is that ODD?!
    Now don't confuse that last paragraph and think it only happen on MDR or FAT32 Cuz it happens on all partition schemes and formats as I mentioned above. I just thought it was interesting that Mac effects the drive to where the other OS can't read that data anymore either.
    Please help!
    Message was edited by: theelysium

Maybe you are looking for

  • Getting error in Mozilla, reading xml using JavaScript

    Hi All, I am working with javascript with xml, getting error in Mozilla 1. see html and xml file and check xml file path before test --- 2. please, go through the html and xml file. read_xml.html ================= <html> <head> <title>xml file using

  • Down Payment for Investment Measure

    Dear experts, I want to use down payment against an Investment measure (i.e. Internal Order for capital items). My scenario is as follows: We have the following need for payments: 30% down payment 60% on goods receipt 10% on acceptance of the capital

  • Results are different when printing from CS5 and CS4

    A file that printed fine with Photoshop CS 4 printed very dark when printed with CS5, with no changes made to the settings. Has anyone else had this problem?

  • Unity 7.0 - AD Domain Admin Group

    I have Unity 7.0 with failover, AD, and Exchange 2010.  Unity accounts are created in AD in the Domain Admin Group.  Most that I have read states if Unity is a domain controller it needs to be in the Domain Admin group.  I do not know how to see if U

  • My iPhone 5 restarts after a while

    Hi, I am having this problem since today, 2 days ago my battery run out and I didn't have any charger. Today I charged the phone and it keeps restarting, during the charging process and even after it. It looks like something fails, the display shows