Please suggest Partition for following example urgent

Hi all
my table have one column Year
I need to create 2 partition year_1,year_2 for year column but synario is
If 2004 ,2005 2004 must go into year_2 and 2005 must go into year_1
also for 2006 must go into year_1 and 2005 into year_2
Please suggest type of partition if possible with example
Regards

> I need to create 2 partition year_1,year_2 for year column
<snipped>
An exceedingly bad idea to partition a date range like this - stuff some data into one partition and some other data into another partition, without any logical condition that governs what data must go into which partition.
So do not create just two partitions. Decide on the partitioning strategy you want based on criteria such as:
a) volume of data
b) access to data (i.e. predicates used)
c) data management requirements (e.g. removing or aging old data from the table)
Satyaki's example shows you the basics of how this should be done. A partition by year. Or, monthly or even daily partitions. And possibly even sub-partitions.
You will be achieving nothing in terms of performance or data management by trying to stuff date ranged data into two partitions as you are indicating.
As for future yearly partitions? Create yearly partitions for the next 10 years. Or 20 years. Or 100 years. They will be empty. Small space footprint. Ready to be used.
In this case there are relatively few (yearly) partitions - far less than having to deal with 1000's of daily partitions where it is often a better idea to automate adding of new partitions using a DBMS_JOB.

