Best way to correct Tablespace fragmentation?

Dear DBAs,
The following query returns tablespace fragmentation:
select
tablespace_name,
count(*) free_chunks,
decode(
round((max(bytes) / 1024000),2),
null,0,
round((max(bytes) / 1024000),2)) largest_chunk,
nvl(round(sqrt(max(blocks)/sum(blocks))*(100/sqrt(sqrt(count(blocks)) )),2),
0) fragmentation_index
from
sys.dba_free_space
group by
tablespace_name
order by
2 desc, 1;
I have 3 tablespaces that are Locally Managed and suffer heavyt fragmentation. I just received the task of tuning this database and from what I could tell the fragmentation originated from a number of bad practices from past DBAs and also, some bizarre structures in certain tables.
My question is: what would be the best way to correct tablespace fragmentation LMT? I'm thinking export - drop - import to reorganize all blocks within the tablespace?

Alvaro wrote:
Dear DBAs,
The following query returns tablespace fragmentation:
select
tablespace_name,
count(*) free_chunks,
decode(
round((max(bytes) / 1024000),2),
null,0,
round((max(bytes) / 1024000),2)) largest_chunk,
nvl(round(sqrt(max(blocks)/sum(blocks))*(100/sqrt(sqrt(count(blocks)) )),2),
0) fragmentation_index
from
sys.dba_free_space
group by
tablespace_name
order by
2 desc, 1;
I have 3 tablespaces that are Locally Managed and suffer heavyt fragmentation. I just received the task of tuning this database and from what I could tell the fragmentation originated from a number of bad practices from past DBAs and also, some bizarre structures in certain tables.
My question is: what would be the best way to correct tablespace fragmentation LMT? I'm thinking export - drop - import to reorganize all blocks within the tablespace?In addition to what everyone else notes is the unlikelihood of fragmentation, there may be implicit compaction and skew in your data distribution that could be impacted by export/import. For better or worse.
What bad practices are you referring to? Sometimes practices are inappropriate, sometimes useless, sometimes perfectly understandable. If you don't know about the fragmentation issue, I wonder how well you judge practices. And yes, there are some really bad practices floating about.

