Partitioning with multiple subpartions

I have three columns that identify a line - id, code and region. I am trying to create a partition on ID and two subparts CODE and REGION.

I don't know if it's the best way to do it, so I'm open to suggestions. I'm not really on the USERS tablespace, but I think that each column must have its own tablespace.

That's what I have so far, but I get a syntax error:

CREATE TABLE t
(   id           number
  , code         number
  , region       number
  , dt_effective date
)
PARTITION BY RANGE (id)
       SUBPARTITION BY RANGE (code)
       SUBPARTITION TEMPLATE 
       (
          SUBPARTITION part_code1 VALUES LESS THAN (500000) COMPRESS TABLESPACE users
        , SUBPARTITION part_code2 VALUES LESS THAN (1000000) COMPRESS TABLESPACE users
        , SUBPARTITION part_code3 VALUES LESS THAN (1500000) COMPRESS TABLESPACE users
        , SUBPARTITION part_code4 VALUES LESS THAN (2000000) COMPRESS TABLESPACE users
        , SUBPARTITION part_code5 VALUES LESS THAN (2500000) COMPRESS TABLESPACE users
        , SUBPARTITION part_code6 VALUES LESS THAN (3000000) COMPRESS TABLESPACE users
        , SUBPARTITION part_code7 VALUES LESS THAN (MAXVALUE) COMPRESS TABLESPACE users
       )
       SUBPARTITION BY LIST (region)
       SUBPARTITION TEMPLATE 
       (
  SUBPARTITION part_region1 VALUES (1) COMPRESS TABLESPACE users
       , SUBPARTITION part_region2 VALUES (2) COMPRESS TABLESPACE users
       )
       (
          PARTITION part_id1 VALUES LESS THAN (10001) COMPRESS TABLESPACE users
        , PARTITION part_id2 VALUES LESS THAN (20001) COMPRESS TABLESPACE users
        , PARTITION part_id3 VALUES LESS THAN (30001) COMPRESS TABLESPACE users
        , PARTITION part_id4 VALUES LESS THAN (40001) COMPRESS TABLESPACE users
        , PARTITION part_id5 VALUES LESS THAN (50001) COMPRESS TABLESPACE users
        , PARTITION part_id6 VALUES LESS THAN (60001) COMPRESS TABLESPACE users
        , PARTITION part_id7 VALUES LESS THAN (MAXVALUE) COMPRESS TABLESPACE users
       )
/


       SUBPARTITION BY LIST (region)
       *
ERROR at line 19:
ORA-00922: missing or invalid option

--sample data
insert into t
values(1,1,1,sysdate-7)
/
insert into t
values(11000,500050,1,sysdate-7)
/
insert into t
values(20010,2000010,1,sysdate-7)
/
insert into t
values(40003,2800000,2,sysdate-7)
/
insert into t
values(65000,3500000,2,sysdate-7)
/

I have three columns that identify a line - id, code and region. I am trying to create a partition on ID and two subparts CODE and REGION.

It is not possible. Oracle only supports a level of subpartitioning.

You can partition by ID and then use several columns for the subpartition (CODE, REGION).

See "Use Multicolumn key partitioning" in the doc VLDB and partitioning

http://docs.Oracle.com/CD/B28359_01/server.111/b32024/part_admin.htm#i1008909

For example, this works:

CREATE TABLE t

(identification number

code number

the region number

date of dt_effective

)

PARTITION OF RANGE (id)

SUBPARTITION BY RANGE (code, region)

SUBPARTITION TEMPLATE

(

SUBPARTITION part_code1_reg1 VALUES LESS THAN (500000: 1) COMPRESSES

SUBPARTITION part_code1_reg2 VALUES LESS THAN (500000, 2) COMPRESSES

SUBPARTITION part_code2_reg1 VALUES LESS THAN (1000000: 1) COMPRESSES

SUBPARTITION part_code2_reg2 VALUES LESS THAN (1000000, 2) COMPRESSES

)

(

PARTITION part_id1 VALUES LESS THAN (10001) COMPRESS

, PARTITION part_id2 VALUES LESS THAN (20001) COMPRESS

, PARTITION part_id3 VALUES LESS THAN (30001) COMPRESS

, PARTITION part_id4 VALUES LESS THAN (40001) COMPRESS

, PARTITION part_id5 VALUES LESS THAN (50001) COMPRESS

, PARTITION part_id6 VALUES LESS THAN (60001) COMPRESS

PARTITION part_id7 VALUES LESS THAN (MAXVALUE) COMPRESSES

)