Similar Messages

  • Suggested partition for a 1TB hard drive?

    Hi, I've got a 1TB USB external hard drive, which seems a little big for me. I'm going to partition this big guy but wondering what's to be considered. That's why I'm here to ask.
    I've got quite a big collection of music files, mainly in mp3 format, some ogg and ape\flac as well. That is, about 100GB of them. I'm gonna leave a 300GB partition for these files and their potential brothers and sisters. So, what's the best filesystem for this? NTFS?:P
    For the rest of it, maybe 120GB for some video files and stuff. The rest may be going to serve as backups and maybe, I'm wondering if it is possible to install Arch on it, thus wherever I go, I go with Arch.
    So I don't know what I'm precisely going to do with it... Any suggestions are appreciated
    Edit::
    don't use partitions to seperate data (movies/music/software/documents/etc), use folders instead.
    That is what I found as I googled around a bit. Why? Doesn't it slow things down to have a huge partition? Plus, I think it's easier to get screwed if you have a huge partition and one little thing goes wrong within it, isn't it?
    Last edited by lolilolicon (2009-05-30 03:41:44)

    No, LVM won't prevent problems from your hard drive failing... You 'format' your drive/partition(s) as a Physical Volume, then you use those Physical Volumes (PVs) to create Volume Groups (VGs) You can take multiple PV's and combine them into a single VG which is the size of all the partitions/drives combined.
    You then divide ("partition") your VG into Logical Volumes (VGs) which is what you actually format with a file system and then mount. The biggest advantage is for example in your case you could make one big PV, then create VG with it, and then create say 3 x LV's:
    100gb = Music
    100gb = Videos
    50gb = Photos
    Then as long as you use a filesystem that supports resizing (ext3/4, ReiserFS, XFS or JFS afaik) then when your movie collection gets too big, you can extent the size of the Video LV using the space that you didn't allocate at the start and make it say 200gb. This way you can dynamically resize and reallocate your disk space to different 'partitions'. If you decide to store your photos somewhere else, you can delete that LV, and allocate that space to your Movies or Music, or leave it as 'free' space to put where you need it in 6 months time etc.

  • Please suggest solutiion for calling a plsql function in report

    Hi,
    I did a small project using forms and reports 6i. Now i prepared a repor that will calucalate the sum(expenditure)per report level. Now the problem is i want to print the sum which is in number form , in words. That is if the sum is 50000 then i want to print "fifty thousand". For this conversion from number to figure i wrote a small programme , which successfully compiled and created a function.
    Now I want to create a field in the report and in which I want to call this plsql function and perform the number conversion of sum(expenditure)per report field. Please describe in detail how to make reference between these two fields i.e sum(expenditure)per report and field in which I want to run plsql code and thereby converting the sum into figures.
    the programme i used to convert currency from number to words is please see link.http:/orafaq.com/scripts/cheqprint.txt
    Thanks in advance
    Prasanth a.s.

    Hi,
    If the amount does not exceed more than 5,373,484 then you can use the following method to print the number in words.
    Test Db>Select to_char( to_date(5373484,'J'),'Jsp') from dual ;
    TO_CHAR(TO_DATE(5373484,'J'),'JSP')
    Five Million Three Hundred Seventy-Three Thousand Four Hundred Eighty-Four
    There's no need to write DB function unless you are sure that the value can exceed 5373484.
    You can do the following :
    1. Create a Summary column on the report column on which you want the data summed - Report level or at any level required
    2. Create a Formula Column - Report Level or any other level - Wherever required [ Same level as in Step 1]
    3. The trigger text of this formula column would use the column which is summation of the Expenditure field column (Summary Column) and this function should return Varchar2
    Declare
    lSumInWords Varchar2(1000) := Null;
    Begin
    Select TO_CHAR(TO_DATE(:CS_1,'J'),'JSP')
    Into lSumInWords
    From dual;
    Return (lSumInWords);
    End;
    3. In Your report layout, use this formula column for printing.
    Good Luck.
    -- Shailender Mehta --

  • Please suggest solution for deletion of  all rows in table at a time

    Suggest me pl/sql code for a push button in form to ‘delete entire rows’ in a table.
    BEGIN
    LOOP
    DELETE
    FROM mytable(say table name)
    WHERE ROWNUM < 20000;
    EXIT WHEN SQL%ROWCOUNT = 0;
    COMMIT;
    END LOOP;
    END;
    I wrote this code but not deleted .
    Execute immediate ‘truncate table <tablename>’; this code too not working.
    What my need is ‘ I don’t want to put entire block fields in the form, just I want to put a push button and when I pressed it must delete all rows in a particular table.
    That I want to delete all rows form builder runtime not by entering sql.8.0 and then there delete the rows.
    thanks in advance
    prasanth a.s.

    to delete all records in a table, if you want to get good performance, then use:
    FORMS_DDL('TRUNCATE TABLE your_table_name');
    It is better than use DELETE FROM TABLE_NAME. But if you have condition in where clause, then you have to use DELETE FROM ...

  • HT201304 Any one has tried to connect I pad to LCD tv??? Please suggest way for same....

    Can any one suggest how to connect iPad with LCD tv for see photos or using big screen...then iPad??
    Can you suggest how can be connected??

    Hi there.  I connect mine to my TV with the apple HDMI adapter, and it works perfectly.  great way to watch movies from itunes.

  • Please suggest measures for tempdb.

    Q1)
    I am using express advance version of sqlserver 2008 r2, is there any limitation of temp db , why i am asking is because rowversion uses it heavely.
    What i have seen is, transactional data read by this sanpshot isolation level transaction will be around 200 mb to 500 mb and it changes 10 to 50 mb of data. which will complet in few mints or seconds . but the stored proc  will be running
    continusally for 30 min to an hour ( it is sheduled on time basis ). and there is only one SP which will have snapshot isolation level transaction.
    yours sincerely.

    Hi,
    10 G restriction exists for Tempdb data file and log file combined.I have not tested this but I am aware about this.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Please suggest substitute for kensington trackball

            Kensington has apparently abandoned their expert mouse trackball (4 programmable
    keys and a ring surrounding a trackball) - it still works for Lion but you can't set
    functions such as "print" and "save" so it is basically useless. Contacting them
    is impossible - I've gotten 3 different answers.
           What would you suggest that would have this functionality?

    Before you give up on your Kensington trackball, have you tried their Trackball Works 1.1 driver?
    http://www.kensington.com/kensington/us/us/s/1550/softwaredrivers.aspx
    It works with Lion and gives you many of those types of commands; at least it does with the SlimBlade. I don't have the Expert Mouse any more to try.
    Regards.

  • Please, suggest app for minutes control

    I need an application por iphone 4 plus for minutes control
    thanks for your suggest!!
    Ricardo

    Do you mean phone minutes? If so, you need to contact your carrier to see if they can apply any restrictions to the account. There is nothing available for the iPhone itself.
    ~Lyssa

  • Please suggest forum for me

    can any final cut pro user direct me to a forum, anywhere on the web that i may find information on how i can convert a project created in final cut with .mov extension-file type, to play on a web site that only recognizes mpeg,mpg,avi,wma. I asked this question earlier and people were very curtious to give me suggestions, but nothing worked. I am wondering if i should find a file conversion forum. i am working with final cut pro 2 thank you.

    The Compressor forum may help: http://discussions.apple.com/forum.jspa?forumID=999
    But subquestion is correct; you'll need more specific information to get an accurate answer. I recommend contacting the web host's support to get the needed information.
    WMA = Windows Media Audio
    AVI = a container format which could contain any number of codecs
    MPEG = could be MPEG-1, MPEG-2 or MPEG-4 or any of the variations of each
    MPG = same as MPEG
    -DH

  • Please suggest driver for microsoft lifecam studio for to work with live stream procaster

    I have microsoft life cam studio using to broadcast live through live stream procastrer. I am using mac mini with mac os lion 64bit.But default driver for this studio cam is not supporting to go live with proper crop and quality settings. Can anyone provide driver for this camera ?

    Hi, no idea really, but perhaps see if this could work for what you want...
    http://www.google.com/url?q=http://www.bensoftware.com/securityspy/&sa=U&ei=QUGH T4z4K4WciQL436yGAw&ved=0CBEQFjAA&usg=AFQjCNEC9fzmWGOiPtM0kRHyzfST3Kh5jQ

  • Suggest Program for Module Pool Programming

    Dear All,
    Please suggest me the best example i can do in Module Pool.
    i want to make best use of Module pool.
    thanks
    RP

    u can create a ztable.
    update that z-table with module pool program.
    Create a table control and enter the data in that, update it through screens.
    Regards,
    Sujatha.

  • I am trying to export the combained PDF based on BOOK opetion using below scripts. but i am getting following error message "Invalid value for parameter 'to' of method 'exportFile'. Expected File, but received 1952403524". anyone knows, please suggest me

    Dear ALL,
    i am trying to export the combained PDF based on BOOK opetion using below scripts. but i am getting following error message "Invalid value for parameter 'to' of method 'exportFile'. Expected File, but received 1952403524". anyone knows, please suggest me solutions.
    var myBookFileName ,myBookFileName_temp;
                    if ( myFolder != null )
                            var myFiles = [];
                            var myAllFilesList = myFolder.getFiles("*.indd");    
                            for (var f = 0; f < myAllFilesList.length; f++)
                                        var myFile = myAllFilesList[f]; 
                                        myFiles.push(myFile);
                            if ( myFiles.length > 0 )
                                        myBookFileName = myFolder + "/"+ myFolder.name + ".indb";
                                        myBookFileName_temp=myFolder.name ;
                                        myBookFile = new File( myBookFileName );
                                        myBook = app.books.add( myBookFile );  
                                       myBook.automaticPagination = false;
                                        for ( i=0; i < myFiles.length; i++ )
                                                   myBook.bookContents.add( myFiles[i] );             
                                        var pdfFile =File(File(myFolder).fsName + "\\"+myBookFileName_temp+"_WEB.pdf");
                                        var bookComps = myBook.bookContents;
                                        if (bookComps.length === 1)
                                                       bookComps = [bookComps];
                                         var myPDFExportPreset = app.pdfExportPresets.item("AER6");
                                        app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFEx portPreset,bookComps);
                                      //myBook.exportFile (ExportFormat.pdfType, pdfFile, false);
                                      //myBook.exportFile(pdfFile, false, pdfPref, bookComps);
                                        myBook.close(SaveOptions.yes);      

    Change the below line:
    app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFExp ortPreset,bookComps);
    to
    app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFExp ortPreset);
    Vandy

  • Please, please suggest me, Its very Urgent for

    Hi everyone,
    Please suggest me the right Sound Card. I have bought SBLi've and I found that very essential functionalities for me are missing in this card, which were there in SBLi've "Value".
    I have 3 requirments stated below.
    . Sound Card using which, I will be able to change Each and every Parameters of Reverb effect. (like delay, early reflection etc.) to make a custom efx.
    2. The custom efx could be assigned Only to a Selected Source, like efx set on the Microphone input only (and Not on the main Output).
    3. The efx should be processed by the Hardware only (not software rendered), directly through the Chip.
    The SBLIVE!"Value" handled all these 3 requirments, but with SBLi've24bit I found that these things have been completely removed from the chip. moreover it seems to process the efx using the software, the sound has a distorted noise.
    Thanks.Message Edited by Deba on 05-06-2005 06:02 PM

    Hi Sridhar,
    Thanks for ur reply.
    Seg5 is under Seg4 and
    seg6 is under seg5.
    BLOBE is just a string on the target side under node Segment4
    Iam concanating all the fields in seg5 and seg6 and mapping into Single string "BLOBE" which is at the target side of node Segment4.
    Source                                   Target
    Seg4                                        Seg4
    _____seg5 (1:unbounded)
            |_____seg6 (1:unbounded)             |___BLOBE(1:unbounded)
    Pls reply me if u need any clarification.
    Regards
    Vijaya.

  • (NEED TUTORIAL)Please suggest a good and easy to follow tutorial for Java.

    Hello there,
    I wish to learn Java. Can some one please suggest me a good and easy to follow tutorial?
    I already have the Tutorial provided by sun.
    Thankyou,
    Satya.

    Satya,
    Please go to the New to Java Programming Center:
    /http://developer.java.sun.com/developer/onlineTraining/new2java/
    Just cut and past the link above into your browser.
    At the New to Java Center, you'll find lists of beginners materials, articles, tutorials, book recommendations based on your level of experience, a link to subscribe to the new montly email supplement, and more:-)
    A particularly good tutorial is Language Essentials:
    http://developer.java.sun.com/developer/onlineTraining/JavaIntro/
    Enjoy! Dana

  • Please suggest a correction in the code: Urgent

    I am capturing the Material Document No., Material No., Material Description, Quantity etc. into a main_table in my code so as to write/print labels containing GRN details (movement type '105') using se38. These labels are to be pasted on the material received in stores, the exact requirement is 100% material identification sticker on all items to maintain FIFO. Obviously the no. of these stickers, to be printed, shall solely depend on the Quantity of a particular material received.
    I have written the following piece of code to print the captured information of GRN. The problem is that my code is unable to track the change in material document number. For example if I have 10 nos of quantity for a particular material say 1001 and 5 no.s of quantity for a subsequent material 1002. I should get 10 labels for 1001 and 5 for 1002 but my code is giving me 10 labels for 1002 also.
    Hope you got it.
    Please suggest the necessary correction on the following code.You can execute the following code and get a real time feeling of my problem.
    REPORT  ZMM_GRN_LABEL_REPORT_38.
    TABLES : MKPF, MSEG, MAKT.
    DATA : BEGIN OF I_MKPF OCCURS 0,
           MBLNR LIKE MSEG-MBLNR,
           BLDAT LIKE MKPF-BLDAT,
           MJAHR LIKE MKPF-MJAHR,
           END OF I_MKPF.
    DATA : BEGIN OF I_MSEG OCCURS 0,
           MBLNR LIKE MSEG-MBLNR,
           MATNR LIKE MSEG-MATNR,
           EBELN LIKE MSEG-EBELN,
           LIFNR LIKE MSEG-LIFNR,
           MENGE LIKE MSEG-MENGE,
           END OF I_MSEG.
    DATA : BEGIN OF I_MAKT OCCURS 0,
           MATNR LIKE MAKT-MATNR,
           MAKTX LIKE MAKT-MAKTX,
           END OF I_MAKT.
    DATA : BEGIN OF I_LFA1 OCCURS 0,
           LIFNR LIKE LFA1-LIFNR,
           NAME1 LIKE LFA1-NAME1,
           END OF I_LFA1.
    DATA: BEGIN OF MAIN_TABLE OCCURS 0,
          MBLNR LIKE MSEG-MBLNR,
          MATNR LIKE MSEG-MATNR,
          BLDAT LIKE MKPF-BLDAT,
          MAKTX LIKE MAKT-MAKTX,
          MENGE LIKE MSEG-MENGE,
          MJAHR LIKE MSEG-MJAHR,
          EBELN LIKE MSEG-EBELN,
          LIFNR LIKE MSEG-LIFNR,
          NAME1 LIKE LFA1-NAME1,
          END OF MAIN_TABLE.
    DATA : N LIKE MSEG-MENGE.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_MBLNR FOR MSEG-MBLNR.
    PARAMETERS : P_GJAHR LIKE MSEG-GJAHR.
    SELECTION-SCREEN END OF BLOCK B1.
    select MBLNR MJAHR BLDAT
    into corresponding fields of
    table I_MKPF
    from Mkpf
    where
    MBLNR in S_MBLNR and
    MJAHR EQ p_GJAHR.
    LOOP AT I_MKPF.
    MAIN_TABLE-MBLNR = I_MKPF-MBLNR.
    MAIN_TABLE-MJAHR = I_MKPF-MJAHR.
    MAIN_TABLE-BLDAT = I_MKPF-BLDAT.
    APPEND MAIN_TABLE.
    CLEAR MAIN_TABLE.
    ENDLOOP.
    IF I_MKPF[] IS NOT INITIAL.
    SELECT MBLNR MATNR EBELN LIFNR MENGE
    INTO CORRESPONDING FIELDS OF
    TABLE I_MSEG FROM
    MSEG
    FOR ALL ENTRIES IN I_MKPF
    WHERE
    MBLNR = I_MKPF-MBLNR.
    ENDIF.
    LOOP AT I_MSEG.
    LOOP AT MAIN_TABLE WHERE MBLNR = I_MSEG-MBLNR.
    MAIN_TABLE-MATNR = I_MSEG-MATNR.
    MAIN_TABLE-EBELN = I_MSEG-EBELN.
    MAIN_TABLE-LIFNR = I_MSEG-LIFNR.
    MAIN_TABLE-MENGE = I_MSEG-MENGE.
    MODIFY MAIN_TABLE INDEX SY-TABIX.
    ENDLOOP.
    ENDLOOP.
    IF I_MSEG[] IS NOT INITIAL.
    SELECT MATNR MAKTX
    INTO CORRESPONDING FIELDS OF
    TABLE I_MAKT FROM MAKT
    WHERE
    MATNR = I_MSEG-MATNR.
    ENDIF.
    LOOP AT I_MAKT.
    LOOP AT MAIN_TABLE WHERE MATNR = I_MAKT-MATNR.
    MAIN_TABLE-MAKTX = I_MAKT-MAKTX.
    MODIFY MAIN_TABLE INDEX SY-TABIX.
    ENDLOOP.
    ENDLOOP.
    IF I_MSEG[] IS NOT INITIAL.
    SELECT LIFNR NAME1
    INTO CORRESPONDING FIELDS OF
    TABLE I_LFA1 FROM LFA1
    FOR ALL ENTRIES IN I_MSEG
    WHERE
    LIFNR = I_MSEG-LIFNR.
    ENDIF.
    LOOP AT I_LFA1.
    LOOP AT MAIN_TABLE WHERE LIFNR = I_LFA1-LIFNR.
    MAIN_TABLE-NAME1 = I_LFA1-NAME1.
    MODIFY MAIN_TABLE INDEX SY-TABIX.
    ENDLOOP.
    ENDLOOP.
    ******************************Problem lies somewhere here
    N = MAIN_TABLE-MENGE.
    DO N TIMES.
    SORT MAIN_TABLE BY MBLNR.
    LOOP AT MAIN_TABLE.
    WRITE :/5 MAIN_TABLE-MBLNR.
    WRITE :/5 MAIN_TABLE-MAKTX, 50 MAIN_TABLE-MATNR.
    ENDLOOP.
    ENDDO.

    Hello,
    Take one new table with three fields ie. it_no with mblnr, matnr and menge.
    collect data to new table form main_table.
    and replace your doubtful code by
    SORT MAIN_TABLE BY MBLNR.
    loop at it_no.
    N = it_no-MENGE.
    DO N TIMES.
    LOOP AT MAIN_TABLE where matnr = it_no-matnr.
    WRITE :/5 MAIN_TABLE-MBLNR.
    WRITE :/5 MAIN_TABLE-MAKTX, 50 MAIN_TABLE-MATNR.
    ENDLOOP.
    ENDDO.
    endloop.
    regards,
    Naimesh

Maybe you are looking for