Where did the Partitions and SubPartitions go?

I created a table with partition Range (Transaction_Date, Retention_Period) and hash (Record_Id) subpartition template (for 32 subpartitions)
Then I add more partitions and while the loop is going on I can get counts of partitions and subpartitions. The job finished and my log table shows about 1800 partitions added and there should be 32 subpartitions for each of the partitions. However, user_tab_partitions shows zero records for the table, and user_tab_subpartitions also show zero record. After a few minutes the partitions show up but no subpartitions. The indexes on the table have also disappeared (one local and one global)
Any explanation for this behaviour?
Working on Exadata 11.2.0.3
Querying
USER_TABLES
USER_TAB_PARTITIONS
USER_TAB_SUBPARTITIONS
USER_INDEXES

>
Step 1. Create Table xyz (c1 date, c2 integer c3 integer, etc)
partition by range (c1,c2)
subpartition template (s01, s02... s32)
create index i1 on xyz (c1,c2,c3) local;
Then, since I want to create about 1800 partitions I have a procedure that has a "loop around" ALTER TABLE add Partition .. until all the partitions are created. This is the "Job" which while running I query USER_TAB_PARTITIONS and USER_TAB_SUBPARTITIONS to see how things are progressing. And Yes ALTER Table has no progressing to verify.
So al the partitions get created. No errors from the procedure to go through creating all the partitions. So I would expect that at the end I should get to see all the new partitions for the Table. Instead I get "no records" from USER_TAB_PARTITIONS and USER_TAB_SUBPARTITIONS.
I am also aware that "ALTER TABLE ADD PARTITION .." cannot make indexes go away. However, if the query on USER_INDEXES returns nothing, what happend to the Index created before the partitions were added?
I am not using DBMS_REDEFINITION. The only procedure is to add partitions one at a time for each date for 3 years. If you have a better way than a procedure please advise accordingly.
>
In order to help you the first step is to understand what problem you are dealing with. Then comes trying to determine what options are available for addressing the problem. There are too many times , and yours may, or may not, be another one, where people seem to have settled on a solution before they have really identified the problem.
Anytime someone mentions the use of dynamic SQL it raises a red flag. And when that use is for DDL, rather than DMl, it raises a REALLY BIG red flag.
Schema objects need to be managed properly and the DDL that creates them needs to be properly written and kept in some sort of version control.
Scripts and procedures that use dynamic SQL are more properly used to create DDL, not to execute it. That is, rather than use a procedure to dynamically create or alter a table you would use the procedure to dynamically create a DDL script that would create or alter the table.
Let's assume that you know for certain that your table really needs to have 1800 partitions, be subpartitioned the way you say and have partition and subpartitions names that you assign. Well, that would be a pain to hand-write 1800 partition definitions.
So you would create a procedure that would produce a CREATE TABLE script that had the proper clauses and syntax to specify those 1800 partitions. Your 'loop' would not EXECUTE an ALTER TABLE for each partition but would create the partition specification and modify the partition boundaries for each iteration through the loop. Sort of like
for i from 1 to 365 loop
    add partition spec for startDate + i
end loop;The number of iterations would be a parameter and you would start with 2 or 3. Always test with the smallest code that will produce the correct results. If the code works for 3 days it will work for any larger reasonable number.
Then you would save that script in your version control system and run it to create the table. There would be nothing to monitor since there is just one script and when it is done it is done.
That would be a proper use of dynamic sql: to produce DDL, not to execute it.
Back to your issue. If I were your manager then based on what you posted I would expect you to already have
1. a requirements document that stated the problem (e.g. performance, data management) that was being addressed
2. test results that showed that your proposed solution (a table partitioned the way you posted) solves the problem
The requirements doc would have detail about what the performance/management issues are and what impact they are having
You also need to document what the possible solutions are, the relative merits of each solution and the factors you considered when ranking the solutions. That is, why is your particular partitioning scheme the best solution for the problem.
You should have test results that show the execution plans and performance you achieved by using a test version of your proposed table and indexes.
Until you have 'proven' that your solution will work as you expect I wouldn't recommend implementing the full-blown version of it.
1. Create a table MANUALLY that has 2 or three days worth of partitions.
2. Load those partitions with a representative amount of data
3. Execute test queries to query data from one of those partitions
4. Execute the same test queries against your current table
5. Capture the execution plans (the actual ones) for those queries. Verify that you are getting the performance improvements that you expected.
Once ALL of that prep work is done and you have concluded that your table/index design is correct then go back to work on writing a script/procedure that will produce (not execute) DDL to produce the main table and partitioning you designed.
Just an aside on what you posted. The indexes should be created AFTER the table and its partitions are created. If you are creating your local index first, as you post suggests, you are forcing Oracle to revamp it 1800 times when each partition is added. Just create the index after the table.
p.s. the number of posts anyone has is irrevelant. The only thing that matters is whether the advice or suggestions they provide is helpful. And the helpfullness of those is limited to, and based on, ONLY the information a poster provides. For exampe, your proposed partitioning scheme might be perfectly appropriate for your use case or it could be totally inappropriate. We have no way of knowing without knowing WHY you chose that scheme.
But I haven't seen one like that so it makes me suspicious that you really need to get that complicated.

