Which design is best from a performance point of view?

Hello
I'm writing a small system that needs to track changes to certain columns on 4 different tables. I'm using triggers on those columns to write the changes to a single "change register" table, which has 12 columns. Beacuse the majority of tracked data is not shared between the tables, most of the columns will have null values. From a design point of view it is apparent that having 4 separate change register tables (one for each main table that is being tracked), would be better in terms of avoiding lots of null columns for each row, but I was trying to trade this off against having a single table to see all changes that have been made across the tracked tables.
From a performance point of view though, will there be any real difference whether there are 4 separate tables or 1 single register table? I'm only ever going to be inserting into the register table, and then reading back from it at a later date and there won't be any indexes on it. Someone I work with suggested that there would be more overhead on the redo logs if a single table was used rather than 4 separate tables.
Any help would be appreciated.
David

The volumes of data are going to be pretty small,
maybe a couple of thousand records each day, it's an
OLTP environment with 150 concurrent users max.Consider also the growing of data and if you'll put data constantly to an historical db or if the same tables will contain the increasing number of record.
The point that my colleague raised was that multiple
inserts into a single table across multiple
transactions could cause a lot of redo contention,
but I can't see how inserting into one table from
multiple triggers would result in more redo
contention that inserting into multiple tables. The
updates that will fire the triggers are only ever
going to be single row updates, and won't normally
cause more than one trigger to fire within a single
transaction. Is this a fair assumption to make?
David
I agree with you, the only thing I will consider, instead of redo problem, is the locking on the table that could be generated when logs of different tables will have to be put in a single table, i mean if after insert of a log record you could need to update it....
In this case if 2 or more users have to update the same log you could have problems.

