Sql trace and tkprof result

When I use sql trace and tkprof. After I use tkprof, I get the result statistics. However, I don't understand one point that I see many queries which I didn't run. I mean how come these queries executed? and by who?
thanks

some could be recursive sql statemets run by oracle. Post some example what you are running and what you are seeing?
The SQL statements can be listed in a TKPROF report in the order of how much resource they used, if desired. Also, recursive SQL statements issued by the SYS user to manage the data dictionary can be included or excluded.
How to Use and Understand the TKPROF utility

Similar Messages

  • SQL Trace and TKprof

    Hello,
    Can someone tell me what is SQL trance and TKprof?
    when we will apply and what need of this?
    why i should give alter session set sql trace = true?
    if someone could give me an idea of what is a TKprof do, would be apprecaited.

    if someone could give me an idea of what is a TKprof doThe doc has an idea : http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#PFGRF01010
    Nicolas.

  • What is SQL Trace and How to Use it .

    Dear Experts .
    1.) May You Please tell me What is the Purpose of SQL-Trace and How to use it ?
    2.) What is purpose of T-codes SE30 and ST22 ?
    Please it is urgent ...
    Regards :  Rajneesh

    Hi
    SQL Trace transaction ST05: The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on a particular database table of the ABAP program would be mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    Run time analysis transaction SE30 :This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing. 
    STEPS
    Run time analysis transaction SE30
    In Transaction SE30, fill in the transaction name or the program name which needs to be analyzed for performance tuning.
    For our case, let this be “ZABAP_PERF_TUNING”
    After giving the required inputs to the program, execute it. After the final output list has been displayed, PRESS the “BACK” button.
    On the original SE30 screen, now click on “ANALYZE” button.
    The percentage across each of the areas ABAP/ Database/System shows the percentage of total time used for those areas and load on these areas while running the program . The lesser the database load faster the program runs.
    SQL Trace – ST05
    Starting the Trace:
    To analyze a trace file, do the following:
    Choose the menu path Test  Performance Trace in the ABAP Workbench or go to Transaction ST05. The initial screen of the test tool appears. In the lower part of the screen, the status of the Performance Trace is displayed. This provides you with information as to whether any of the Performance Traces are switched on and the users for which they are enabled. It also tells you which user has switched the trace on.
    Using the selection buttons provided, set which trace functions you wish to have switched on (SWL trace, enqueue trace, RFC trace, table buffer trace).
    If you want to switch on the trace under your user name, choose Trace on. If you want to pass on values for one or several filter criteria, choose Trace with Filter.
    Typical filter criteria are: the name of the user, transaction name, process name, and program name.
    Now run the program to be analyzed.
    Stopping the Trace:
    To deactivate the trace:
    Choose Test Performance Trace in the ABAP Workbench. The initial screen of the test tool appears. It contains a status line displaying the traces that are active, the users for whom they are active, and the user who activated them.
    Select the trace functions that you want to switch off.
    Choose Deactivate Trace. If you started the trace yourself, you can now switch it off immediately. If the performance trace was started by a different user, a confirmation prompt appears before deactivation-
    Analyzing a Sample trace data: PREPARE: Prepares the OPEN statement for use and determines the access method.
    OPEN: Opens the cursor and specifies the selection result by filling the selection fields with concrete values.
    FETCH: Moves the cursor through the dataset created by the OPEN operation. The array size displayed beside the fetch data means that the system can transfer a maximum package size of 392 records at one time into the buffered area.

  • Analysing details of SQL trace and runtime analysis for a report.

    Hi,
    I am trying to tune the performance of a Z ABAP report for target group export. A brief overview of what is done in the report is the retrieval of BP details present in the Target group including BP general, address, marketing attributes, person responsible and contact person details. As the target groups can be quite huge (around 6000 BPs), the report gives performance issues. I want to understand on how to analyse the details which I obtained from the run time analysis and SQL trace and on how to take it forward.
    Any inputs in this regard would be helpful.
    Thanks in advance,
    Anushree

    In Runtime analysis Look for
    ABAP -  In your ABAP code
    DATABASE  -  It shows the performance of your SELECT statements in your program.
    Just check how much % it is showing for both.
    Check for following in your code.
    1) Avoid SELECT *
    2) Clear internal tables values which are not required at the ending of program, as it saves memory
    etc.

  • Reg : SQL Trace and ECAT

    Hi Floks ,
    Any body knowing The SQL trace analysis and Ecat tool .send me how to work on this issues .Please send me with snap shot it's will help to who don't know how to utilize this tools.
    thanks,
    suresh

    Hi suresh,
    Check these links.
    SQL trace
    http://www.sapdevelopment.co.uk/perform/perform_sqltrace.htm
    Go to st05 and activate trace, go back and run your transaction or report again go to st05 deactivate trace and click display trace here you can find information with this you can performence analysis, database tables, fields etc.
    ECAT
    eCATT stands for extended Computer Aided Test Tool (eCATT) which is built is testing tool to test SAP system. By using testing tool we can test the entire business process, and we can also use this tool with a third party testing tool (I am not covering this topic). Execution of every test script ends with a log, which explains the results of the test script.
    By using eCATT we can do following operations,
    ·        Test transactions, reports, and scenarios
    ·        Call BAPIs and function modules
    ·        Test remote systems
    ·        Check authorizations (user profiles)
    ·        Test updates (database, applications, GUI)
    ·        Test the effect of changes to customizing settings
    ·        Check system messages
      For more information go to
    http://help.sap.com/saphelp_erp2004/helpdata/en/2a/121e3bd711bb04e10000000a114084/frameset.htm
    To develop a test script in eCATT we need to follow the following steps,
    1. Creating Test Scripts.
    2. Creating Test Data Containers[16] .
    3. Understanding System Data Containers[17] .
    4. Executing Test Configurations.
    There is a very good web blog on eCATT in sdn.com which explains eCATT with necessary screen shots.
    To read document click here Blog on eCATT
    http://www.sapdevelopment.co.uk/testing/ecatt.htm

  • Finding SQL trace and Log trace in SAP ME

    Dear Experts,
    I am new to SAP ME SDK 2.0  development. After depolying the ME with changes.If an error occurs as "An internal error occurred; contact technical support". Where should I check for the traces like SQL trace or og trace.
    Thanks in advance,
    Eswaraiah M.

    Hello,
    Log records are written to NW log and can be viewed in NW log viewer.
    Konstantin

  • SQL Trace and Bind Values

    I need to capture bind values in SQL Trace. I am running Oracle 9.2.0.8. I will be running my queries from an application, not SQL Plus. I can use a after log on trigger to turn on trace. Has anyone done this with success? Are there any other ways to do this at the server level?
    Thank you for your input
    David

    Hello David,
    it is such easy ... you wouldn't believe it.
    Have a look at the pl/sql procedure "dbms_system.set_ev", with this one you can do this on session level: http://www.oracleadvice.com/Tips/dbms_system.htm#SET_EV
    There are also some other possibilities... but this should hit your question..
    To turn on:
    SQL> exec dbms_system.set_ev(<SID>, <SERIAL>, 10046, 12, '');
    To turn off:
    SQL> exec dbms_system.set_sql_trace_in_session(<SID>, <SERIAL>, FALSE);
    Regards
    Stefan

  • Passing Parameters to SQL Query and Displaying Result

    The user enters a serial number in a text box and then pushes a button to get info about the serial number. I do this with two regions. The first region has the text box and the button. The second region is a Report type region and contains the following SQL:
    select case
    when "WARRANTYSTATUS"."OUTOFWARRANTYDATE" >= sysdate then
    'Serial Number '||"WARRANTYSTATUS"."SERIALNUMBER"||' is in warranty.'
    else
    'Serial Number '||"WARRANTYSTATUS"."SERIALNUMBER"||' is out of warranty.'
    end as "The result is:"
    from "WARRANTYSTATUS"
    where "WARRANTYSTATUS"."SERIALNUMBER" in (:P1_SERIALNUMBER)
    For a single serial number of the form CU5-0799 every thing works. I am a little suprised this works because the SERIALNUMBER in the WARRANTYSTATUS table is of type varchar2 which means the serial number in the where clause must be surrounded by single quoties. Not sure where the single quoties are being added.
    However, what I like to do is to enter more that one serial number, seperated by commas, in the same text box, and then the query return a result for each serial number. What I would like to enter is:
    CU5-0799, CU5-07132, CU5-89345
    The problem is this string of three serial numbers will needs to be have single quotes around each serial number at the level of the sql statement. So the question is how do I make this work?? Thanks for the help in advance.

    Bob,
    If you would change your OTN handle to something more mnemonically friendly, that would help us. Thanks.
    This topic is addressed fully, with various techniques described, here: Re: Search on a typed in list of values .
    I am a little suprised this works because the SERIALNUMBER in the WARRANTYSTATUS table is of type varchar2 which means the serial number in the where clause must be surrounded by single quoties.
    Not true. Quotes are used for literals, not bind variables.
    Scott

  • SQL tracing and TKPROF tool, how to get object name

    Hi,
    I set sql_trace = ture for my session.
    Then I use TKPROF (on trace file) to get the explain plan (for my stored procedure). but the explain plan shows obj# (object number), HOW do I get TKPROF to show object name on explain plan (I have checked the SYBEX book, it has no info on that)?
    Also can you get explain plan from SQL (without sql_trace) for stored procs, if so HOW?
    Thanks

    SELECT
    SERVERPROPERTY('MachineName') AS [ServerName],
    SERVERPROPERTY('ServerName') AS [ServerInstanceName],
    SERVERPROPERTY('InstanceName') AS [Instance],
    SERVERPROPERTY('Edition') AS [Edition],
    SERVERPROPERTY('ProductVersion') AS [ProductVersion],
    Left(@@Version, Charindex('-', @@version) - 2) As VersionName
     |
    Blog: MSBICOE.com |
    MCITP - BI, SQL Developer & DBA
    Hate to mislead others, if I'm wrong slap me. Thanks!

  • Trace file and TKPROF

    Hi All,
    While tuning procedures generally I go through all queries, generate explain plans to check which is expensive and try yo tune that.Recently I got some procedures in top buffer gets list.when I gone through all queries. All using Indexes and cost is very low and accessing small tables.The number of iterations in the loop also not much.But it is taking 3 million bufffer gets for each execution.
    How can I find out which part of procedure is causing these many buffer gets? Currently I dont have acces to trace files and TKprof.If I get access How it is going to help me in tuning the above procedure.
    I need to explain effictively to DBA the use of trace and TKprof to get this access.

    TKPROF will give buffer gets usage by query. If the same query (with bind variables) is executed several times, you will get a summary for all executions of the same query. You can also switch on and off trace with ALTER SESSION statement to limit tracing and even do it from another session (see
    http://asktom.oracle.com/pls/ask/f?p=4950:8:12005269305828706290::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:330817260752)
    For SQL trace and TKPROF usage, see
    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96533/sqltrace.htm#1018

  • SAP Tools vs. SQLTrace and TKPROF

    Experts,
    First let me say that I am NOT an oracle expert, I am a basis person.  Such is the reason I come seeking wisdom.
    We are undergoing somewhat of a knee-jerk performance analysis, based on some user complaints.  Our new-to-the-organization dba (who has no experience in SAP) is wanting to set up a small performance tablespace within our Production ECC DB and use sql trace and tkprof to analyze what ever it is that they are wanting to look at.
    In the past we have been slightly more methodical about tracking down the problem, and then analyzing it based on traces and information within the ST* and DB* tools of SAP.
    my 2 questions are:
    -  Is there any concern with setting up perf gathering tablespace within the production DB
    - Does SQLTrace and TKProf give information not readily available within SAPs performance and administration txn's? (DBACockpit, ST* tools, Etc.)
    (edit: environment is Solaris 10 64-bit/Oracle 10.2.0.2 64-bit  e2900 64/GB Mem)
    Thank you in advance,
    Phillip
    Edited by: Phil May on Oct 9, 2009 1:47 PM

    Hi Stefan,
    > At first i think, that the analyze possibilities inside SAP for performance issues are one of the best i have ever seen.
    True and sad at the same time.
    There would be so much more necessary to really have an end-to-end performance view of data processing processes in heterogeneous and distributed systems like SAP landscapes are.
    >So in my opinion you can mostly identify and track down the performance issues within SAP itself (ST05, ST04, STAD, etc.).
    > > Does SQLTrace and TKProf give information not readily available within SAPs performance and administration txn's?
    > Of course .. the raw SQL trace is much more detailed (wait events, etc.), but to be honest .. mostly you don't need it in a SAP environment.
    Hmm... I think this (being able to solve most problems with the currently available tool set) only partly comes from the completeness of the tool set.
    At least for a part of it, I think it's something like 'When-all-you-have-got-i-a-hammer-everything-look-like-a-nail"-effect.
    Usually the "Wait Event Evangelists" (like Cary Milsap) will tell you that the extended SQL trace is all you'll ever need to track down all of your performance issues.
    Then there is a whole group of people that try to catch everything by staring at execution plans and theorizing about what execution step would be the problem cause (e.g. the bad hash join or the bad bad bad full table scan).
    The DB-agnostic counterpart will say that the NetWeaver platform already covers everything necessary and that look out for additional indexes or ABAP parameters.
    I think the truth lies (as usual) somewhere in between.
    All in all I think the key point is to get an angle to the problems at all.
    As soon as one can describe the problems in a structured way, (s)he has at least a chance to figure out what is happening when
    the systems becomes slow.
    Given that I'd also vote for the most convenient approach - and that is to use the GUI tools provided by NetWeaver.
    And the more experienced Oracle tuning-super-heroes can always take a step further and emply the sql_id-data-collection script or one of the endless number of special scripts that are available through report RSORASTT nowadays.
    Just my 2 pence...
    regards,
    Lars
    Edited by: Lars Breddemann on Oct 10, 2009 10:31 AM

  • Sql trace - tkprof

    Hi..
    My requirement is to
    run a sql trace, with binds, replicate the issue in the SQL Report Wizard and then upload both the raw trace and tkprof'd output.
    Can anyone give me in detail explanation for the above?
    Rgds
    Geeta Mutyaboyina

    You might find [url http://forums.oracle.com/forums/thread.jspa?threadID=501834&tstart=0]this link useful.
    Regards,
    Rob.

  • Code inspector, SQL trace

    Hi all,
    Can anyone help me to analyse the output of sql trace and  code inspector that we do for a program.
    Thanks & regards,
    Saroja.

    SQL trace(ST05) provides the developer with the ability to analyse database select statements. Simply execute ST05 to turn on SQL trace, then execute the statement/program you want to analyse. Now turn off SQL trace using ST05
    and click on list trace to view the details.
    If you notice performance issue, you can perform an SQL trace :
    1 - ST05
    2 - Activate trace
    3 - Run your prog.
    4 - Deactivate trace & display it !
    You'll see accessed tables, with runtime, etc...
    You can also perform traces on other items such as authorisation objects.
    Authorisation trace analysis 1. Open two sessions
    2. Execute transaction ST01 in one of the sessions
    3. Select the authorisation checkbox, note the other traces
    you can perform (SQL, RFC, Table Buffer etc)
    4. Click the 'Trace On' button
    5. Within your other session execte the transaction/report
    you want to trace or get the user in question to do it
    6. Return to the session where you turned the trace on and
    click on 'Trace Off' otherwise it will continue to record
    all athorisation checks
    7. Click on the 'Analysis' button
    8. Enter appropriate data into selection screen such as
    Username, type of trace records (i.e. Authorization check)
    9. Click on the Execute button.
    10. Report displaying trace results will now be displayed
    http://www.sapdevelopment.co.uk/perform/perform_sqltrace.htm
    Code inspector is a static check on your code. This check highlights statements that MAY cause long run times or inconsistant results.
    This is new as of 6.10, it can be installed on 4.6C or 4.6D systems.
    Code inspector includes the checks from the earlier 'Extended program check', (also transaction SLIN). The transation code for 'Code inspector' is SCII.
    Regards,
    Amey
    Message was edited by:
            Amey Potale

  • CLIENT 에서 SQL TRACE 뜨기

    제품 : ORACLE SERVER
    작성날짜 : 2002-05-07
    PURPOSE
    Client에서 SQL trace를 뜨는 방법
    EXPLANATION
    오라클을 사용하는 tool 에서 sql trace 를 사용하고자 하면
    alter session set sql_trace=true ; 를 사용한다.
    또는 dbms_session.set_sql_trace (true) 사용한다.
    이는 forms 를 비롯하여 precompiler 를 포함한다.
    또 이의 반대는
    alter session set sql_trace= false ; 를 사용한다.
    또는 dbms_session.set_sql_trace (false) 사용한다.
    이 때 실행된 결과는 user_dump_dest 에 쌓이는데 , file 이름은 process 번호를
    참고한다.
    그러나 MTS 의 경우 trace file 의 구분이 모호해지므로 client를 connect 시
    dedicate 로 붙여 trace 를 사용하여야 하며, 만일 다른 session 에서 다른
    session의 것을 trace 뜨고 싶으면,
    dbms_system.set_sql_trace_in_session 을 사용할 수 있다.
    EXAMPLE
    이의 사용법은 다음과 같다.
    1. Setup
    catproc.sql 에서 생성되는 package 와는 달리 dbms_system 의
    public synonym 은 생성되지 않고 권한도 부여되지 않는다.
    DB 생성 초기에 SYS user 만 reference 할 수 있으므로 이 package 를
    사용할 user에게 권한을 부여한다.
    예제 : GRANT EXECUTE ON DBMS_SYSTEM to username;
    2. v$session 으로부터 SID 와 serial 번호를 부여한다.
    SQL> select sid, serial#, osuser, username
    2> from v$session;
    SID SERIAL# OSUSER USERNAME
    7 66 <osLogin> <oracleUserName>
    3. 원하는 session 에서 SQL trace 를 setting 한다.
    exec sys.dbms_system.set_sql_trace_in_session
    (12,16631,TRUE);
    또는 pl/sql procedure 에서:
    begin
    sys.dbms_session.set_sql_trace ((<sid>,<serial>,TRUE);
    end
    4. session 에서 SQL Trace 를 끝마친다. 이 결과는 user_dump_dest에
    쌓인다.
    exec sys.dbms_system.set_sql_trace_in_session
    (<sid>,<serial>,FALSE);
    또는 pl/sql procedure 에서
    begin
    sys.dbms_session.set_sql_trace (<sid>,<serial>,FALSE);
    end
    만일 os user 가 khpark 인 client 에서 실행하는 sql 의 trace 를 뜨고
    싶으면
    svrmgrl> select sid,serial#,osuser from v$session
    where osuser='KHPARK';
    sid serial# osuser
    =================================================
    8 12 khpark
    svrmgr>execute dbms_system.set_sql_trace_in_session (8,12,TRUE);
    이렇게 하면 udump 에 trace file 이 생기므로 이를 이용하여 tkprof 를 수행한다.
    REFERENCE DOCUMENT
    ---------------------

    Hello Carl,
    SQL Trace and SQL Profiler are deprecated since SQL Server 2012 which means that at any future version it might not be available anymore. Have you considered using Extended Events - Microsoft.SqlServer.Management.XEvent
    Namespace?
    Ivan Donev MCT and MCSE Data Platform
    I've spent a fair bit of time reading about XEvents - eventually I won't need SQL 2008 support anymore and I can stop using Trace - but I'm not seeing anything remotely close to TraceServer.  What I see is an elaborate infrastructure for efficiently
    collecting information about high volume OLTP workloads with minimal server impact.  That's all well and good, but of no use to me at all.  What I'm looking for is real-time information about OLAP database processing that I can embed in my app to
    provide detailed metrics on same.  
    Presumably something can be put together using XEvents as the source and ETW as the target, with real-time monitoring of ETW events, but that's a lot of API to get a handle on, and I haven't seen any helpful samples that show putting it all together to get
    a profiler-like experience with live viewing of processing events as they happen.
    Any pointers to helpful samples/resources on XEvents are appreciated - long term, that's going to be my path, I'm sure.
    -cd Mark the best replies as answers!

  • Performance between SQL Statement and Dynamic SQL

    Select emp_id
    into id_val
    from emp
    where emp_id = 100
    EXECUTE IMMEDIATE
    'Select '|| t_emp_id ||
    'from emp '
    'where emp_id = 100'
    into id_valWill there be more impact in performance while using Dynamic SQL?

    CP wrote:
    Will there be more impact in performance while using Dynamic SQL?All SQLs are parsed and executed as SQL cursors.
    The 2 SQLs (dynamic and static) results in the exact same SQL cursor. So both methods will use an identical cursor. There are therefore no performance differences ito of how fast that SQL cursor will be.
    If an identical SQL cursor is not found (a soft parse), the SQL engine needs to compile the SQL source code supplied, into a SQL cursor (a hard parse).
    Hard parsing burns a lot of CPU cycles. Soft parsing burns less CPU cycles and is therefore better. However, no parsing at all is the best.
    To explain: if the code creates a cursor (e.g. INSERT INTO tab VALUES( :1, :2, :3 ) for inserting data), it can do it as follows:
    while More Data Found loop
      parse INSERT cursor
      bind variables to INSERT cursor
      execute INSERT cursor
      close INSERT cursor
    end loopIf that INSERT cursor does not yet exists, it will be hard parsed and a cursor created. Each subsequent loop iteration will result in a soft parse.
    However, the code will be far more optimal as follows:
    parse INSERT cursor
    while More Data Found loop
      bind variables to INSERT cursor
      execute INSERT cursor
    end loop
    close INSERT cursorWith this approach the cursor is parsed (hard or soft), once only. The cursor handle is then used again and again. And when the application is done inserting data, the cursor handle is released.
    With dynamic SQL in PL/SQL, you cannot really follow the optimal approach - unless you use DBMS_SQL (a complex cursor interface). With static SQL, the PL/SQL's optimiser can kick in and it can optimise its access to the cursors your code create and minimise parsing all together.
    This is however not the only consideration when using dynamic SQL. Dynamic SQL makes coding a lot more complex. The SQL code can now only be checked at execution time and not at development time. There is the issue of creating shareable SQL cursors using bind variables. There is the risk of SQL injection. Etc.
    So dynamic SQL is seldom a good idea. And IMO, the vast majority of people that post problems here relating to dynamic SQL, are using dynamic SQL unnecessary. For no justified and logical reasons. Creating unstable code, insecure code and non-performing code.

Maybe you are looking for

  • Fixing Billing Date in VF11

    Hi All I want to fix the billing date dynmic for today in vf11 - cancel billing Document I want that the user couldn't change this date it will be fixed for today I tried with user exit SDVFX007,SDVFX008,SDVFX009,SDVFX010,SDVFX011                    

  • My friend sent me a picture how can i print a hard copy?

    She sent it to me using mms. I saved the picture in my photos & i can see it theres no problem but when i take my iphone 5 to the shop to print the picture of my little grandson it doesnt show up in my pictures Any help would be greatly appriciated..

  • Import/Export tool Command line syntax for R2

    Would anyone please advise the syntax of command line import/export tool for XIR2? Read this post below for importing from a biar file but not sure how to export from BO into a biar file. How to log BIAR export/import from command line We're in fact

  • IPod and Skype

    I'm considering an iPod touch but I want to ask some questions about it concerning the use of Skype. I have a mono (for one ear), wired head set with mic. The kind you'd use with a cell phone. Will that work with the new 64Gig iPod touch and Skype? I

  • Organizing expenses into months using date

    I have a budget with a monthly expenses cell for each month and a different spreadsheet with an expenses list. I have it organized into date, expense, and price. I need to find a way to add the total of all of my expenses for a month without using 12