Using SET STATISTICS IO ON

I have a quick question regarding the use of the SET option SET STATISTICS IO ON.  When I use this to monitor the number of reads done by different queries I'll often see large numbers of reads on tables with names like '#7B053305.'  I understand
Worktable tables shown in the output are for tables SQL creates on the fly to address sorts, group bys, order bys, etc.  What are these tables used for and how would I diminish large number of reads done on them?
Thanks.

SQL Server internally creates Worktable to Perform operations.refer the below link for  more clearity
http://msdn.microsoft.com/en-us/library/aa175247(v=sql.80).aspx
http://sqlblog.com/blogs/paul_white/archive/2013/03/08/execution-plan-analysis-the-mystery-work-table.aspx
Satheesh
My Blog

Similar Messages

  • Using set/get parameters or export/import in BSP.

    Hi All,
    Is it possible to use set/get or export/import in BSP?
    We need to set/export some variables from a BADI and get/ import them in the BSP application.
    Code snippet will be of great help..
    Thanks,
    Anubhav

    Hi Anubhav,
    You can use the Export / Import statements for your requirement,
    from the BADI use EXPORT to send the variable data to a unique memory location
    with IDs
    e.g.
    *data declaration required for background processing
          DATA: WA_INDX TYPE INDX.
    **here CNAME is the variable you want to export
    EXPORT PNAME = CNAME TO DATABASE INDX(XY) FROM WA_INDX CLIENT
                SY-MANDT ID 'ZVAR1'.
    and in the BSP application use the IMPORT statement to fetch back the values
    set with the IDs above.
    IMPORT PNAME = LV_CNAME
      FROM DATABASE INDX(XY) TO WA_INDX CLIENT
      SY-MANDT ID 'ZVAR1'.
    deletes the data to save wastage of memory
      DELETE FROM DATABASE INDX(XY)
        CLIENT SY-MANDT
        ID 'ZVAR1'.
    Regards,
    Samson Rodrigues

  • Using SET GET parameters in ITS

    Hi All,
    Is it possible to use set get parameters in ITS. We want to set some parameters in a BADI and read the value in ITS Template .
    Or is there any other method to do this?
    Thanks,
    Anubhav

    Sure. In your abap program use the following code
    *  ITS macros
    INCLUDE avwrtcxm.
    GET PARAMETER ID 'YOUR_PARAMETER' FIELD SAVE_PARAMETER.
    field-set u2018~YOUR_PARAMETERu2019 1 SAVE_PARAMETER.
    field-transport.
    in the template you can now use ~YOUR_PARAMETER.
    regards,
    Klaus
    Edited by: Klaus Layer on Feb 3, 2009 5:05 PM

  • Default sales org on selection screen using set and get parameter!!

    Hi,
    I need to default value on selection screen using SET n GET parameter...logic to be used should be:
    Sales Organisation:
    This field should be filled by default using the user parameter id VKO. (using sentence GET PARAMETER and SET PARAMETER)...
    Hope i need to write the code in initialisation and what shud b the content?
    Regards
    Gunjan

    hi,
    TABLES <table name>.
      SET PARAMETER ID VKO FIELD <tablename-fieldname>.
    call transaction 'zxx'.
    try this sample program,
    REPORT BOOKINGS NO STANDARD PAGE HEADING.
    TABLES SBOOK.
    START-OF-SELECTION.
      WRITE: 'Select a booking',
      SKIP.
    GET SBOOK.
      WRITE: SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
      HIDE:  SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
    AT LINE-SELECTION.
      SET PARAMETER ID: 'CAR' FIELD SBOOK-CARRID,
                        'CON' FIELD SBOOK-CONNID,
                        'DAY' FIELD SBOOK-FLDATE,
                        'BOK' FIELD SBOOK-BOOKID.
      CALL TRANSACTION 'BOOK'.
    regards,
    siva
    Message was edited by:
            Shan

  • How to use  SET and GET parameter commands ?

    Explain these two giving an example?As which is used for what?

    Hi Albert,
             SAP allows you to make use of SPA/GPA technique to fill the input fields of a called transaction with data from the calling program.SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.
    To fill one, use:
    SET PARAMETER ID <pid> FIELD <f>.
    This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID <pid> FIELD <f>.
    This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.
    To fill the initial screen of a program using SPA/GPA parameters, you normally only need the SET PARAMETER statement.
    The relevant fields must each be linked to an SPA/GPA parameter.
    On a selection screen, you link fields to parameters using the MEMORY ID addition in the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID when you declare a parameter or selection option, the corresponding input field is linked to that input field.
    On a screen, you link fields to parameters in the Screen Painter. When you define the field attributes of an input field, you can enter the name of an SPA/GPA parameter in the Parameter ID field in the screen attributes. The SET parameter and GET parameter checkboxes allow you to specify whether the field should be filled from the corresponding SPA/GPA parameter in the PBO event, and whether the SPA/GPA parameter should be filled with the value from the screen in the PAI event.
    When an input field is linked to an SPA/GPA parameter, it is initialized with the current value of the parameter each time the screen is displayed. This is the reason why fields on screens in the R/3 System often already contain values when you call them more than once.
    When you call programs, you can use SPA/GPA parameters with no additional programming overhead if, for example, you need to fill obligatory fields on the initial screen of the called program. The system simply transfers the values from the parameters into the input fields of the called program.
    However, you can control the contents of the parameters from your program by using the SET PARAMETER statement before the actual program call. This technique is particularly useful if you want to skip the initial screen of the called program and that screen contains obligatory fields.
    If you want to set SPA/GPA parameters before a program call, you need to know which parameters are linked to which fields on the initial screen. A simple way of doing this is to start the program that you want to call, place the cursor on the input fields, and choose F1 followed by Technical info. The Parameter ID field contains the name of the corresponding SPA/GPA parameter. Alternatively, you can look at the screen definition in the Screen Painter.
    The SPA/GPA parameter for the input field Company has the ID CAR. Use this method to find the IDs CON, DAY, and BOK for the other input fields.
    The following executable program is connected to the logical database F1S and calls an update transaction:
    REPORT BOOKINGS NO STANDARD PAGE HEADING.
    TABLES SBOOK.
    START-OF-SELECTION.
      WRITE: 'Select a booking',
      SKIP.
    GET SBOOK.
      WRITE: SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
      HIDE:  SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
    AT LINE-SELECTION.
      SET PARAMETER ID: 'CAR' FIELD SBOOK-CARRID,
                        'CON' FIELD SBOOK-CONNID,
                        'DAY' FIELD SBOOK-FLDATE,
                        'BOK' FIELD SBOOK-BOOKID.
      CALL TRANSACTION 'BOOK'.
    The basic list of the program shows fields from the database table SBOOK according to the user entries on the selection screen. These data are also stored in the HIDE areas of each line.
    Cheers
    Nishanth

  • Setting value for attribute  'PO_NUMBER_SOLD'  using setter method

    Hi Experts,
    I need to set the value of a screen field according to some condition. I am using setter method of this attribute to set the value but it is not getting changed.
    I have written following code in DO_PREPARE_OUTPUT method of implementation class ZL_ZZBT131I_ZCREDITCHECK_IMPL using setter method of attribute
    Get Referral Authorization Code
          lv_val1 = me->typed_context->crechkresph->get_po_number( attribute_path = 'PO_NUMBER' ).
          me->typed_context->crechkresph->set_po_number( attribute_path = 'PO_NUMBER'
                                                            value     = ' ' ).
    while debugging I found that in method set_po_number set_property method has been used:--
    current->set_property(
                          iv_attr_name = 'PO_NUMBER_SOLD' "#EC NOTEXT
                          iv_value     = <nval> ).
    In set_property method  following code is getting executed
    if ME->IS_CHANGEABLE( ) = ABAP_TRUE and
               LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY.
              if <VALUE> ne IV_VALUE.
                if ME->MY_MANAGER_ENTRY->DELTA_FLAG is initial.
                first 'change' -> proof that entity is locked
                  if ME->MY_MANAGER_ENTRY->LOCKED = FALSE.
                    if ME->LOCK( ) = FALSE.
                      return.
                    endif.
                  endif.
                flag entity as modified
                  ME->MY_MANAGER_ENTRY->DELTA_FLAG = IF_GENIL_CONTAINER_OBJECT=>DELTA_CHANGED.
                endif.
                ME->ACTIVATE_SENDING( ).
              change value
                <VALUE> = IV_VALUE.
              log change
                set bit LV_IDX of ME->CHANGE_LOG->* to INDICATOR_SET.
              endif.
            else.
            check if it is a real read-only field or a display mode violation
              assert id BOL_ASSERTS subkey 'READ-ONLY_VIOLATION'
                     fields ME->MY_INSTANCE_KEY->OBJECT_NAME
                            IV_ATTR_NAME
                     condition ME->CHANGEABLE = ABAP_TRUE.
            endif.
    and in debugging I found that if part ( ME->IS_CHANGEABLE( ) = ABAP_TRUE and
               LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY) fails and hence else part is getting executed and hence my field a real read-only field or a display mode violation is happening according to comments in code.
    What shall I do so that I would be able to change the screen field value?
    Any help would be highly appreciated.
    Regards,
    Vimal

    Hi,
    Try this:
    data: lr_entity type cl_crm_bol_entity.
    lr_entity = me->typed_context->crechkresph->collection_wrapper->get_current( ).
    lr_entity->set_property( iv_attr_name = 'PO_NUMBER' value = '').
    Also, make sure the field is not read-only.
    Regards
    Prasenjit

  • How to use SET & GET Parameters in Module Pool

    Hi Friends,
    Can anyone please tell how to use SET / GET parameters and PARAMETER ID for a text box (Input / Output field ) in module pool? What is the purpose and where do we need to do coding for it?
    Note : I will definitely give the marks for good responses.
    Thanks in advance,
    Pradeep

    Hi Pradeep,
    You can save values in the SAP memory using a parameter ID. These
    are user and terminal-session specific, but available to all internal and
    external sessions.
    SET Parameter copies the corresponding field contents into the SAP
    System memory in the PAI processing block.
    GET Parameter copies the corresponding field contents from the SAP
    memory at the end of the PBO processing block, after data has been
    transferred from the program, if the screen field still has its initial value
    You can link an input/output field to an area of the SAP memory in the
    ABAP Dictionary.
    When you use an input/output field that is defined in the ABAP
    Dictionary, its parameter ID is displayed in the Dictionary attribute
    Parameter ID in the Screen Painter.
    Usage
    SET PARAMETER ID: ’CAR’ FIELD space,
    ’CON’ FIELD space,
    ’DAY’ FIELD space.
    Here is the link that explains the usage of GET/SET in detail
    <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm">http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm</a>
    Regards,
    Sharadha

  • How to use Set type datasources ?

    Hi,
    Our team has recently implemented CRM for one of our clients and now are integrating BW with CRM. Thus are developing corresponding objects in BW.
    In CRM, the team has created many set types and made those BW relevant as a result system created datasources for each attribute of the set type.
    Has anybody used set types to extract data into BW?
    Regards,
    Vikrant.

    Hi
    go to this guide
    http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx70edgs.pdf
    and see the chapter
    "Designing Scripts for use with the Cisco Application Gateway"

  • How to check/verify running sql in lib cache is using updated statistics of table

    How to check/verify running sql in lib cache is using updated statistics of table used in from clause.
    one of my application table is highly busy i.e frequent update/insert/delete.
    we gather table stats every 30 min.

    Hello, "try dynamic sampling" = think "outside the box", maybe hit two birds with same stone.
    As a matter of fact, I was just backing up your statement: "30 minutes seems pretty extreme"
    cheers

  • Using SET COUNTRY in SMART forms

    Hi All,
    We have used SET COUNTRY 'GB' in the smart forms initialization code editor.
    But it is not reflecting currency formats & date formats in the country specific formats.
    I have to change the setting only in smart forms code only as i will not be able to edit print program.
    can any body solve this issue!
    Any system setting we need to do!
    Thanks in advance.
    Thanks,
    Deep.

    hi..
    U can change the settings in SU01.
    give ur username.
    Change in DEFAULTS tab, in Decimal Notation field.
    regards,
    Padma

  • Plase can anybody tell me how to use SETS (GS01/02/03) in ABAP program

    Plase can anybody tell me how to use SETS (GS01/02/03) in ABAP program

    http://wiki.sdn.sap.com/wiki/display/Snippets/Reading+Sets+-+GS01+-+GS02+-+GS03

  • [svn:fx-trunk] 11999: Fixed: ASC-3889 - Using setting in a for loop causes Verify error

    Revision: 11999
    Revision: 11999
    Author:   [email protected]
    Date:     2009-11-19 11:37:09 -0800 (Thu, 19 Nov 2009)
    Log Message:
    Fixed: ASC-3889 - Using setting in a for loop causes Verify error
    Notes: emit pop after callstatic to a void function to balance the stack.
    Reviewer: jodyer+
    Testing: asc,tamarin,flex checkin tests
    Ticket Links:
        http://bugs.adobe.com/jira/browse/ASC-3889
    Modified Paths:
        flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/CodeGenerator.java

    Blacklisting the ahci module does indeed get rid of the error. Would be nice to figure out why it was conflicting with the ahci module though.
    I have not yet tried the 173xx drivers, but the latest drivers for the Quadro FX 580 are the 256.53 drivers according to nvidia.
    Posted at the nV forums (http://www.nvnews.net/vbulletin/showthread.php?t=155282), so we'll see what they suggest.

  • Unable to use Set-TextMessagingAccount in exchange 2010

    I unable to use Set-TextMessagingAccount in exchange 2010, tried both in sp2 and sp3 getting following error:
    The operation couldn't be performed because object 'Aditya' couldn't be found on 'ex02.mydomain.com'.
        + CategoryInfo          : NotSpecified: (0:Int32) [Set-TextMessagingAccount], ManagementObjectNotFoundException
        + FullyQualifiedErrorId : C6F712B7,Microsoft.Exchange.Management.StoreTasks.SetTextMessagingAccount"
    Athoght i am able to use "Get-TextMessagingAccount Aditya" successfully with following output
    RunspaceId                      : e57177d4-6bb2-450d-acce-d56e81df6a9b
    Identity                        : mydomain/Users/Aditya Mendiratta
    CountryRegionId                 :
    MobileOperatorId                : -1
    NotificationPhoneNumber         :
    NotificationPhoneNumberVerified : False
    EasEnabled                      : False
    EasPhoneNumber                  :
    MailboxOwnerId                  :
    mydomain/Users/Aditya Mendiratta
    IsValid                         : True
    Please suggest
    Aditya Mediratta

    OK..this works only for currently logged in system account only. Say i logged in as administrator and use "Set-TextMessagingAccount" this would go any change i need to do on myself (administrator) by using "Set-TextMessagingAccount" but
    its yet not able to modify TextMessagingAccount settings for any other users in organization from current administrator account even after adding the administrator to MyTextMessaging Role. Below is how i added administrator to MyTextMessaging Role . I get
    the same error as stated in original query. Please suggest.
    Adding Administrator account to MyTextMessaging ROLE: 
    [PS] C:\Windows\system32>New-ManagementRole -name "Text_Admins" -Parent "MyTextMessaging"
    Name                                                        RoleType
    Text_Admins                                                 MyTextMessaging
    [PS] C:\Windows\system32>Get-ManagementRole "Text_Admins"
    Name                                                        RoleType
    Text_Admins                                                 MyTextMessaging
    [PS] C:\Windows\system32>Get-ManagementRoleEntry "Text_Admins\*"
    Name                           Role                      Parameters
    Clear-TextMessagingAccount     Text_Admins               {Confirm, Debug, DomainController, ErrorAction, ErrorVariab...
    Compare-TextMessagingVerifi... Text_Admins               {Confirm, Debug, DomainController, ErrorAction, ErrorVariab...
    Get-CalendarNotification       Text_Admins               {Credential, Debug, DomainController, ErrorAction, ErrorVar...
    Get-Mailbox                    Text_Admins               {Identity}
    Get-TextMessagingAccount       Text_Admins               {Credential, Debug, DomainController, ErrorAction, ErrorVar...
    New-InboxRule                  Text_Admins               {Name, SendTextMessageNotificationTo}
    Send-TextMessagingVerificat... Text_Admins               {Confirm, Debug, DomainController, ErrorAction, ErrorVariab...
    Set-CalendarNotification       Text_Admins               {CalendarUpdateNotification, CalendarUpdateSendDuringWorkHo...
    Set-InboxRule                  Text_Admins               {Identity, Mailbox, SendTextMessageNotificationTo}
    Set-TextMessagingAccount       Text_Admins               {Confirm, CountryRegionId, Debug, DomainController, ErrorAc...
    Set-UMMailbox                  Text_Admins               {Identity, UMSMSNotificationOption}
    [PS] C:\Windows\system32>New-RoleGroup "Text_admins_Rgrp" -Roles "Text_Admins" -Members administrator
    Name                    DisplayName             AssignedRoles           RoleAssignments         ManagedBy
    Text_admins_Rgrp                                {Text_Admins}           {Text_Admins-Text_ad... {mydomain.com/Users/Admi...
    [PS] C:\Windows\system32>Get-RoleGroup "Text_admins_Rgrp" | FL
    RunspaceId        : 11e84709-8bcf-4777-8dd6-b018d1d2c5d3
    ManagedBy         : {mydomain.com/Users/Administrator, mydomain.com/Microsoft Exchange Security Groups/Organization Management}
    RoleAssignments   : {Text_Admins-Text_admins_Rgrp}
    Roles             : {Text_Admins}
    DisplayName       :
    Members           : {mydomain.com/Users/Administrator}
    SamAccountName    : Text_admins_Rgrp
    Description       :
    RoleGroupType     : Standard
    LinkedGroup       :
    IsValid           : True
    ExchangeVersion   : 0.10 (14.0.100.0)
    Name              : Text_admins_Rgrp
    DistinguishedName : CN=Text_admins_Rgrp,OU=Microsoft Exchange Security Groups,DC=mydomain,DC=com
    Identity          : mydomain.com/Microsoft Exchange Security Groups/Text_admins_Rgrp
    Guid              : b50d3ed8-b8c2-4e9f-a3e9-b54350d3f645
    ObjectCategory    : mydomain.com/Configuration/Schema/Group
    ObjectClass       : {top, group}
    WhenChanged       : 2/7/2015 10:50:45 PM
    WhenCreated       : 2/7/2015 10:50:45 PM
    WhenChangedUTC    : 2/7/2015 5:20:45 PM
    WhenCreatedUTC    : 2/7/2015 5:20:45 PM
    OrganizationId    :
    OriginatingServer : ex02.mydomain.com
    Aditya Mediratta

  • Problem While Using SET PF-STATUS

    Hi friends,
    Here im doing a ALV interactive report , in which two buttons are placed DISPLAY  and CHANGE by using SET PF-STATUS ,when ever the user select a record on output and clicks on those button it ill navigate to corresponding transaction, all works fine but here im using Customised application toolbar in which im placing Two Customised Buttons(DISPLAY,CHANGE),standard functions like SORT,PRINT,SEARCH,TOTAL,SUBTOTAL... in the STATUS defined for my program.
    The problem is when Bulk data there in output TOTALSigma) not working and displays a message and another one is SUBTOTAL icon to be displayed after total is done in standard reports but here with Total icon the Subtotal icon is displaying in output.
    i need to get the SUBTOTAL icon only after the TOTAL is done,
    One Solution for this is we can Copy the Staus of Standard program into our customised Status in SE41 tcode, but im not able to get any  Status of STANDARD program along with my Customised icons(DISPLAY and CHANGE)..
    i hope i information provoded for the issue is enough to resolve the problem
    if not let met know for further clarifications needed.
    Regards,
    Niranjan. G

    Hi Niranjan,
    First copy standard status using program SAPLKKBL and status STANDARD_FULLSCREEN into your customized program and add your two buttons and code accordingly. It works.
    Regards
    Venkat

  • Where-Clause-Question using "sets of values"

    Hello,
    I'm using 10gR2
    Is it possible to filter rows by using sets of values in the where-clause?
    E.g. like:
    SELECT a, b, c
      FROM mytable
      WHERE (b,c) IN
          (3,4),
          (6,7),
          (9,1),
          (0,2)
        )...should only retrieve rows from mytable with the sets (pairs) of above list

    Here is a link to the docs: [Expression Lists|http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions014.htm#i1033664]
    !http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/img/expression_list.gif!
    The number of expressions in each set must match the number of expressions before the operator in the comparison condition or before the IN keyword in the membership condition.

Maybe you are looking for

  • How do I synchronize my e-mail accounts and folders

    Hi everybody on this line... I am using a Powerbook + a Mini mac and I would very much like to read/delete/save all my incoming e-mail on both machines without doing the work twice (on each machine). So how do I synchronize my e-mail accounts and fol

  • Adobe Bridge CC errors & Photoshop CC errors

    2 issues with a recent Photoshop CC download (subscription).  1st issue:  Photoshop 64bit will not recognize the Nvidia FX880M driver even though it has been updated.  Photoshop (non64bit) will recognize the driver.  I have an older version on anothe

  • Images are not displayed in Outlook 2010, Win 7 64 bit

    Dear Sirs, I ask for help! I can not manage to set the display of images in Outlook 2010. I tried everything suggested on this forum, but nothing helped me to solve the problem. It seems to me that the problem is in software. Any advice is welcome. T

  • Labview computer corrupted

    hi I had installed labview on a computer in 2003. The computer works on Windows NT2000, but it is creating problems. I am afraid that although labview software is working perfectly, due to my computer operating system malfunction, i may not be able t

  • The Adobe Muse file damaged and cannot be opened. Please Help!!!

    My Muse crushed on me while generating "preview site in browser" command. After I re-started Adobe Muse, I get this message: There are several back-up files I tested and they all had this error. Does anyone know what to do? I have saved the site befo