Similar Messages

  • Performance point of view

    Hi every one,
    I am new to XI . I have a small doubt in Mappings.
    In XI we have 4 types of mappings:
    1.Graphical mapping
    2.XSLT mapping,
    3.Java Mapping
    4.ABAP mapping
    In case of performance point of view which one is best .
    Plz explain me in details .
    I will give full points for correct answers.
    Thanks and Regards,
    P.Naganjana Reddy

    Hi,
    refer to these links:
    Re: Why xslt  mapping?
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1217018,00.html
    /people/r.eijpe/blog/2006/02/20/xml-dom-processing-in-abap-part-iiib150-xml-dom-within-sap-xi-abap-mapping
    /people/sravya.talanki2/blog/2006/12/27/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-iii
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8a57d190-0201-0010-9e87-d8f327e1dba7
    Regards,
    Nithiyanandam

  • Please validate my logic performance point of view:

    Please validate my logic performance point of view:
    logic I wrote :
       LOOP AT i_mara INTO wa_mara.
    *-----For material description, go to makt table.
          SELECT SINGLE maktx
            FROM makt
            INTO l_maktx
           WHERE matnr = lwa_mara-matnr
             AND SPRAS = 'E'.
          IF sy-subrc = 0.
            wa_mara-MAKTX = l_maktx.
          ENDIF.        " IF sy-subrc = 0.
    *-----For Recurring Inspection, go to marc table.
          SELECT prfrq
            FROM marc
            INTO l_prfrq
            UP TO 1 ROWS
           WHERE matnr = lwa_mara-matnr.
          ENDSELECT.
          IF sy-subrc = 0.
            wa_mara-prfrq = l_prfrq.
          ENDIF.          " IF sy-subrc = 0.
          MODIFY TABLE i_mara FROM wa_mara
                 TRANSPORTING maktx.
          CLEAR : wa_mara.
       ENDLOOP.   " LOOP AT i_mara INTO wa_mara.
    Or is it better below : ?
    To SELECT all the maktx values from makt and all prfrq values from marc
    in two internal tables and
    Loop at i_mara.
      LOOP at all maktx itab
    and pass corresponding maktx values into i_mara table
    and pass corresponding prfrq values into i_mara table
    ENDLOOP.
    OR
    is there any better performance logic you suggest ?
    THANKS IN ADVANCE.

    ok this is very funny so if someone gets a good way to code he should wait till he gets 1198 points till he write a performance wiki
    so that means ppl who has high SDN points only can write wiki
    for your information wiki definition is
    [http://en.wikipedia.org/wiki/Wiki |http://en.wikipedia.org/wiki/Wiki]
    its all about contribution and sharing.
    did you try that code on a production or a Quality server. If you did you wont say that coz the results i have shown in that blog is what i my self tested on a Quality system of our client.
    and for your information i did my internship at a SAP AFS consultancy firm and i created the account at that time. I have joined that company and now working as a developer over there.
    if you have worked on a client system development on SD and MM you will know that most of the time
    we use header and item tables like
    likp,lips
    vbak,vbap
    vbrk,vbrp
    most of the time we come across nested loops with smiler kind of condition.
    in this Q he has MATNR as reference.
    if you see it properly you can see both tables are sorted.
    and the select statement is for all entries.
    for your information there can be a delivery document item with out a header if you are aware of DB concepts in that case there will be a foreign key error.
    ok lets think about a situation like that even in that case if there ant any header data then simply the client wont request for that record.( you would know if you have worked with clients )
    last but not least i dont care about my points rate at SDN i just wanted to share what i know coz anyway i have a very good job here. dont try to put down ppl just because they are new.
    Thomas Zloch  : i never told its my code i saw it some where then i checked and i bogged it so that i can get it when i want and i saw it in se30 ( its not se38 ) but i know most of ABAP developers dont check it much so i just wanted to help.
    Rui Pedro Dantas   : ya your correct we dont need to use it most of the time since sorted table is easy but there are programs which works with bulky data load we can use it in places like that. Thanks for talking the truth
    Nafran
    sorry if i said anything to hurt anyone.

  • JMS - Useful from an international point of view?

    Hi everyone,
    I was wondering if JMS could be useful from a legislative point of view. I mean could it be useful when two companies situated in different countries communicate? Does JMS make this communication easier/better in any way?
    Hope someone is able to help me :)

    JMS is ideal for the loosely coupled communications which the integration of two different companies or governments would require. However, message oriented middleware has typically been a behind-the-firewall technology. So, while most JMS vendors support messaging over the firewall, it is not their primary focus. Web services are better suited to the type of over-the-Internet integration you are describing. The issue with this, however, is that web services lack transactional support. I think they are working on that though.

  • Handling Unit Information from sap mm point of view

    Hi all.
    Looking for Handling Unit Information from sap mm point of view.
    Regards.
    Parameshwar
    Note : Please search forum before posting.
    Edited by: Jeyakanthan A on Sep 22, 2011 1:20 PM

    Please refer the below links
    http://help.sap.com/printdocu/core/print46c/en/data/pdf/LOHU/LOHU.pdf
    http://help.sap.com/bp_bblibrary/600/html/G74_BB_EN_US.htm

  • Lost message from server's point of view

    Hi All
    Following situation:
    The JMS-Provider sends a JMS-Message. The message is entirely in the wire and is still flying to the consumer. Before the message arrives to the consumer, the network connection fails, so the client does nothing know about the send message.
    From the server’s point of view the message was successfully sent but not acknowledged yet. The server waits for an acknowledge and doesn’t undertake redelivery, because the consumer session on the server is still living.
    From the consumer point of view the message was not sent so the client has nothing to ack, so we have some “deadlock”.
    The question is – how does server recognize such situation (short connection fail, deadlock) and what does it undertake to guarantee the delivery?
    Thank you.

    The JMS-Provider sends a JMS-Message. The message is entirely in the wire and is still flying to the consumer. Before the message arrives to the consumer, the network connection fails, so the client does nothing know about the send message.
    From the server’s point of view the message was successfully sent but not acknowledged yet. The server waits for an acknowledge and doesn’t undertake redelivery, because the consumer session on the server is still living.
    From the consumer point of view the message was not sent so the client has nothing to ack, so we have some “deadlock”.
    The question is – how does server recognize such situation (short connection fail, deadlock) and what does it undertake to guarantee the delivery?If the "network connection fails" whilst sending a message then the server (and probably the client) will almost certainly receive a SocketException. A message is unlikely to simply disappear on the wire without at least one end of the socket getting an exception of some kind, and if the socket is simply hanging for some reason then most JMS providers would have a means to detect this (e.g. by sending periodic packets down the wire to check it is still alive).
    But ultimately, if a persistent message is sent to a consuming client and the message is not acknowledged (or the transaction committed) then the server will eventually redeliver it. JMS doesn't define exactly when an unacknowledged message is redelivered, but it typically wouldn't happen until the consumer in question has closed.
    Nigel

  • Levels of planning from sap mm point of view

    Hi All.
    Need Information On Levels of planning from sap mm point of view.
    Thanks in advance  all sap mm forum guys
    Regards.
    Parameshwar.

    Please check
    [MRP Areas|http://help.sap.com/saphelp_46c/helpdata/EN/c4/106956ae8a11d1a6720000e83235d4/frameset.htm]
    [http://help.sap.com/saphelp_46c/helpdata/EN/c4/106956ae8a11d1a6720000e83235d4/frameset.htm]

  • Improving audio quality from a subscriber point of view

    Hi,
    I am building an application that requires audio chat. When the chat is happening between an Android user and a PC user, the PC user can hear clearly when the Android user speaks. However, when it is the other way around, the Android user hear distorted sound,with noises. Is there any way to improve audio received from a subscriber point of view?
    Please advice, thanks!
    Regards

    Hi Raff,
    The Android device is a Samsung Galaxy S i9000 and it is running AIR 2.6, attached below is a snippet of the code related to the audio i am using
    <mx:Button x="121" y="700" height="34" width="117" label="Audio" toggle="true" id="audioButt"
       click="(audioButt.selected) ? audioPub.publish(): audioPub.stop()" includeIn="LoggedIn"/>
    <mx:Button x="242" y="700" height="34" width="117" label="Quality" toggle="true" id="audioButt1" includeIn="LoggedIn"
       click="(audioButt.selected) ? audioPub.microphoneManager.encodeQuality = 3 : audioPub.microphoneManager.encodeQuality = 4"/>
    <rtc:AudioPublisher  id="audioPub" codec="{SoundCodec.SPEEX}" useEchoSuppression="true" silenceLevel="0"  />
    <rtc:AudioSubscriber/>
    I think the problem is related to the script I am writing,I created a button  called Quality to reduce the encodeQuality of my PC microphone, will it helps to improve the audio recieved from my Android device?Please advice, thanks!
    Regards

  • Responce times from end-user point of view

    Hi,
    I am looking for the way how to collect responce times from end-user point of view.
    Logging of function execution via DMS is not enogh thus we need to discover and monitor problems in all components including poor network, users terminals etc.
    Regards,
    Tomasz

    Hi,
    I am looking for the way how to collect responce times from end-user point of view.
    Logging of function execution via DMS is not enogh thus we need to discover and monitor problems in all components including poor network, users terminals etc.
    Regards,
    Tomasz

  • Alerts from KPI (Performance Point)

    Hi
    I have installed Performance Point Monitoring Server. Is there anyway, i can set up alerts from KPI.Can some body give me some link having detailed information about setting up alertsalerts?
    Thanks
    Deeps

    Hi Deeps,
    PPS does not have emailing inbuilt functionality by default.
    Just to use the alerts, you could probably make use of the Share Point site alerts available in the Actions menu.
    I am not sure if this meets your requirement, hope it helps!
    Thanks

  • OIF-What's the diff. from user's point of view of SP/IdP initiated SSO

    I'm using OIF for federated single sign on. I got both the SP and IdP initiated SSO works. When I provide both URL to customer, how should I suggest which one to use? from end user's point of view, both of them works in the similar work flow: type(click) URL -> redirect to IdP's login page -> login -> return back to application. only diff. seems the URL. most of user even did not notice the diffrence between 2 URLs.
    Could some give some suggestion when and which one is preferred.
    Thanks

    Probabaly. however, in our case, the application url, e.g. http://appurl is used for non-federate sign on. so that the applicaiton can be run independent of IdP, e.g. IdP down.
    To allow federate sign on, we use one of following (as documented in OIF admin guide):
    SP initiated:
    http://SP host:port/ fed/sp/initiatesso?providerid=<SP provider Id>& returnurl=<http://appurl>
    IdP initiated:
    http://IdP host:port/fed/idp/initiatesso?providerid =<IdP provider Id>& returnurl=<http://appurl>
    So, you can see these does not support bookmark of federate sso since they would return back to http://appurl after federate sign on.
    Any suggestion? we couldn't tell good diffrence about above urls to our customer. is there anyway to allow us enable bookmark the federated sso?
    Thanks

  • Which is better from performance point of view : Enum or String?

    Hello All
    While working to re-factor code so as to improve performance,I saw that repeatedly some Strings are used to be put as keys in a HashMap.
    Will there be an improvement in performance if I assign use enums in place of using double quoted strings everytime.
    Also,Is it a better idea to use string constants rather than enums.
    Can anyone help me over this?
    Thanks in advance
    Mansi

    Found an article in Java performance tuning book.But they nowhere mentioned the perfect reason for doing this.Here's the artice :
    Enumerating constants
    Another canonicalization technique often used is replacing constant objects with integers. For example, rather than use the strings "female" and "male", you should use a constant defined in an interface:
    public interface GENDER
    public static final int FEMALE=1;
    public static final int MALE=2;
    Used consistently, this enumeration can provide both speed and memory advantages. The enumeration requires less memory than the equivalent strings and makes network transfers faster. Comparisons are faster too, as the identity comparison can be used instead of the equality comparison. For example, you can use:
    this.gender == FEMALE;
    instead of:
    this.gender.equals("female");

  • Which one is better, regarding performance point of view.

    Hi friends,
    I have a report, which has 10 columns.
    Now in order to pull data for all 10 columns, i need to access 8 tables.
    Ex.. open ref_cursor for
    select col1, col2, col3,.. col10
    from table1, table2, table3.. table8
    now i use 3 of those tables for getting column2.
    Is it better to call another function (which returns this value) to pull this column2 or is it better to just join the tables to get this column?
    Does using a function decrease the performance ?
    Thank you
    Jack

    I would say try to construct the query using just SQL if at all possible. If you are attempting to do procedural operations on the data that cant be achieved through standard SQL (via case statements and the like), you probably don't have much of a choice other than to using a function or procedure. At any rate, there really isn't enough information to tell you which is better. My process for designing programs, jobs, reports, or queries tends to follow the same process when I am working solo:
    1. Outline what I want on paper
    2. Outline how to get it on paper
    3. Create a rough draft in pseudo code
    4. Write the actual code
    5. Verify that I am getting consistent and correct results
    6. Trace the job, program, or query in the database using a 10046 trace or, If it is pl/sql, profile it using DBMS_PROFILER
    7. For 10046, I profile the trace file using a profiler of some sort (usually not tkprof unless I am working with a single statement)
    8. Review the profile for issues, bugs, or poorly performing queries
    I basically use the response time profiling methodology (I like this text for response time optimization techniques: Optimizing Oracle Performance, Millsap/Holt, Oreilly 2003) to identify the issues. If I determine the SQL is the issue, it is time to break out a harness tool (a tool that captures statement level execution statistics) to help me test alternatives. After I have tuned the query to my satisfaction, I repeat steps 5-8.
    Please note, this is a very broad overview of my personal process and may not meet your needs. There are plenty of other considerations when designing or troubleshooting when performance improvement is the goal.

  • Selecting better query from performance point of view.

    Hi friends,
    I have one situation which following example represents exactly.
    we have a table marks.
    Table Marks ( Student_No number,exam_code number, Mark_subject1 number, Mark_subject2 number, Mark_subject3 number).
    What I want is to prepare a table Results in following way.
    I need to insert one record for each student's each total Marks of each subject.
    Like
    Marks:
    Student_No...........Exam_code........Mark_subject1........Mark_subject2........Mark_subject3
    .........1.......................1.....................10.........................15..........................12
    .........1.......................2.....................15.........................15..........................10
    .........2.......................1.....................10.........................10..........................10
    .........2.......................2.....................17.........................17..........................10
    Then I want to populate results table with following data.
    Student...................Subject..............TotalMarks
    .....1.......................Subject1..................25
    .....1.......................Subject2..................30
    .....1.......................Subject3..................22
    .....2.......................Subject1..................27
    .....2.......................Subject2..................27
    .....2.......................Subject3..................20
    This needs to be done within one procedure.
    I can do it by two ways.
    1)
    insert into Results select student_no, 'Subject1',sum(Mark_Subject1) from marks group by student_no;
    insert into Results select student_no,'Subject2',sum(Mark_Subject2) from Marks group by student_no;
    insert into Results select student_no,'Subject2',sum(Mark_Subject3) from Marks group by student_no;
    2)
    For i in (select student_no,sum(mark_subject1) sub1, sum(mark_subject2) sub2, sum(mark_subject3) sub3 from marks)
    loop
    insert into Results values(i.student_no,'Subject1',i.sub1);
    insert into Results values(i.student_no,'Subject2',i.sub2);
    insert into Results values(i.student_no,'Subject3',i.sub3);
    end loop;
    If we use first way, 3 times the table will be accessed and will be processed (sorted) for "grouped by" and all the resultant data will be inserted.
    If we use second way, the marks table will be accessed and processed for group by for only once. But for each record of result set, 3 inserts will be done.
    I am confused about which would be better way provided the number of records in marks table is around 1,00,000.
    Please help me deciding the better way.
    Regards,
    Dipali..

    I would avoid cursor for loops if at all possible.

  • Dashboard Designer : How to default a Performance Point content to default yesterday date?

    Hi there,
    I need to design a dashboard with few charts and connecting to a same cube into one dashboard
    Example one chart will be showing sales as of yesterday , while another show sales for the year.
    Question:
    How can I default the chart to filter the date to yesterday and not impacting other charts in the same dashboard?
    This is the default query when i pull Invoice Date (the dimension to be defaulted to yesterday):
    SELECT
    ON COLUMNS,
    { [Measures].[Sales Amount] }
    ON ROWS
    FROM [Sales]
    WHERE ( [Invoice Date].[Invoice-Year -  Quarter -  Month -  Date].DEFAULTMEMBER )
    CELL PROPERTIES VALUE, FORMATTED_VALUE, CELL_ORDINAL, FONT_FLAGS, FORE_COLOR, BACK_COLOR
    Appreciate anyone can assist.
    Thank you

    so the PPS way is to create a date filter using a date dimension, then apply that filter to the chart.
    Unfortunately, an SSAS filter's "default" must be defined by an attribute in the dimension... this means that your date dimension will NEED a special column ("default" or "isToday") that PPS can use to determine the default
    value... once the datasource has this extra field, when you create the filter in PPS, connect it to the date dimension, it'll allow you to pick the default field member.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

