Get the group by query faster

Hi,
I have one group by query which has joins of 2 tables and also the joining columns has indexes.
But the query takes quite time to get the output.
Is there any way to get the output of group by clause faster.
The query is given below
SELECT a.description,a.type_of_item,a.item_type_id ,b.city_code,COUNT(1)
FROM PPBS_ITEM_MASTER a,PPBS_INV_SIM_SERIAL b
WHERE b.item_type_id = a.item_type_id
AND b.status='AA'
GROUP BY a.description,a.type_of_item,a.item_type_id ,b.city_code
Kumar

Did you do some explain plan and possibly tkprof on the query to see what it is doing?
what is the explan plan?
tkprof output?
what optimizer is in use?
are stats gathered? if yes, how?
how many rows are in base tables?
how many rows do you get from the query?
how many rows are matching the condition b.status = 'AA' ?
you can replace that COUNT(1) with a COUNT(*) without any loss of performance.

Similar Messages

  • Each time I start Firefox it says: "URGENT! Your version of Firefox is no longer protected against online attacks. Get the upgrade - it's fast and free!" I am using ver. 3.6.13 and upgrading "successfully" only stays on 3.6.13 with same URGENT message.

    Each time I start Firefox it says:
    "URGENT! Your version of Firefox is no longer protected against online attacks. Get the upgrade - it’s fast and free!"
    I am using ver. 3.6.13 and upgrading "successfully" only stays on 3.6.13 with same URGENT message.

    Your UserAgent string in Firefox is messed up and needs to be reset. <br />
    [http://en.wikipedia.org/wiki/User_Agent]
    type '''about:config''' in the URL bar and hit Enter <br />
    ''If you see the warning, you can confirm that you want to access that page.'' <br />
    Filter ='''general.useragent.''' <br />
    Right-click the preferences that are '''bold''', one line at a time, and select ''' ''Reset'' ''', <br />
    Then restart Firefox

  • LabVIEW 8.0:: How to get the group name of a user logged to a NI Security Domain?

    Hello all,
    I am using LabVIEW 8.0 PDS.
    I created a new local domain called "MyDomain" in the "NI Domain Account Manager" . I added a new User called "MyUser" and a new group called "Maintenance". I set "MyUser" to be a member of the "Maintenance" group. Then, I configured LabVIEW to invoke the login dialog at start-up in order to log "MyUser" with the correct password.
    I would like to get the group name of the current user logged programmatically in a VI. I tried with the VI Server >> Application >> Security properties and methods and also with the properties and methods of the NI Security Class but it seems to be not so simple as I believed at start.
    I do not find any informations or KB on this (all the documents I found deal with LV DSC or TestStand).
     The final goal is to be able to manage a list of user for my application. Each user is a member of a group ("Administrator", "Operator", "Maintenance") and depending on the group, the user can or cannot access to some parts of the application.
    Thanks for your help.
    Matthieu
    Eurilogic

    Re,
    Here is a screenshot of this functions...
    If you really own LV DSC 8.2 the best thing to do is to reinstall it.
    Regards, 
    Message Edité par Richard K. le 04-02-2007 04:00 AM
    Richard Keromen
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Découvrez, en vidéo, les innovations technologiques réalisées en éco-conception
    Attachments:
    security.jpg ‏3841 KB

  • I created a Group and put in all names and email addresses but cannot get the group to appear in an outgoing email message.  What am I doing wrong?

    I created a Group and put in all names and email addresses but cannot get the group to appear in an outgoing email message.  What am I doing wrong?

    This may help.
    Can't connect to the iTunes Store
    What happens whenyou try to connect? Error messages?

  • Problem with getting the Grouping Separator based on Current Locale

    Hi
    I have created a java swing application. In which I try to get the grouping separator based on System language and location(Control panel).
    But it always take comma as GroupingSeparator.
    I set the region and language to South Africa. Now It should take blank space as a GroupingSeparator but it takes comma.Here is my code:
    private char mcharDecimalSeparator;
    private char mcharGroupingSeparator;
    DecimalFormatSymbols objDecimalFormat;
    mcharDecimalSeparator = objDecimalFormat.getDecimalSeparator();
    mcharGroupingSeparator = objDecimalFormat.getGroupingSeparator();Any help will be appreciated '
    Thanks
    Sonal

    From what I see here I'd say you'd get an NPE at line 4...
    The point is: why do you care?
    You should leave parsing and formatting to localeaware library classes like NumberFormat.
    bye
    TPD

  • How to get the groups info for user

    Hi guys i am new to ALUI..
    i am trying to do some enhancement.
    i want to know how to get the information of the users group and the group details using the IDK API?
    Can sombody share some code?

    Hello,
    You are welcome. Here is one way of get what you want:
    1) get all groups id's
    IPortletContext - >IRemoteSession -> IUserManager - > getCurrentUserGroups() -> int []
    2) get details about group
    IRemoteSession.getObjectManager(ObjectClass.UserGroup ) ->
    cycle over int []: {
    IObjectManager -> querySingleObject(comminity id) -> IObjectQueryRow -> getName()
    Because you are going to use PRC and make SOAP calls to portal don't forget setup WS to pass token to portlet (check WS settings)
    Edited by Bryazgin at 05/29/2008 7:48 PM

  • How to get the groups a computer is member of in AD with Quest Powershell?

    Hi all
    I would need a script in Quest PowerShell that gathers the groups that multiple computers are member of in Active Directory. I have this script, but what it does is to get USERNAMES from a .txt file and then display the groups
    each user is member of in AD. I couldn't modified it so instead of USERNAMES in the txt file I can put computers name, here's the code:
    $out = @()
    Get-Content M:\Tools\Reportes_Power_Shell\Contenedor_Power_Shell\Users.txt | ForEach {
    $date = (Get-Date).ToString()
    $username = $_
    $displayName = (Get-QADUser $username -Properties DisplayName).DisplayName
    $groups = Get-QADMemberOf $username | Sort-Object Name
    ForEach ( $group in $groups ) {
    $obj = New-Object -TypeName PSObject
    $obj | Add-Member -MemberType NoteProperty -Name Date -Value $date
    $obj | Add-Member -MemberType NoteProperty -Name UserName -Value $username
    $obj | Add-Member -MemberType NoteProperty -Name DisplayName -Value $displayName
    $obj | Add-Member -MemberType NoteProperty -Name GroupName -Value $group.name
    $out += $obj
    $out | Export-CSV M:\Tools\Reportes_Power_Shell\Reportes_de_Power_Shell_y_AD_Info\Users_Memberships.csv
    Thanks!

    I did it but didn't work out, I get this error:
    Get-QADMemberOf : Ambiguous identity: <NAME OF THE COMPUTER>.
    At line:5 char:30
    +     $groups = Get-QADMemberOf <<<<  $username | Sort-Object Name
        + CategoryInfo          : NotSpecified: (:) [Get-QADMemberOf], IdentityException
        + FullyQualifiedErrorId : Quest.ActiveRoles.ArsPowerShellSnapIn.BusinessLogic.IdentityException,Quest.ActiveRoles.
       ArsPowerShellSnapIn.Powershell.Cmdlets.GetMemberOfCmdlet
    I can't help with Quest, but here's an example using the AD module:
    Get-Content .\computerList.txt | ForEach {
    $computerName = $_
    $props = @{
    ComputerName = $computerName
    Groups = ''
    try {
    $details = Get-ADComputer $computerName -Properties memberOf -ErrorAction Stop
    $props.Groups = (($details.memberOf | ForEach { (Get-ADGroup $_).Name }) | Sort) -join ','
    } catch {
    $props.Groups = 'ERROR'
    New-Object PsObject -Property $props
    } | Select ComputerName,Groups | Export-Csv .\GroupList.csv -NoTypeInformation
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • How do I get the groups in my address book to my contact lists in Mail

    The groups in my address book are displayed in my contacts list in Mail

    Hi. I honestly am not sure how I transferred it (I am dealing with several issues in getting the new iMac set up right now) . . . I think I exported from one and imported to the other. Maybe that is why the notes did not come over even though the contacts did. But I tried your method and it seemed to work so thatnk you very much!

  • How can i get the elapsedtime of query some record?

    i write a program with dbxml,if i want to know a query uses how much time,what should i do?
    thanks for help~

    Hi Turingcat,
    Note that you can use the "time" command of the Berkeley DB XML shell to see how much time a command takes to execute.
    But you said you would do this programmatically. So, you can take a look at how the "time" shell command is implemented and do something similar within your program. The "Timer.hpp" and "Timer.cpp" files are found under "DBXML_HOME\dbxml\src\common>.
    You could use the time/date related methods specific to C++ or Java (get the time before starting the query, execute the query, then get the time at which the query ended, and calculate the time difference between those moments).
    Regards,
    Andrei

  • How to get the groups associated to a CQ5 user account ?

    Hello,
    I'm looking for a sling endpoints to get all groups a CQ5 user belongs to.
    I first checked into crx but it seems that the groups are not stored in the users nodes. So I've no idea where I should looking at...
    Regards,

    The Sling Jackrabbit UserManager (http://sling.apache.org/site/managing-users-and-groups-jackrabbitusermanager.html) supports this feature. It is not included OOTB in CRX or CQ, but can be added by installing the bundle. See http://forums.adobe.com/thread/922880 for a discussion about installing this bundle.

  • PORTAL.WWCTX_API.get_user  how can i get the group?

    I'm using Oracle AP 10g
    I know the PORTAL.WWCTX_API.get_user will give you the user id , but anyone knows which one do i need to use to come out with the group name .
    P.S : the group name contains a list of certain employees
    also where can i get a list of all the API's that i can use
    Thank you
    Nedal Seyam

    Nedal Seyam wrote:
    I'm using Oracle AP 10g
    I know the PORTAL.WWCTX_API.get_user will give you the user id , but anyone knows which one do i need to use to come out with the group name .
    P.S : the group name contains a list of certain employees
    also where can i get a list of all the API's that i can useI dont know what is Oracle AP 10g.
    However, you are probably looking for the default group name for a given user. Please see wwsec_api.get_defaultgroup.
    look into wwsec_api.get_list_members for a list of members in a group.
    The links to APIs that Opportalist presented should lead you to the descriptions of both functions.
    hope that helps!
    AMN

  • How to get the non technical query name from table?

    Hello,
    The table RSZCOMPDIR gives me the list of queries. The field COMPID contains the technical query name.
    But how can I get the non technical name of a query? Which table holds this information?
    Thanks and Regards,
    Sheetal

    Hi Sheetal,
    You can get this info from RSZELTTXT.
    Hope this helps...

  • How to get the group key, which an approval task assign to

    Hi,
    When a user is assign to OIM Group (i.e. from User Detail >> Group Membership form), I will call an approval process (using Access Policy).
    In that approval process, I have defined two tasks.
    1) Assign Approval to Group -> NOT conditional
    2) Remove OIM Group From User -> conditional
    So, from the 1) task, I will assign this approval to a OIM Group.
    If the user click "Approva", a provisioning process will be fired.
    If the user click "Deny" (Reject), 2) task will be run.
    What I want is this.
    From this 2) task, I need to get the "OIM Approval group" key or name (which this approval is assigned to)......
    Note: I need to get this group info in the "Approval Process Task" -> "Integration" -> "Map"
    Regards,
    Chaturanga

    Hi,
    Yes. I have done that.
    Now what I want is this. If the approver "Deny" (Reject) the approval task, I will call another task in the approval process. From that task, I need to run a code, which remove the user from OIM Group.
    So, to do it, I have written a java code and created a adapter. So, as a input parameter for that code, I need to give the approval group name(i.e. the OIM group, above approval task is assign to).
    How can I get the OIM approval group, which the person who Deny the approval belongs to, from this new approval process task???
    Regards,
    Chaturanga

  • How to get the iPhone 4 super fast!!

    I was going to get mine launch day but i failed to pre-order so i just waited until June 29th ( When at&t started to sell it ) I ordered mine about 5 am on Tuesday and it said ships in 7-10 days. The next day I took my dog outside and long behold the iPhone 4 was on my porch.... I got mine in 1 day through at&t.. i would recommend getting it through them instead of through apple.. Unless ur that much of a "FanBoy" that you have the overwelming need to get the piece of crap phone from apple.

    Press the Home Button 3 Times... Then go to  Settings > General > Accessibility > Voice Over > Off
    iPhone: Configuring accessibility features (including VoiceOver and Zoom)

  • How to get the group totals in report

    HI,
    Iam generating a report to display Storage Location, and Unit of Measures and Material group and also group totals.
    how to display the group totals on the report.
    thank q
    rushi.

    Hi,
    This following report clearly explains how to display the subtotal and grand total of
    the particular field in alv.
    REPORT  YMS_ALVSUBTOTAL.
    *REPORT z_alv_sub_totals .
    TYPE-POOLS: slis.
    DATA: BEGIN OF it_output OCCURS 0,
              var1(8) TYPE n,
              var2(10),
              var3 TYPE I,
          END OF it_output.
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
           t_fieldcat TYPE slis_fieldcat_alv,
          it_sort TYPE slis_t_sortinfo_alv,
          t_sort TYPE slis_sortinfo_alv,
          v_repid LIKE sy-repid.
    INITIALIZATION.
      v_repid = sy-repid.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM sort_fields.
      PERFORM fill_fieldcat.
      PERFORM list_display.
    *&      Form  GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM get_data.
      it_output-var1 = 1000.
      it_output-var2 = 'anupama'.
      it_output-var3 = '10000'.
    it_output-key = 'X'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 1000.
      it_output-var2 = 'siddhu'.
      it_output-var3 = '20000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 1000.
      it_output-var2 = 'chinni'.
      it_output-var3 = '100000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 2000.
      it_output-var2 = 'chicchu'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 2000.
      it_output-var2 = 'candy'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 1000.
      it_output-var2 = 'anupama'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 4000.
      it_output-var2 = 'anupama'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
    ENDFORM.                    " GET_DATA
    *&      Form  fill_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM fill_fieldcat.
      PERFORM fill_fields USING: 'IT_OUTPUT' 'VAR1' 'Variable 1' ' ',
                                 'IT_OUTPUT' 'VAR2' 'Variable 2' ' ',
                                 'IT_OUTPUT' 'VAR3' 'Variable 3' 'X'.
    ENDFORM.                    " fill_fieldcat
    *&      Form  fill_fields
          text
         -->P_0146   text
         -->P_0147   text
         -->P_0148   text
         -->P_0149   text
    FORM fill_fields USING    value(tabname) TYPE slis_tabname
                              value(fieldname) TYPE slis_fieldname
                              value(seltext_m) LIKE dd03p-scrtext_m
                              value(do_sum) TYPE c.
      t_fieldcat-tabname = tabname.
      t_fieldcat-fieldname = fieldname.
      t_fieldcat-seltext_m  = seltext_m.
      IF do_sum = 'X'.
        t_fieldcat-datatype = 'CURR'.
      ENDIF.
      t_fieldcat-do_sum = do_sum.
      APPEND t_fieldcat TO it_fieldcat.
      CLEAR t_fieldcat.
    ENDFORM.                    " fill_fields
    *&      Form  list_display
          text
    -->  p1        text
    <--  p2        text
    FORM list_display.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         i_callback_program             = v_repid
         it_fieldcat                    = it_fieldcat
         it_sort                        = it_sort[]
       TABLES
          t_outtab                       = it_output
       EXCEPTIONS
         program_error                  = 1
         OTHERS                         = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " list_display
    *&      Form  sort_fields
          text
    -->  p1        text
    <--  p2        text
    FORM sort_fields.
      t_sort-fieldname = 'VAR1'.
      t_sort-tabname = 'IT_OUTPUT'.
      t_sort-spos = 1.
      t_sort-up = 'X'.
      t_sort-subtot = 'X'.
      APPEND t_sort TO it_sort.
      CLEAR t_sort.
      t_sort-fieldname = 'VAR3'.
      t_sort-tabname = 'IT_OUTPUT'.
      t_sort-spos = 2.
      t_sort-up = 'X'.
      APPEND t_sort TO it_sort.
      CLEAR t_sort.
    ENDFORM.                    " sort_fields
    Thanks,
    Sankar M

Maybe you are looking for

  • Laptop display Broken replacemen​t

    Hello All, I am using HPPavillion G6-1b79us Laptop.My screen is damaged at the corner.I brought it in US.Currently i am in germany for my studies.please let me know prices for the same and where to get in Germany

  • Connect to VGA-flat screen monitor ?

    my ibook G3 (dual USB) has a RGB display, out , I m not sure which adapter to get to have to connect to a standard dell VGA-flat screen monitor ? second question: how do you increase screen brightness? it is so dim,have to squint to see screen

  • Workflow Subscription Time out

    Hi, I did a simple subscription workflow on manual activity. When status change from Pending to In Progress, I set a field. The workflow works fine almost all day. However, I had seen many time out exceptions on event viewer e some other systems work

  • Cost Allocation Query

    I want to allocate cost in top down approach via SQL i.e user input should be 1.Expense amount for node 1 (which need to be allocate in lower nodes) 2. Percentage of allocation for each nodes Node 1 Node 2 node3 node4 node 5 node 6 node 7 if node 1 g

  • Live audio mixing/enhancements

    Right now, I can now listen to my line in/mic via the Line in app but I want to be able to live enhance the audio stream and a hiss filter would be nice too. Theres lots of plugin apps that do this kind of thing, but I'm looking for something that is