Similar Messages

  • What is the best way to move tablespace

    i have to move one big tablespace (with 130-140 datafiles) from one instance to another (it's oracle 10.2.0.0.4), so what is the best way to do it?

    anfy2002us wrote:
    yeah and i think that transportable tablespace it the best way, but for such big database it might take several day, and there is no way to go offline for several daysWell, With TTS, Oracle won't actually export/import the data, it only export and import the metadata related to the tablespace and the schemas and tables of course. Most time you need to spend on the operation is copying files at OS level on storage. So it won't take days to copy the files unless your storage is terribly slow.

  • Invoice Paid to INcorrect PO - Best way to correct

    Situation - 2 PO's for same Vendor. Invoice Paid to Wrong PO
    Is there any other way to correct an Invoice Paid to the wrong PO besides issueing a Credit Memo and Invoice at the same time (e.g., so a Payment does not go out the door).  Also, caution must be followed to ensure both payment methods are the same for both the Credit Memo and Invoice. 
    Thanks!

    Hi
    I guess you receive different invoices for both the POs. The process of raising a credit memo is the best way to solve this issue. Did you think about cancelling the Invoice document in MR8M if it is feasible,  here this will affect your stock accounts based upon the current stock position for the said Invoice/PO quanity.
    One more additional check you can have is to use to activate the check box "check doubel invoice"  below Tolerance Group  in the Vendor payment Transactions Accounting view of vendor master. This will help you to restrict the entry of wrong PO attached to the invoice if you have already processed the Invoice (provided you are using the reference field in MIRO by entering the INVOICE number of the PO).
    Regards
    SAM

  • Small Torn Piece of Paper Stuck in Roller: Best Way to Remove Torn Fragment of Paper

    While using the automatic feeder to copy a document, a small piece of the paper got caught and then ripped.  It is caught in the roller.  I can't get it out without ripping more of the paper and leaving an unreachable paper fragment in the roller.  How can I get it out?

    Hi there Ladylawyer1,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I'm sorry to hear that there is jammed paper in your unit. I would recommend manually turning the paper roller to see if that helps loosen the paper for you.
    Best wishes,
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • What's the best way to correct my iTunes library's track and artists names?

    I need to know how i can i correct the name of the files in my iTunes library.
    For example, a lot of people have REM in their library which is not correct, it's R.E.M.
    I am sure there's an application that will scan my library and correct the info.

    While at first glance iTunes does an adequete job of naming music it does have its issues. It will not change the name of the actual file to match the music.
    There are much better programmes out there to do this, I use mp3Tag (free). This will change your tag data and you can change your filename to match. It should be pointed out that this will not work with music downloaded from the iTunes store only the stuff you have ripped.
    I have not tried it by converting iTunes Plus music to mp3 and then changing the tag data. Does anyone know if this works?

  • Have a picture scanned from a negative, the whole picture is off-color. Whats the best way to fix it

    I scanned an old negative and the resulting picture is off-color (as was the negative). What are the best ways to correct this?

    Trevor - Here it is.

  • Best Way to Liven a Slightly Dull Recording

    I'm starting to notice that most of my mixes are actually a little too "warm", they seem to be missing some high frequency energy. Many of the tunes sound better in my car when i bump the treble up a notch or two.
    My guess is that I'm losing high frequencies due to imbalanced absorbtion in the studio. I'm constructing new panels this week that will be far superior to the current eggshell foam (yikes!), but would love some input on the best way to correct this after the fact.
    Should I attempt to add some highs back in on individual tracks first, or just treat this in mastering, as all of the instruments that were recorded live are likely to have similar frequencies missing? Linear phase eq on the master output, multi band compression, or download and try out Ozone? Thanks everybody.
    Once I get the band's permission I'm going to post some of the songs, I would love some constructive criticism as well.

    OK, so the ( inexistent ) SRC won't hurt your track.
    POW-r algos were optimized for signals in ( what I've heard )
    #1 Speech
    #2 Pop
    #3 Classical
    That's signal dynamics and frequency not the intent, very generalized examples and nothing near a rule of thumb. 3 may work best for a Pop track and any variations. If you are going to pick one without comparing you could try #2... but it is best to compare when you have time. An easy way to compare is to reduce the input amplitude, then boost the post dither output ( in effect, amplifying the noise/dither )..
    By amplitude practices, I just meant your gain structures in the mix/mastering stages. An example would be how high is the peak sample of the bounce... since you say your mixes have dynamic range you'll have less to worry about there too.
    That old thread... I can actually guess the one. The closest measurement I have made so far has been -188 dB Signal/error ratio induced by rounding, which of course accumulates.
    Usually, the value off the fader is anything bit 0 ( makes perfect sense, different fader settings normally just apply different degrees of DC Offset or around -188 dB. If you really listen and demand excellence, you can hear it. I have since come up with a wokaround which should be lossless so I can continue in my merry way with less compromise while recording.
    re: Fooling with tight mixes
    yeah, you could try moving all that automation around but usually it doesn't end up quite the same.
    Cheers,
    J

  • Best way to apply Schemas to Fragments

    I'm been researching the best way to apply schemas to my fragments.   Either by applying all fragment and field schema elements to the form
    or to put the fragment schema elements within the fragment.   I feel keeping a schema within the fragment seems like the way to go, but
    unsure.   I you only reference a fragments schema in a form and a fragment within that form changes, do you have to go back a modify every form schema that is using that fragment?  If I keep the schema in the fragment then I would only need to modify the fragment schema..correct?
    Wow..hope this makes sense.

    I agree with the small caveat that it sort of depends on the business/technical requirements surrounding your use of fragments.  Fragments can be sort of flaky and difficult to work with so to peg a specific all-encompassing "best practice" would, in my opinion, be impossible.  Using relative bindings in fragments is great (in fact it's what I'm doing on my current LC project), but it ends up becoming a bit limiting.  It can make the fragment pretty tightly coupled to the "main" XDP form and whatever schema/XML is bound to it.  Probably 9 times out of 10, that's not an issue, but the reasons for electing to use fragments can make it something you really need to think about.
    My advice would be to avoid fragments unless you specifically need that functionality for a specific reason.  It's easy to use fragments because they are cool and seem clean, but then can end up causing more headache than it's worth.  On the other hand, using fragments as a method of compartmentalizing script objects is really really helpful.  It helps you keep all your JavaScript inside script objects (instead of inside object events) and allows for reuse of scripts in different areas of the form(s).  This saves development time, refactoring time, and disk space.  I highly recommend looking into that scenario whenever possible.
    Hope this helps.
    Ryan D. Lunka
    Cardinal Solutions Group
    [email protected]

  • HT3775 I NEED I TUNES FOR A 64 BIT PC. OPERATING SYSTEM IS WINDOWS 8, NON TOUCH SCREEN. WHICH IS THE ABSOLUTELY BEST WAY TO GET ITUNES OPERATING CORRECTLY ON MY PC????//I HAVE TRIED SEVERAL THINGS, NONE OF WHICH ARE WORKING. IS ITUNES DELIBERATELY EXCLUDI

    I cannot get itunes to work/install on myPC. I am running windows 8 in a 64 bit machine. I also want to purchase books via itunes for my Nook. Are you deliberately excluding PC owners so we cannot use ituens on our computers???? I have selected a community but have no idea what community I should be working with. Can somone explai these communities to me? Also. you don't allow much time to go thru the sign up process. I had to start over SEVERAL times as you kept timing me out. Jesus...when people are signing up for the first time, we have no idea of the questions that will be asked. Give us a break and give us time to sign up. Not everone is disability free and able to go thru your process quickly...you are NOT user friendly. You should be for people who are wanting to join your community. I used to want an Apple product but now that  I have had first hand experience with your web page, I think I will probably stay away from Apple products. VERY DISAPPOINTING

    Jan 11, 2014 10:26 AM  Re: I NEED I TUNES FOR A 64 BIT PC. OPERATING SYSTEM IS WINDOWS 8, NON TOUCH SCREEN. WHICH IS THE ABSOLUTELY BEST WAY TO GET ITUNES OPERATING CORRECTLY ON MY PC????//I HAVE TRIED SEVERAL THINGS, NONE OF WHICH ARE WORKING. IS ITUNES DELIBERATELY EXCLUDING
      Re: I NEED I TUNES FOR A 64 BIT PC. OPERATING SYSTEM IS WINDOWS 8, NON TOUCH SCREEN. WHICH IS THE ABSOLUTELY BEST WAY TO GET ITUNES OPERATING CORRECTLY ON MY PC????//I HAVE TRIED SEVERAL THINGS, NONE OF WHICH ARE WORKING. IS ITUNES DELIBERATELY EXCLUDING PC'S  in response to Birdlover1      
    Post over in the iTunes for Windows forum, here:
    https://discussions.apple.com/community/itunes/itunes_for_windows
    sebastian

  • Best way to go from Final Cut to DVD preserving Color Corrections

    What is the best way to take my video project from Final Cut and burn it on a DVD (using DVD Studio), I need to preserve the color corrections I have made (used an external video monitor)? Also my camera shoots at black level IRE 0 and I have edited it that way, but as we all know NTSC TVs use IRE 7.5 is there anyway DVD Studio or FCP can convert the IRE so it matches?

    from FC; export to compressor
    In compressor, choose appropriate preset (i.e. best quality, >90 minutes, 16x9)
    encode the sound as dolby 2 (if you choose "all" you'll get an extra aif file)
    take the 2 files (video and audio) into dvd studio to encode.
    Not sure about your IRE 7.5 question, I always assumed it was automatically converted but now you have me thinking...

  • Hi all! What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    Buying more hard drive space is a very valid option, here.  Editing takes up lots of room, you should never discount the idea of adding more when you need it.
    Another possibility is exporting to MXF OP1a using the AVC-I codec.  It's not lossless, but it is Master quality.  Plus the file size is a LOT smaller, so it may suit your needs.

  • Best way to know correct forecast model - process chain set up with multiple forecast models

    Hi Experts,
    I need your help in selecting best forecast model for our company. We have some of the models already used for our company, and because of multiple models used it is taking very long time for process chain to finish. There is no existing documentation available on which model was used why initially. Please help me to make out forecasting process smooth.
    - What is the best way to know, which forecast model is correct and should be used for our forecasting process.
    - In case multiple forecasting models are really required to be used, please suggest ways to optimally schedule them in process chain.
    - At times we get messages like "not enough data available" for specific model - any way to avoid this.
    - How to optimally use parallel processing profiles forecasting process in process chain.
    - Things which should be avoided.
    Request your help, please share your experiences.
    Regards
    NB

    Hi Neelesh,
    There are many points you need to consider to redesign forecast process for your company/client.
    You need to select the best suited forecast model first depending on the business. This has to be well tested & agreed by business users. Complexity will be an outcome of this exercise with business users. Best id to give then a brief intro on all available models & then help them selection the best one as per their requirement.
    Auto selection models are generally more time taking & should be used only when you have no idea at all on the business/demand pattern.
    Run time will depend how you are clubbing the CVCs to get the forecast generated & also parallel processing. For parallel processing profile you will need to do trial & error testing along with help from Basis team on how many free dial up processes are available.
    Even you can run many forecast calculations in parallel if the product/cvcs are totally different. - As per my personal experience maximum run time reduction can be achieved here.
    Daily run is not advisable except only for businesses where you have too much dynamism in demand planning i.e. you expect the demands to be changed overnight. Most of the companies run forecast on monthly basis or at weekly basis at the max.
    "Not Enough data" will be a problem if you are having the irrelevant models used in forecast profiles. This means users are not bothered to maintain the needed data for he forecast calculations or they are not aware at all of the situation. Running such models on daily basis is not advised at all. Better users should use interactive forecasting & saving the results in such cases.
    Just to give a crude example we get forecast calculated on monthly basis for approximately 4 lac cvcs in less than 3 hrs using moving avg, seasonal linear regression, seasonal trend, croston models. We use parallel profiles also everywhere with 10 blocks & 500 cvc/block.
    Hope this helps. Let me know if you have nay more questions & also the results using any of this.
    Regards,
    Rahul

  • What's the best way to reorganize table or tablespace?

    Hi,
    I have a db of Oracle 9ir2, and it works 24*7.
    So I can't shut it down to do reorganization.
    I have known some ways to do, like exp/imp, CTAS, alter table move ...etc.
    Anybody can tell me what is the best way to do reorganization online.
    And what advantages and disvantages in that ways.
    Thanks & regards

    every approch as its pros and cons.
    For an example, exp/imp, you need to take the export, drop the schema, create schema with all required privileages and then import.
    CATS, generats a lot of redo, and then, you need to re-create their intigrity constraints and other stuff.
    alter table move.. also generates a lot of redo, apart from them, you need to rebuild indexes.
    I have the same situation in office and I do the third option, which is alter table move. I wrote my own scrit as following description.
    In first loop I move a single and then, in the inner loop, I rebuild all indexes of this table, so that other tables are accessable and then so on. I have had no problems.
    If you want this script mail me @ [email protected], I will send you the script.
    Jaffar

  • Best way to set up ssd/hdd

    Hi guys,
    I just upgraded my MacBook pro with an intel 80gb ssd along with a 500gb caviar blue hdd. I have found many conflicting answers to this question and was wondering if anyone found the best solution. I intend to use the SSD as the boot drive with applications. I have already used CCC to clone everything but the users folder, and it seems to be working fine, but I have seen in other places that it may bog down SSD performance by just cloning the drive, and a clean install would be best, but I had a hard time figuring out how to best transfer the applications should I go down that route. So essentially my question is, what would be the best way to divide up my data and how would you go about doing it? Thanks in advance for any help.

    If your original drive and the files on it are in good shape, no errors, and you use good cloning software there should not be any problem cloning the old spinning drive to the new SSD.
    What I think may be happening in other cases is they never enabled TRIM support and without it the SSD can nget fragmented (fragmented may not be the correct term) which will lower the performance of the drive.
    TRIM is only enabled by default when you install a SSD sold by Apple. There are hacks to enable it on any SSD drive. Just do a search for it on google.

  • Best way to refresh page after returning from task flow?

    Hello -
    (Using jdev 11g release 1)
    What is the best way to refresh data in a page after navigating to and returning from a task flow with an isolated data control scope where that data is changed and commited to the database?
    I have 2 bounded task flows: list-records-tf and edit-record-tf
    Both use page fragments
    list-records-tf has a list.jsff fragment and a task flow call to edit-record-tf
    The list.jsff page has a table of records that a user can click on and a button which, when pressed, will pass control to the edit-record-tf call. (There are also set property listeners on the button to set values in the request that are used as parameters to edit-record-tf.)
    The edit-record-tf always begins a new transaction and does not share data controls with the calling task flow. It consists of an application module call to set up the model according to the parameters passed in (edit record X or create new record Y or...etc.), a page fragment with a form to allow users to edit the record, and 2 different task flow returns for saving/cancelling the transaction.
    Back to the question - when I change a record in the edit page, the changes do not show up on the list page until I requery the data set. What is the best way to get the list page to refresh itself automatically upon return from the edit-record-tf?
    (If I ran the edit task flow in a popup dialog I could just use the return listener on the command component that launched the popup. But I don't want to run this in a dialog.)
    Thank you for reading my question.

    What if you have the bean which has refresh method as TF param? Call that method after you save the data. or use contextual event.

Maybe you are looking for

  • Setting field header width in table control

    I have created  a table control by using the wizard and i am populating my internal table data in to this. Here i have small issue. There are two fields called recoverable, identifiable with char (1). These two field headers are displayed as R, I on

  • Authorization for User to Jump the Query

    Hi, The user1 (log is not generating for this user in RSSM) cannot use the jump target in the reports which have been placed under a role, whereas the other user2 (log is able to generate for this user in RSSM) is able to jump target in the reports i

  • Restrict clicking enter key in the bdc program

    Hi all,          There is one BDC program for Vendor Master creation. In the output it is waiting for the enter key for each vendor creation. Suppose we have 1000 vendors to be created. Then we need to click enter key 1000 times. Anybody please sugge

  • Quick find a clip embedded in sequence

    I have 85 sequences on the timeline. There are some clips that are scattered around in those sequences that I need to replace. Those bad clips got messed up and has no timecode for me to just redigitize. I need a quick way to find a clip within the 8

  • Printing in Mail Cutting last line on page in half

    I have a friend, using a Macbook Pro 15", who has noticed since the last upgrade to 10.9.4 that whenever he prints a multi page document in OS X mail that the last line on the page prints half on one page and half on the next.  Default paper size is