Similar Messages

  • Album Artwork - Where did the volume and song title go?

    I've been searching online for hours and can't find this on my own so i'm reachin out...
    I did a software update (which i won't ever do again) and now when a song is playing the cover art (or a big empty box if i remove cover art) is all that shows on the screen. It use to display the current song playing including artwork, the progression of the song, and the volume in the screen. now i can't get any information on the screen other than the album art cover. anybody else experienced this???
    Model PA079LL
    Software update : 1.2.1

    Thank You Jeff
    It worked!
    I looked for hours and maybe I just missed it but your suggestion worked in 5 seconds. I really appreciate the help!
    THANK YOU AGAIN!
    Kevin

  • Doubt in partition and subpartition

    hi gems...good afternoon...
    I have a doubt redgarding partitioning and subpartitioning...This may be a silly question, but i am really not getting this...please help me..
    I have a table which has Range-Hash composite partitioning.
    The Range partitioning is on the default tablespace TS_PROD (because I didnt mention any tablespace name in the Range partitions).
    The Hash subpartitioning are on the corresponding partition tablespaces (TS_PART1,TS_PART2,TS_PART3....TS_PART6).
    I have created total 8 Range partitions and the number of Hash subpartitions are 6 for each of them.
    Now when I query the DBA_TAB_PARTITIONS, then I got the desired output i.e. all the Range partitions are in the default tablespace.
    When I query the DBA_TAB_SUBPARTITIONS, then also I got the desired output i.e. all the Hash subpartitions are in the separate partition tablespaces.
    But when I have inserted data in that table, then I found that both the default tablespace and partition tablespaces are getting filled up.
    Moreover, the sum of the increase in sizes of the partition tablespaces is equal to the increase in default tablespace.
    I am not getting the concept of this. Where are the datas are getting stored??? In the default tablespace or in the partition tablespaces??
    Thanks a lot in advance..

    thanks a lot RP for your reply...
    and sorry for the late and miscommunication...
    Actually i am not so experienced in the DBA line and in my company suddenly my senior DBA left and i am the only one here...I got tensed... :( :(
    I have started reading documentation of Oracle, have started the Administrator's Guide first...
    Anyways...now i got the concept of the partitioning and subpartitioning i was doing...
    The mistake which I was doing is: I was not mentioning the primary key index tablespace and that segment is going into the default tablespace and thats why the size was increasing for both default tablespace and partitioned tablespaces. Because of that fact I was getting confused again and again.
    As soon as I mentioned the primary key index tablespace, the size of the default tablespace stopped increasing...
    Now the script from which I am getting the size of the tablespaces: (join of dba_datafiles and dba_free_space)
    select /* + RULE */ t.tablespace, t.totalspace as " Totalspace(MB)",
    round((t.totalspace-fs.freespace),2) as "Used Space(MB)",
    fs.freespace as "Freespace(MB)",
    round(((t.totalspace-fs.freespace)/t.totalspace)*100,2) as "% Used",
    round((fs.freespace/t.totalspace)*100,2) as "% Free"
    from
    (select round(sum(d.bytes)/(1024*1024)) as totalspace, d.tablespace_name tablespace
    from dba_data_files d
    group by d.tablespace_name) t,
    (select round(sum(f.bytes)/(1024*1024)) as freespace, f.tablespace_name tablespace
    from dba_free_space f
    group by f.tablespace_name) fs
    where t.tablespace=fs.tablespace
    order by t.tablespace;
    Thanks a lot RP for your help... :)

  • I'm installing windows 8 64 from iso dvd-I did the partition wiht BCamp 5 and I did the usb with compatibility software-once installation start from dvd, it ask me for some disk, usb or dvd drivers to continue. How I can continue the instalation?

    I'm installing windows 8 64 from iso dvd-I did the partition wiht BCamp 5.
    I did the usb drive with the compatibility software-once installation start from the dvd, it ask me for some disk, usb or dvd drivers to continue.
    How I can continue the instalation? How I can provide those driver to the instalation process?
    Thanks
    Manuel

    You can't get there with GUID/GPT.
    There are tips on making a USB flash device that is bootable.
    You can set aside a small 6GB partition somewhere and put Windows 7 installer there and run it WHILE IN Windows.
    Windows Vista can be upgraded in place to 7 RC.
    You'll need NTFS (30-50GB).
    Windows doesn't support FW for booting.
    You can create a drive that has Master Boot Record.

  • I just downloaded the new iOS 5.0 and did all of the backup prompted steps beforehand, but I can't figure out how to get all of my apps and music back on my iPhone. Where did they go and how can I put them back on my iPhone?

    I just downloaded the new iOS 5.0 and did all of the backup prompted steps beforehand, but I can't figure out how to get all of my apps and music back on my iPhone. Where did they go and how can I put them back on my iPhone?

    Hi, Abril_Perez17.
    This may be related to a new feature embedded in iOS7 that shows all purchased music by default.  Go to Settings > Music, then turn off Show All Music.  See if the issue ceases once the feature has been disabled.  This information is located on page 63 of the user guide below. 
    iPhone User Guide
    Regards,
    Jason H. 

  • Got a new Macbook Pro itunes music was all there.  Suddenly it is not and my library is probably about 1/4 of what it was.....where did the music go and how do I get it back?

    Got a new Macbook Pro itunes music was all there.  Suddenly it is not and my library is probably about 1/4 of what it was.....where did the music go and how do I get it back?

    Hi there,
    You may find the article below helpful.
    No content shows up in iTunes after updating
    http://support.apple.com/kb/TS1967
    -Griff W.

  • I had 200 song the i have bought and now i only have 4 purchased songs where did they go and why dd this happen i didnt spend all this money for them to disappear.

    i had 200 song the i have bought and now i only have 4 purchased songs where did they go and why dd this happen i didnt spend all this money for them to disappear.

    sorry to hear that. You can try redownloading them from iTunes in the Cloud or from your purchased page:
    Downloading past purchases from the iTunes Store, App Store, and ...
    support.apple.com/kb/ht2519 
    This article may also help you locate them:
    iTunes: Finding lost media downloads
    http://support.apple.com/kb/TS1408

  • HT2493 I downloaded Maverick and when done noticed that the "BURN" icon for my cd/dvd burner is missing. Where did it go and how do I get it back?

    I downloaded Maverick and when done noticed that the "BURN" icon for my cd/dvd burner is missing. Where did it go and how do I get it back?

    In a Finder window, right click on the window's tool bar, select Customize, and drag the Burn button to the tool bar.

  • I have CS6 it use to have the Acrobat XPro now it is gone. Where did it go and how do I get it back?

    I have CS6 it use to have the Acrobat XPro now it is gone. Where did it go and how do I get it back?

    We can't know. You are not offering any system info or details on what product/ suite you are actualyl referring to by "CS6" nor do we know what update or install procedures on your system you may have done recently. There was an Acro update last week, perhaps it bombed and destroyed your Acro install...
    Mylenium

  • When my wife tries to update one of her apps a strange Apple ID pops up. Her Apple ID is correct in settings and in the apple store. What does this mean? Where did the other one come from?

    When my wife tries to update one of her apps a strange Apple ID pops up. Her Apple ID is correct in settings and in the apple store. What does this mean? Where did the other one come from?

    There is something on your iPhone (a music file, iBook, document or video) that belongs to another Apple ID.  Only your wife would know how that file arrived there.  Your iPhone is asking for the correct Apple ID for all of the files that are resident on the iPhone.

  • Where did the iPhoto 10 iCloud Photostream come from and how do I get rid of it?

    I just updated my MacBook Air to mavericks.  I have an iPad and iphone as well just updated to ios7.  My Mac updated iPhoto as well.  Now when I opened iPhoto I got my flickr and Facebook integrated folders in the left pane plus an iCloud photostream.
    I didn't have that before and it has 287 pictures pulled from many devices but I didn't set that up.  I only had/have a private photostream with a particular name and about 10 pics in it.  this new one is just called iCloud photostream and it has 287 pics of which some I know I took with my iPad and others with my iphone.  I of course sync both devices with my Mac so this pics are in my iPhoto library as well.
    Where did the iPhoto 10 iCloud Photostream come from and how do I get rid of it?

    In the iPhoto preferences turn PhotoStream off
    LN

  • Disable 24-bit crystalizer... and where did the snap/crackle/pop

    For the longest time, I thought the crackling and popping was because of the CMSS3D Headphone option being enabled, but just for kicks, I tried disabling the 24-bit crystalizer, and poof! Where did the snap/crackle/pop go? It seems to be gone! I can li've without the crystalizer, after all there is really no way to make something sound better than the source. This gives me hope that it is a driver issue after all. I have a Rev A fatalty.

    It is still there... you cant just hear it as good anymore.. i never have crystalizer on, i still got my rice crispies. So good if you dont hear it anymore.. but i know this wont fix it for many of us. I can agree that if i have cmss3d enabled but have MacroFX and Elevation Filter off, the pops& crackles are lower in volume.

  • HT5548 I pulled my launchpad from the dock bar to the main screen and a little puff of clouds appeared and it disappeared ?? I am now trying to find it, where did it go and how do I get it back?

    I pulled my launchpad icon formt he dock bar to the main screen and a little pop sound and a little puff of smoke appeared on the screedn and it dissappeared.  I want to bring back the launchpad to the dock bar.  Where did it go and how do I get it back on my screen?

    1. It's gone. Shortcuts like it disappear without confirmation when dragged out.
    2. Choose Applications from the Finder's Go menu and drag it back.
    (85989)

  • HT1473 I was loading the new operating system to my 4s iphone I had to remove my music to have enough space I clicked on the box that said sync music to computer and remove from phone. The only music saved was the ones bought on itunes where did the other

    I was loading the new operating system to my 4s iphone
    I had to remove my music to have enough space
    I clicked on the box that said sync music to computer and remove from phone.
    The only music saved was the ones bought on itunes where did the others go
    This is a new imac

    For music that you've purchased from Apple that are on your iPhone you should be able to copy to your computer's iTunes via File > Transfer Purchases. Also if you are in the US then you should be able to re-download past music purchases for free : http://support.apple.com/kb/HT2519
    For your own music that you've copied, then if you haven't got a backup on, for example, external drives or CDs/DVDs then you could see if any of the utilities mentioned in this old post still exist and work

  • Where did the iPhone Calendar list function(s) go with iOS7? The Calendar has gone all 'spread sheet' on me and definitely not user friendly. Please advise.

    Where did the iPhone Calendar list function(s) go with iOS7?  The Calendar has gone all 'spread sheet' on me. If you select an item (grey dot) from the month display it will open up the 'spread sheet' at the current time of day, not necessarily when the calendar entry takes place.  I liked iOS6 where you could turn your iPhone to landscape mode and get that special 'spread sheet' feel if that's what you're into.  Has a 'List' presentation been removed from the iPhone Calendar with iOS7?

    The List view is displayed by tapping the Search magnifying glass.

Maybe you are looking for

  • Number range does not exist error message while releasing billing document

    Hi, We are trying to release a billing document to Accounting through VF02. But the system throws an error message that "For object RF_BELEG 1000, number range interval  does not exist FBN1".  Note : System does not specify which number range is miss

  • The application smbd quit unexpectedly. (???!)

    Something definitely kooky going on... I haven't been able to access any XP shares in the office (other macs have no probs) for 2 days. Now I am getting an error alert on a regular basis saying: The application smbd quit unexpectedly. EXCBADACCESS (0

  • Does anyone know why this happened ?

    i have an ipod touch 4th gen when i was downloading a app the screen went black.i tried to fix it by pressing the button but it made it worse red lines appeared on the screen and after a while it got fixed but i was just wandering why this happend an

  • Help!!! CS4 freezes over and over again

    Hello, my Photoshop CS4 all the sudden starts to freeze, sometimes on even opening a jpg, sometimes when resizing an image, sometimes when I use the lasso tool, for no apparent reason. Its so bad that at times it freezes my complete pc. At first I ha

  • Edit this script so .log replaces .jpg

    Here's portion of script I'm editing: As it is it results in .log is appending to filename. Thus I end up with filename.jpg.log. How do I get it change filename to filename.log? (Filetype is of no concern here). This needs to be unattended. tell appl