Maybe you are looking for

  • Creation of SO from PO through Idocs in Same client

    Hi frnds,      Can we create SO from PO through IDOC's in the same client with different company codes. Ex: PO created in 100 client in company code AB00. i have to create SO in 100 client in company code AB01. Any suggestion on this is highly apprec

  • In French : Cannot Open IWEB since the last update

    HELP "iWeb à quitté de manière imprévue lors de l'utilisation du module SFWordProcessing". Détails : Process: iWeb [347] Path: /Applications/iWeb.app/Contents/MacOS/iWeb Identifier: com.apple.iWeb Version: 3.0.1 (301) Build Info: iWeb-4750000~14 Code

  • Remove labview 2009 without using add/remove program

    Hi all, I have problem with removing LabVIEW 2009. I have deleted some folders in C drive, NI folder. Now I can't run my LabVIEW 2009 and it doesn't show up in my add/remove program list. I tried to delete all folder and files in C drive under NI fol

  • Conversation View in Mail

    I love the new mail in Lion and I see how to click the button to show the email thread as a conversation.  But I don't want to click the button every single time.  How do I just set it so whenever I click any email in inbox it shows the whole thread

  • Generic hierarchies

    hi,      can any one tell me how to create a hierarchy in R/3. i want to create the generic hierarchies. thanks in advance. regards, meiy