/

Tags: Database

Similar Questions

  • date max with multiple joins of tables

    Looking for expert advice on the use of max (date) with multiple joins of tables. Several people have tried (and failed) - HELP Please!

    The goal is to retrieve the most current joined line of NBRJOBS_EFFECTIVE_DATE for each unique NBRJOBS_PIDM. There are several lines by PIDM with various EFFECTIVE_DATEs. The following SQL returns about 1/3 of the files and there are also some multiples.

    The keys are PIDM, POSN and suff

    Select NBRJOBS. NBRJOBS.*,
    NBRBJOB. NBRBJOB.*
    of POSNCTL. Inner join of NBRBJOB NBRBJOB POSNCTL. NBRJOBS NBRJOBS on (NBRBJOB. NBRBJOB_PIDM = NBRJOBS. NBRJOBS_PIDM) and (NBRBJOB. NBRBJOB_POSN = NBRJOBS. NBRJOBS_POSN) and (NBRBJOB. NBRBJOB_SUFF = NBRJOBS. NBRJOBS_SUFF)
    where NBRJOBS. NBRJOBS_SUFF <>'LS '.
    and NBRBJOB. NBRBJOB_CONTRACT_TYPE = 'P '.
    and NBRJOBS. NBRJOBS_EFFECTIVE_DATE =
    (select Max (NBRJOBS1. NBRJOBS_EFFECTIVE_DATE) as 'EffectDate '.
    of POSNCTL. NBRJOBS NBRJOBS1
    where NBRJOBS1. NBRJOBS_PIDM = NBRJOBS. NBRJOBS_PIDM
    and NBRJOBS1. NBRJOBS_POSN = NBRJOBS. NBRJOBS_POSN
    and NBRJOBS1. NBRJOBS_SUFF = NBRJOBS. NBRJOBS_SUFF
    and NBRJOBS1. NBRJOBS_SUFF <>'LS '.
    and NBRJOBS1. NBRJOBS_EFFECTIVE_DATE < = to_date('2011/11/15','yy/mm/dd'))
    order of NBRJOBS. NBRJOBS_PIDM

    Welcome to the forum!

    We don't know what you are trying to do.
    You want all of the columns in the rows where NBRJOBS_EFFECTIVE_DATE is the date limit before a given date (November 15, 2011 in this example) for all rows in the result set with this NBRJOBS_PIDM? If so, here is one way:

    with         GOT_R_NUM     as
    (
         select       NBRJOBS.NBRJOBS.*,
                NBRBJOB.NBRBJOB.*     -- You may have to give aliases, so that every column has a unique name
         ,       rank () over ( partition by  NBRJOBS.NBRJOBS_PIDM
                                   order by      NBRJOBS.NBRJOBS_EFFECTIVE_DATE     desc
                          )             as R_NUM
         from          POSNCTL.NBRBJOB NBRBJOB
         inner join      POSNCTL.NBRJOBS NBRJOBS       on    (NBRBJOB.NBRBJOB_PIDM = NBRJOBS.NBRJOBS_PIDM)
                                            and      (NBRBJOB.NBRBJOB_POSN = NBRJOBS.NBRJOBS_POSN)
                                      and      (NBRBJOB.NBRBJOB_SUFF = NBRJOBS.NBRJOBS_SUFF)
         where       NBRJOBS.NBRJOBS_SUFF             != 'LS'       -- Is this what you meant?
         and        NBRBJOB.NBRBJOB_CONTRACT_TYPE   ='P'
         and       NBRJOBS.NBRJOBS_EFFECTIVE_DATE  <= to_date ('2011/11/15', 'yyyy/mm/dd')
    )
    select       *     -- Or list all columns except R_NUM
    from       GOT_R_NUM
    where       R_NUM          = 1
    order by  NBRJOBS_PIDM
    ;
    

    Normally this site does not display the <>inequality operator; He thinks it's some kind of beacon.
    Whenever you post on this site, use the other inequality operator (equivalent), *! = *.

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and INSERT, only relevant columns instructions) for all the tables involved and the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.
    You will get better results faster if you always include this information whenever you have a problem.

  • El Capitan permissions bad for lib with multiple users

    On my Mac with multiple users and running El Capitan, I encountered a problem with an application (GoGlobal) failed to start with "errno = 13", which is a problem of permissions with usr/local/lib /.

    I determined that on Yosemite, usr/local/lib was owned by root and permissions: drwxr-xr-x. However, on El Capitan, usr/local/usr / local / lib lib is owned by one of the nicks (random?) and has permissions drwx-, which is the source of the errno = 13.

    I got around the problem by chmod 755 to lib /, but I fear that a future update will reset these permissions impassable previous values. Please correct these settings in install and update routines.

    GoGlobal isn't a request to Apple. You can send your message to the developer, who develops not only the Application itself, but the installation script that puts in place of its components.

  • I use 4 windows with multiple tabs, but I 'don't know why one of them (window) always close when I restar computer

    I use 4 windows with multiple tabs, but I 'don't know why one of them (window) always close when I restar computer

    Hello, by default the firefox session restore feature only allows you to save last 3 windows open. to change this, type on: config in the address bar of firefox (confirmed the message information where it appears) and search for the preference named browser.sessionstore.max_windows_undo. Double-click it and change its value to 4 (or more).

    http://KB.mozillazine.org/browser.sessionstore.max_windows_undo

  • Can bookmarks be portable to multiple computers? Is it an option to connect and use my favorites with multiple computers and locations? Thank you

    Can bookmarks be portable to multiple computers? Is it an option to connect and use my favorites with multiple computers and locations? Thank you

    https://support.Mozilla.com/en-us/KB/what-Firefox-sync

  • Satellite PRO A10 new HDD partition with 80 GB HARD drive

    I've recently updated the original 30 GB HARD drive for a 80 GB HARD drive. I used the recovery CD and all is well.

    The old laptop is now as good as new again.

    I notice that rather than having a c: drive of 80 GB, recovery utility has given me 3 partitions in about 25 GB each (c: d:, and e :).) They were originally FAT32 although I changed it to NTFS.

    My question is can I remove e: and d: partitions and then increase the size of the c: up to the maximum size possible (approx. 75 GB)? I know that windows xp can handle, but I don't know if the BIOS can or even why 3 partitions have been created in the first place.

    Post edited by: dim33

    To be honest I m really surprised that there are 3 partitions after the recovery procedure. I got many old books as your A10 and newer seen this.
    In any case go to disk management and try to create partitions on the way you want it to be.

    In my opinion you should have the C partition with 25 or 30 GB and the second 50 GB partition for the data record. Don t use a partition only. If something does not go the whole partition must be deleted and you will lose all of your stored data. It is always better to have the second partition for data backup.

    In the worst case (you cannot start OS), you can install Windows XP Home edition on the first partition, boot OS and have full access to all stored data.

  • How to export to pdf 1 sheet in a document with multiple sheets

    As the title says, my numbers document has several sheets.  I need to export one of these sheets as a pdf document, but instead it exports all sheets in a single PDF with multiple pages (1 page per sheet).

    Grateful for your help!

    Hi Michele,

    Instead of export, go to the sheet you want and use the Menu > file > print.

    In the Print Setup Panel, choose this sheet.

    Click on print... to see the print dialog.

    At the bottom left, click on the PDF pop up.

    You can open a PDF in preview (and print it from there), or print in PDF format.

    Click done to return to your document.

    Kind regards

    Ian.

  • Indicator of waveform data dashboard with multiple locations

    I have a chart in waveform with multiple locations on my main VI running.

    I use the Application Dashboard data 2.2.1 on my Ipad to monitor table of wave shape of my running app.  I placed a marker on my Ipad and also related waveform with my waveform array variable.  I can't play my data dashboard application because it shows unable to connect to the server.  I noticed that it is because of multiple plots being plotted on my table of waveform.

    I could only play the App data dashboard when it is just a single parcel related to an indicator on the App.

    My question is if it's possible to have a graphical indicator of waveform on a data dashboard that has several plots being plotted and not only a single square, and how to configure it?

    Thank you.

    Click on Bravo and select as an accepted answer.  You are welcome.

  • Using Outlook Express 6 with multiple identities.

    Had the hard drive problems.  He has been replaced by Dell warranty.  I have set up outlook express 6 with multiple identities.  I can't go from one to the other identity and return to the original, without having to restart my computer.  Dell has said that some things need to be changed to make it work properly.  They tell me what they were without a heavy load.  I used to use this feature with my old hard drive.  Help me please if you can...  Thanks in advance.

    Hi El KG,

    1. do you receive error messages or error codes?

    You can read the following article and check if it helps:

    OLEXP: "identity switch canceled" when starting Outlook Express

    http://support.Microsoft.com/kb/224463

    Also check the following links:

    OLEXP: How to create and use identities in Outlook Express 5.x and 6.0

    http://support.Microsoft.com/kb/209169

    http://www.Microsoft.com/Windows/IE/community/columns/identity.mspx

    http://social.answers.Microsoft.com/forums/en-us/outlookacct/thread/b53f3c5a-3733-4510-91dB-a23dc6224fc5

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How do I take a VISTA system which has a drive with a C and D partition and combne in C only a partition with the storage of which was C and D?

    How do I take a VISTA system which has a drive with a C and D partition and combne in C only a partition with the storage of which was C and D?

    Hello

    Make sure that D: is not the partition recovery including the manufacturer put there to make the recovery disks from and eventually to return your computer to how you bought

    You cannot combine C: and D: and their data using the Vista Disk Manager

    with Vista, you will need to save the data on D: - D: delete - and then extend C: into the now unallocated space where D: was to do a 1 partition 2

    read the tutorial below

    How to remove and extend a Partition with Vista disk management

    http://www.Vistax64.com/tutorials/95418-disk-management-delete-extend.html

  • Problems with multiple monitors for critical update Windows 7

    Since the update critical October 1, I can no longer run multiple monitors.

    According to the record, this update made changes at the same time the driver for my AMD Radeon 7470 and Dell monitor 1.1 card, and I've updated the software.

    Devices for work and when I pass cables or remove cables. Yet they are simply not recognized as connected.

    Hello Kent,

    Thanks for posting your question on the Microsoft community.

    Thank you for details on the issue.

    This problem may occur because of corrupted or incorrect display settings.

    I suggest you run the hardware and devices Troubleshooter and check.
    Reference:
    Open the hardware and devices Troubleshooter
    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter

    Please also read this article and check.
    Work and play better with multiple monitors
    http://Windows.Microsoft.com/en-us/Windows7/work-and-play-better-with-multiple-monitors

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • How can I actually talk to support multiple issues with multiple devices (software, hardware, account of the question?

    How can I actually speak to technical support issues to nulitple with multiple devices (software, hardware, account problems,) I have a touch screen of hp with windows 7 Home, Ipod, home router wireless, boost, WiFi, wii, etc.... Problems with windows live net Passport vs msn Id, problems with zune vs itunes and windows media that nobody wants play nice together.

    My touchscreen notes will use only a google account, music another program, and of course until recently google was not an option on the windows phone. of course if I'm going now that I'll lose all the games and music. His tent so frustrating of any help, that nobody seems to know how often these devices and programs interact (or care) HP has been of little use, even for my provider windows, microsoft, living cells and zune etc...

    All the changes that took place this last month will help but gets boring. I consider myself pretty computer savy, but maybe not, should not this difficult. I realized about a year ago I would have hired a technician but it seems immpossible to find someone who knows enough about all of the equipment and software to really do some good. My Hp touchscreen computer does not even play nice with their own HP printers. I really regret the time and money I spent. I could every Mac.

    All of the suggestions. Even your options do not address several problems of interaction with the hardware and software all needs of problems to adapt to a single category.

    Hello


    To correct the software issues run the methods mentioned below.
     
    Method 1: run the troubleshooter and check if the problem is resolved.
    http://Windows.Microsoft.com/en-us/Windows7/open-the-performance-Troubleshooter

    Method 2 : run a SFC (System File Checker) scan and see if the problem occurs.
    http://support.Microsoft.com/kb/929833

    Method 3 : run Clean boot and check if the problem persists.


    To help resolve the error and other messages, you can start Windows XP, Vista or Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    Note: follow step 7 to reset the computer to start as usual after the boot process.
    http://support.Microsoft.com/kb/929135

    To solve the problems related to Windows Live and MSN to check the links below on contact.

     
    To solve the problems related to the HP touch computer

    Update the HP touch drivers from the manufacturers Web site.

    Hope that helps.
  • Problem with multiple downloads with the router. Allows you to change the TCP MSS value?

    Original title: TCP MSS

    Hi all.

    I currently have a problem with multiple downloads with my current router.  If I have two current downloads at the same time I have no access to all web sites.  It's almost as if the downloads take my meaning of bandwidth there is more nothing for ordinary surfing.

    As a test I put an older router on my system and have a significant improvement in performance.  I have 2 downloads in progress and also surf at the same time.

    To compare two routers, I noticed that the only real difference between the two is that the TCP MSS value is set to '0' on the router of the problem, and then assign him 1392 (MTU - 40) on the router to elderly who gives better performance.

    It is my understanding that this value governs the size of transmitted packets.

    My question is this:

    What is the MSS value which is causing the problem?

    Congratulations in advance.

    Be sure to interpret the values. The '0' means no not literally because the link would not work. It is likely, that it allows the local device set limits for the link. Don't forget that there is a Maximum value and as such can be any value up to such limit as defined by all devices in the path.

    You can try capping manually but it is unlikely that any local limit will come to effect unless you set very low.

  • RV220W - rules of access/redirection of port with multiple WAN IP addresses

    I just installed a Cisco RV220W - that works very well for outbound traffic, however for incoming it seems unable to work with multiple WAN IP addresses.

    We have a block of 6 WAN IPs assigned to us by our ISP, and I want to use each of them to expose certain ports on our servers to the outside world.

    I tried to do with rules (by using HTTP, for example) with the following parameters:

    Connection type: Inbound (WAN (Internet) > LAN (local area network))

    Action: Always leave

    Service: HTTP

    Source IP: Unique address

    Start:

    Send to the Server Local (DNAT IP):

    Use other WAN (Internet) IP address: disabled

    Status: Activated

    However, the port of the inaccessible Server/rest.

    I tried:

    • Restart the server with power power off again
    • implement the same port forwarding settings
    • triple-checking all the IP addresses used

    The only way that I have working is by changing the access rule so that it applies to any specific source rather than to another address... but this isn't a solution for us because we need to use specific IP addresses to the internal servers/ports specific.

    The interface of the router admin certainly suggests that this should be possible, but using it seems to break all incoming access!

    Any suggestion is welcome.

    You must use "ANY" as the source IP address, you publish your internal server to the internet and the internet means that the request comes from any source IP address (you don't know what it is, so that's all.

    Basically, you want any source IP to hit one of your WAN IP on port 80, and then your firewall will redirect the request to the internal private IP address of the server on the same port 80. And when the answer comes back internal server, the firewall will already have this translate entry in and reverse NAT won't happen (you must configure it, the default firewall function).

    I hope that I have answered your question.

    Please mark as correct, if you like the answer.

    Thank you

  • Single unit with multiple clusters CCM

    I know that this horse has been beaten to death, but I couldn't find a specific answer to my question.

    I understand with multiple clusters, each CCM to the unit calls go on Ports configured as such in each cluster. I also understand that MWI notification is sent by the highest numbered track and he's working his way down until it is successful. What I don't understand, is how to transfer out of the unit for the expansion of the Subscriber. How do I know what CCM Cluster to send the call to unity? He sends it on the main cluster and this group is responsible for the routing of the call on an inter-cluster trunk? Or should he behave as MWI where he tries to send calls from the highest numbered port until it is able to place the call?

    All calls from the unit (transfer and the identical outdials notification message) are only made on a port, the call is not retried on other ports like MWIs.

    The difference is that for communications, the unit will use the last available on the last group port. If you need to have put ICT in place correctly so the call can get routed to the correct phone on another cluster.

    For transfers, the unit will initiate the transfer using the same port that the call is entered in the. So if the transfer is supposed to go to a phone on a different cluster, yet once you have your ICT implemented between clusters so that the unit can transfer a call from one group to the other.

    In both cases, the unit simply connect, he does not know if the phone is in the same cluster or another cluster. So you must make sure that the dial string that uses the unit, as well as models of dial in CCM, download the call routed correctly through the TIC.

Maybe you are looking for

  • What is the shortcut to return to the start page

    After traveling for a while, I want to go back to the start page, but for now, there seems to be no way to do except continuously and repeatedly returning through the pages I was visit one by one while in all other browsers, there is a home button

  • Ethernet is wykonac and sm bus

    Hello, I have paviilion g6-2132 tx laptop I have instaleed windows 7 but in Device Manager it is showing that my ethernet is sm n is driver is missing, how can I get this driver please help me

  • change the representation of the Golden Gate entries

    Hello I have a pair of enums U16 in my code I want to spend in a golden door. Is it possible to change the representation of the U16 GOLD door entry so that I do not need to use a conversion function or the forced to I32? Dave

  • Unable to print changes to a PDF file (was: printer print)

    When I try to print a PDF doc on my Epson printer it prints only the shape of the bottom and not typing I did... for example if I fill out an application form for something of the form is printed with empty boxes instead completed those. Can anyone h

  • reduce consumption of ink in pixma mx 922

    regarding the purchase of mx 922, is there a "save ink" or "draft" setting to reduce ink consumption?  What is the option "fast"?