Max No. of Records in a Table

Dear Sir/Madam,
I have the Transaction table with 10 Million records. While Tuning the table it takes 5.8 seconds to fetch records from it with Cost based optimization. I have Partitioned my table based on months and necessary index is been created.What should I want to do to reduce this time.
Is there is any way to get the Time duration (like. Estimated Time - 5.8 seconds) taken by a Query in SQL prompt itself.
With Regards,
Velu N

Hi Velu,
I'm not sure if this is the approriate forum for this type of question... or is this related to Warehouse Builder?
Jean-Pierre

Similar Messages

  • Max No. of records in a table - performance related statistics of a table

    Hi all,
    Can anybody please help me on the performance related statistics depending upon the size of the table?
    I have a question regarding the scalability and(I think so) and performance.
    My record is having 20 columns and all columns together it will come upto around 200 bytes/record.
    What is the maximum no of records that can be stored in a table?
    Currently the table is having more than 500,000 records.
    Every month, 15,000 new records are added. A new requirement came up now. If that is implemented, no. of records per month will go upto 50,000.
    It means the table is getting filled up at more than three times faster every month.
    How this will effect my application's performance - Querying / Inserts / Updates ?
    Please help me.
    thanks and regards.
    Pandu

    There is no inherent limit to the number of rows in a table, I have several tables with over 20 million rows (and many of these are over 200 bytes per record).
    The performance impact of larger tables largely depends on how you access the tables. The size of the table will not really affect Inserts. Updates and Selects will become slower as the table increases, however, the magnitude of the impact will depend on how you access the tables. If most queries/updates go after single rows using a PK, then the impact will be minimal. If most queries/updates affect large numbers of rows using unindexed columns as selection criteria, then the impact is potentially huge.
    Depending on the nature of the data, and the way it is used, you may want to investigate partioning as a way of limiting the number of rows that need to be searched for any given query/update. Even with 500,000 rows currently and 50,000 a month coming in, you probably have several months to look at it before anything drastic needs to be done.
    Just make sure that you analyze the fast changing tables frequently.
    HTH
    John

  • Max no of records in for all entries table

    Hello all,
    Hi have used for all entries in a select statement in BW extractor. This extractor is working fine for the test data. When i moved this code to pre-production for testing, there this extractor has to deal with thousands of records. In pre-prod , this select statement is not picking up all the records available in DB. Can any one give any idea on behavior of for all entries for large number of records. and is the any max limit for for all entries table.
    Thank you..correct answer will be rewarded.
    Regards
    Sravan

    Moderator message - Please search before asking and do not offer rewards (particularly since as far as I can see, you've awarded a total of two points in the last two years - post locked
    Rob

  • Max number of records in an internal table

    Hi,
    Can any one tell me what is the Max Number of records we can get into an internal table.
    if you have any link of sap help on this please FWD.
    thanks in Adv.
    Regards,
    Lakshmikanth.T.V

    Hi lakshmikanth,
    Internal Tables as Dynamic Data Objects
    Internal tables are always completely specified regarding row type, key and access type. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
    regards,
    keerthi.

  • Max. records in Range table used in Select .. IN  ?

    Hi
    Does somebody knows wich is the max. amount of records in a RANGES table used in Select Comand:
        select xxxx FROM  table
        where  field  IN  range_table.
    That, because i found severeal times programs aborting for this cause, so i changed this condition to an ALL ENTRIES.
    Regards
    Frank

    It really depends on the table and DB settings.
    Check with your DBA folks.
    On our system it's ~ 400-500 for most of the tables.
    NOTE: as it depends on DB settings - it may be different on your development system and on your production system.
    For all entries does ntohave this limitation as it's being split into several selects, you can see it in the trace.

  • How to find the longest record in a table?

    Hello,
    Is there a function to find the longest record in a table? Or is there a data dictionary that would tell you which record contains the longest data?
    I have a table with five columns and one million records. I want to find the record (5 columns combined) with the longest data. Thank you.

    Dear watson2000!
    The function "VSIZE" tells you the number of bytes in the internal representation of a column which means the size of a value within a column. An example of vsize can be found here:
    [http://www.adp-gmbh.ch/ora/sql/vsize.html]
    So I think you should try it with this query to get the size of the longest record:
    SELECT MAX(VSIZE(column1)) +
           MAX(VSIZE(column2))  +
           MAX(VSIZE(column3))  +
           MAX(VSIZE(column4))  +
           MAX(VSIZE(column5)) AS "Maximum Row"
    FROM your_table;To identify the longest record try like this:
    SELECT rowid
    FROM   your_table
    GROUP BY rowid
    HAVING  (MAX(VSIZE(column1)) +
             MAX(VSIZE(column2)) +
             MAX(VSIZE(column3)) +
             MAX(VSIZE(column4)) +
             MAX(VSIZE(column5))) = (SELECT MAX(VSIZE(column1)) +
                                          MAX(VSIZE(column2))  +
                                          MAX(VSIZE(column3))  +
                                          MAX(VSIZE(column4))  +
                                          MAX(VSIZE(column5))
                                   FROM your_table;)I hope that these two queries could be of help to you.
    yours sincerely
    Florian W.
    Edited by: Florian W. on 23.04.2009 20:53

  • Simple Query Question - How do I return the Last 3 records of a Table?

    Question.
    For example, I have a table that has 50 records.
    How do I, specify in SQL to only return the last 3 records of the table.
    Select a.* from table a where ????

    I was just trying to show an example to a friend on
    how something like this would work and if it was even possible. But it won't work. Here's a simple example:
    SQL> create table emp
      2  (id)
      3  as
      4  select object_id
      5  from   all_objects
      6  order  by object_id;
    Table created.
    SQL> select *
      2  from  (select rownum rn
      3               ,b.*
      4         from   emp b)
      5  where  rn > ( select (max(rownum) - 3)
      6                from    emp)
      7  ;
            RN         ID
         40830      55891
         40831      55892
         40832      55893So far, so good. These are the "last 3" rows inserted. Now delete a bunch of rows and insert 3 new ones:
    SQL> delete emp where id < 40000;
    33423 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> insert into emp values (60000);
    1 row created.
    SQL> insert into emp values (60001);
    1 row created.
    SQL> insert into emp values (60002);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select *
      2  from  (select rownum rn
      3               ,b.*
      4         from   emp b)
      5  where  rn > ( select (max(rownum) - 3)
      6                from    emp)
      7  ;
            RN         ID
          7410      55891
          7411      55892
          7412      55893Here's the problem. Even though the "last 3 rows" are 60000 - 60002, I still get the same ones as the first query.

  • Using combination of insert into and select to create a new record in the table

    Hello:
    I'm trying to write a stored procedure that receives a record locator parameter
    and then uses this parameter to locate the record and then copy this record
    into the table with a few columns changed.
    I'll use a sample to clarify my question a bit further
    -- Create New Amendment
    function create_amendment(p_mipr_number in mipr.mipr_number%TYPE, p_new_amendment_number in mipr.amendment_number%TYPE)
    return integer is
    new_mipr_id integer;
    begin
    THIS is causing me grief See comments after this block of code
    insert into mipr
    (select mipr_id from mipr where mipr_number=p_mipr_number),
    (select fsc from mipr where mipr_number=p_mipr_number),
    45,
    (select price from mipr where mipr_number=p_mipr_number),
    practical,
    (select part_number from mipr where mipr_number=p_mipr_number);
    THe above will work if I say the following
    insert into mipr
    (select * from mipr where mipr_number=p_mipr_number);
    BUt, Of course this isn't what I want to do... I want to duplicate a record and change about 3 or 4 fields .
    How do I use a combination of more than one select and hard coded values to insert a new record into the table.
    /** Ignore below this is fine... I just put a snippet of a function in here ** The above insert statement is what I need help with
    select (mipr_id) into new_mipr_id from mipr where mipr_number=p_mipr_number + amendment_number=(select max(amendment_number) + 1);
    return new_mipr_id;
    end;
    THANK YOU IN ADVANCE!
    KT

    function create_amendment(p_mipr_number in mipr.mipr_number%TYPE)
    return integer is
    new_mipr_id integer;
    tmp_number number;
    tmp_mipr_id integer;
    begin
    tmp_number :=(select max(amendment_number) from mipr where mipr_number=p_mipr_number);
    Question:
    tmp_number :=1; works..
    tmp_number doesn't work with the select statement?
    Obviously I'm a novice! I can't find anything in my book regarding tmp variables... What should I look under is tmp_number a
    variable or what? In my Oracle book, variable means something different.
    Thanks!
    KT
    I have the following code in my stored procedure:
    Good luck,
    Eric Kamradt

  • Best Practice to save record in a table with appropriate trigger

    Hi,
    At the same time, five users are inserting client information in a client table through Oracle form. Client table has the following fields:
    CLIENT ID
    CLIENT NAME
    CLIENT ADDRESS
    CLIENT ID is generating automatically by calling a procedure. In this procedure I am using MAX function to get maximum value of CLIENT ID. After that, I store newly generated CLIENT ID in a DATA BLOCK item say :MASTER.CLIENT ID.
    The problem is that all five users do get same MAX value(suppose 40) of CLIENT ID at the same time, and oracle form will surely throw an exception at the time of insertion the record in client table. CLIENT ID is PK and it is a member of MASTER DATA BLOCK.
    I hope all above will clearly illustrate the problem, further please guide, can PRE-INSERT trigger may handle this problem efficiently ? , if so, then how ? ...
    Thanks,

    Hello,
    Welcome to the forum!
    CLIENT ID is generating automatically by calling a procedure.So, in which trigger you are calling that procedure?
    After that, I store newly generated CLIENT ID in a DATA BLOCK item say :MASTER.CLIENT ID. I would guess that you are using the code generation procedure in the WHEN-CREATE-RECORD trigger block-level. Because this trigger normally intialize the value for new record insertion. If no then specify.
    further please guide, can PRE-INSERT trigger may handle this problem efficiently ? ,Yes, PRE-INSERT will work without any problem.
    if so, then how ? ... Because, PRE-INSERT will fetch the MAX number from the table at the time of save not at the time of creation. So, suppose five user will enter record at the same time but when they will save then PRE-INSERT will get the max sequence number. And it will never create problem. Because in five user's insertion sure there will be some time difference. So, max number can be get easily without any problem.
    -Ammad

  • How to rerieve records from the table starting with character 'D'

    Hi Folks,
    How to get the records from the table starting with character 'D'.
    Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.
    last record in the table starting with character 'D'
    How can i do that??
    Pl explain.
    Thanks,
    Matt

    Hi,
    Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.
    Select MAX (fld1)
       From  tab1
    into table itab
    where fld 2 = l_fld2
       and fld1 like 'D%'.

  • Max no of records that can be dispalyed using ALV GRID CONTROLS

    Hi ,
    Can any one please tell me the maximum no of records that are allowed to be displayed using the ALV grid controls.
    As I am getting dump for more records and I need to control the report based on the max no of records that can be actually diplayed using contols.
    Thanks,
    Kavya.

    Dear Kavya.
    If you are getting Dump because you have too many records it means that there is something wrong with the program design.
    ALV is not meant to display more than few thousands of records.
    There is no point is displaying more than few thousands because it will over-flow the users and it will do no good for them.
    If the problem is with the Internal-tables that you're using to manipulate the data, you can think of using an intermidiate DB table that will hold summarized data of the DB data and can be filled via a periodic job. This have the benfit of speeding up the ALV program too.
    thanx
    ayal.

  • Max Quantity of Records in ODS

    Hi Gurus,
    Today i went to a Client to check the BW Implementation, and i found out some "strange things", one of then is that exist ODS with 25 millon of records and increase 1 millone per week.
    My question is : Which is the max quantity of record that and ODC can store?
    THANKS IN ADVANCED

    Hi,
       For ODS tables, the maintenance of database storage parameters can be found in the ODS object maintenance, in the Extras menu.
    Hope this helps,
    Thanks,
    vrrp

  • How to fetch last record from the table to display in screen painter?

    Hi Gurus,
                  I have a requirement where i have to fetch the last record value in the table.
    I have a screen where the TEXT name is REQUEST and I/P field name is REQ and SAVE push button.
    In this I/P field automatically 1 should display when i excecute the program and when i save this, the request number should turn to 2 that is dynamically..once agin save then 3 and so on....and this 1, 2, 3 will be storeing in table.
    I have succeeded till generating the values dynamically and saving in the table like 1 is displayed and when i click save it is changeing to 2..but the problem is when i am coming out of program and logon again the request number is again displaying as 1 rather it has to start with 4 because already 3 request are there in the table.
    My code is...
    Table zsave.
    data declarations....
    data req type i.
    req = 0.
    req = zsave-req.
    PROCESS BEFORE OUTPUT
    req = 0.
    select req into table fun_st from zsave.
    req = zsave-req.
    zsave-req = req.
    req = zsave-req + 1.
    PAI
    req = zsave-req + 1.
    zsave-req = req.
    when 'save'.
    wa_funst-req = zsave-req.
    Please can you provide me with the solution....answer will be rewared.
    THKS

    Can you tell me, when updaing the ZSAVE table with the counter value are you modifying the exisiting value or inserting the value as new record?
    From the code in your first post, i see that you are extracting records into internal table but when you are moving to variable REQ, you are moving from table work area which is blank, so everytime when you execute it may be starting as 0.
    Hope below code can help you understand on handling your requirement
    Global Declaration:
    >DATA: l_req TYPE i. 
    PBO:
      SELECT MAX( req ) INTO l_req FROM zsave.
      l_req = l_req + 1.
    PAI:
      DATA: wa TYPE zsave.
      CASE ucomm.
      WHEN 'SAVE'.
        wa-req = l_req.
        INSERT zsave FROM wa.
      ENDCASE.

  • Find the latest updated or the latest inserted record  in a table

    Hi All,
    Thanks in advance
    Just a simple question
    How do we find the latest updated or the latest inserted record in a table ?
    Provide some queries in SQL?

    You can order by rowid desc to get lately inserted records, but I'm not sure about updated records.That is incorrect, Oracle might use old rowid's even in inserts and you cannot assure that the max(rowid) refers to the latest record.
    If the table is created with rowdependencies one can use ORA_ROWSCN pseudo column to check on date/time when the last dml has been performed over that table. But, that has some limitations too, Old snapshots will be erased hence one can check the last dml with a time frame of few days.
    Regards,
    Prazy

  • Fetch last record from database table

    hi,
    how to fetch last record from database table.
    plz reply earliest.
    Regards,
    Jyotsna
    Moderator message - Please search before asking - post locked
    Edited by: Rob Burbank on Dec 11, 2009 9:44 AM

    abhi,
    just imagine the table to be BSEG or FAGLFLEXA... then what would be performance of the code ?
    any ways,
    jyotsna, first check if you have a pattern to follow like if the primary key field have a increasing number range or it would be great if you find a date field which stores the inserted date or some thing..
    you can select max or that field or order by descending using select single.
    or get all data.. sort in descending order.(again you need some criteria like date).
    read the first entry. using read itab index 1

Maybe you are looking for

  • My pavalion dv4-1220 lap top

    well after two hard drives within a year and half and now we after diagnostics are told it will be a mere 520 dollars to replace the mother board and the LED display due to the fact that the led doesn't work anymore. The machine has always produced e

  • Estimation of dbsize in OWB Runtime Repository

    Hi, I would like to know the procedure how to estimate the dbsize required for owb runtime repository. Any help would be appreciated greatly. Thank you, Regards, Gowtham Sen.

  • Wireless connection (around 500m) between 2 buildings ?

    Hi, I'm trying to install a wireless connection between 2 buildings. Tthere is around 500m between the 2 buildings... I don't know if with Cisco is it possible to do this ? If it is possible, which models of AP's can I use ? Which antennas ? Thanks f

  • Help with on board sound kt3 ultra2

    ok i just put everything together and got win me installed but my on board sound is not working i have the kt3 ultra2 device manager shows device working properly and bios has onboard sound enabled i am not sure if i missed plugging something in on t

  • Problems with email on Blackberry

    I have an email message that I cannot delete.  When I click on the email, the only thing I see to the right is a blank white screen rather than seeing the email itself.  How can I delete this email from my inbox? Solved! Go to Solution.