Group by in update and index

Hi All,
I was trying to run an update SQL statement as follows:
update tableA a set a.foo =
(select b.foo
from another_schema.tableB b
where b.bar = a.bar
group by b.bar,b.foo);
I have an index in tableA on the bar column (it is a number(10,0) type column), also in tableB there
are no more then 3 rows per unique bar column value. The update was taking more then 10 minutes (tableA has around 208K rows and tableB around 212K rows). I went into Enterprise Manager and looked at the performance analysis and run the Oracle advisor that recommended to create an index on tableB containing two segments bar,foo. I added this index and the update took 13 seconds. Why did this index help if oracle does the join first it only has to group up to 3 rows at a time also notice the there are only around 1000 joined rows where such case happens. Can someone explain this ?
thanks
Tal

Why do you use "group by" when you don't use an aggregate-function ?

Similar Messages

  • Inconsistent updation of sales group in Sales order and invoice

    Dear all,
        The sales office and sales group is properly updated in the specific sales area master data of the customer but not flowing in the sales order and subsquently in the invoice. For some documents it gets updated and for others the filed is blank.
    I have checked the master data and also the documents and found no errors. Please help in how to solve the issue. I need 100% updation of sales office and sales group in the order and invoice. Please advice how to solve the issue.
    Regards,
    Parthasarathy.R

    Dear Parthasarathy,
    Request You to post the same query in SD Forum
    You will get quick response there
    this is PP forum
    Hope You Understand
    Regards
    kumar

  • BB Z10 BBM Group updates and notifications not showing up in Hub?

    BBM Group updates and notifications not showing up in Hub? The notifications are turned ON in Group settings. And all BBM notifications are enable in the Hub, still nothing shows up. Picture comments, addition, status updates simply dont show up. My device is on 10.0.10.58. 
    Any workaround? 

    vijaymalhan, in your Hub settings > Hub Management, do you have BBM set to ON?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • DML,Transactions and index updates

    Hi,
    Its known adding indexes slows down the DML on the table. i.e. every time table data changes, the index has to be recalculated. What i am trying to understand is whether the index is recalculated as soon as oracle sees the change?
    To elaborate, lets say i have a table abc with 4 columns, column1, column2, column3 and column4. I have two indexes; one unique on column1 and another non unique index on column2.
    So when i am trying to update column4, which is not indexed, will there be any transactional data generated for this operation? Will it be generated if i am updating column2 ( with non-unique index) ?
    What i am interested to know is how transactions boundaries impact the calculation of index. Will oracle always generate transactional entries and recalculate affected indexes even before the transaction is committed and the data change is made permanent ?

    user9356129 wrote:
    Hi,
    Its known adding indexes slows down the DML on the table. i.e. every time table data changes, the index has to be recalculated. Yes, but only when involved (i.e. indexed) columns are changed.
    And, indexes are not "recalculated". Assuming the index is of type B-tree (by farout the most commonly used type), then the "B-tree is maintained". How that's done can be found in elementary computer science materials which you can probably find using Google.
    What i am trying to understand is whether the index is recalculated as soon as oracle sees the change?
    To elaborate, lets say i have a table abc with 4 columns, column1, column2, column3 and column4. I have two indexes; one unique on column1 and another non unique index on column2.
    So when i am trying to update column4, which is not indexed, will there be any transactional data generated for this operation?You'll need to clarify what you mean by "transactional data". But in this case the block(s) that hold(s) the table row(s) of which you have updated column4, will be changed, in memory, to reflect your update. And as column4 is not involved in any index, no index blocks will be changed.
    Will it be generated if i am updating column2 ( with non-unique index) ?In this case not only table-blocks will be changed to reflect your update, but also index-blocks (that hold B-tree information) will be changed (in memory).
    >
    What i am interested to know is how transactions boundaries impact the calculation of index. Will oracle always generate transactional entries and recalculate affected indexes even before the transaction is committed and the data change is made permanent ?Yes (to the part following 'and' of the latter sentence. I don't know what you mean by "transactional entries").
    Toon

  • An internal error has occurred:  ?:0: attempt to index a nil value after installing LR5.5 update and trying to play or preview slideshow

    An internal error has occurred:  ?:0: attempt to index a nil value after installing LR5.5 update and trying to play or preview slideshow. Never had this problem before. I went to forums and see that this is a problem with previous versions and this only occurred after installing lastest update.

    Jeannine,
         If you follow the advice of the previous poster Julie Kmoch and then gradualy add presets back in one at a time you might be able to find the one that is causing the issue. I may be guessing, but I believe the issue has something to do with either an incompatible Preset setting (eg a older preset in newer version of LR) or a corrupt Preset.
    Say you bought LR2 and imported a bunch of Presets from the internet, cuz 'Hey these effects are cool and I don't have to recreate the wheel', and then you upgraded to LR3 (not a clean install) and now one of the Presets that calls a certain slider setting or value that is different in LR3 doesn't work anymore. This might be why it throws the error, but again I am just speculating.
    Location of LR Preset folder in Windows Vista/ Windows 7
    C:/Users/<YourUserName>/AppData/Roaming/Adobe/Lightroom/Develop Presets
    If you do not see the folder AppData, you may need to change the settings in Windows Explorer to 'Show Hidden Files and Folders'. To do that in Windows Vista/ Windows 7, open a Windows Explorer window, Click on Organize, then Foler and Search Options. Then click on the View tab and select the option button next to Show hidden files, folders and drives.
    Hope this helps a bit,
    Glenn

  • Creating, updating and laying out an index

    Hello everybody,
    I have to create and lay out an index of several files in a book.
    What do I have to do?
    How can I update the index? (I use Framemaker 8)
    Thank you for your help.
    Bye
    Vreni

    Reading the Help file or Manual is a good suggestion, but in very simple form, this is what you do.
    Place Index marker in the text at the desired locations (Special>Markers set to index and enter text).
    After you have your marker in place, add a Standard Index (Add>Standard Index and select the index marker type).
    Once the Index is part of the book, it updates with the book, same as your TOC.

  • Is there any APIs to update and remove Apex group?

    There's Apex.Util.create_group. But I could not find any APIs to update and remove Apex group.

    There's Apex.Util.create_group.It's apex_util.create_user_group.
    There are no APIs to delete or update a group.
    Scott

  • Update and replace a index via script

    Hi everybody,
    I created a book with 30 chapters, each of them having a local (or chapter) index at the last pages.
    I would like to update these indexes and replace them with the new, updated ones (just as the command "Generate Index..."
    do with the option "Replace the Existing Index" on).
    I'm able to generate the index via script, but I don't know how to make it replace the existing one.
    I dont want the Place the Index, as its precise location is variable and it can run for more than one page and frame.
    So even I could get the coordinates of an existing index to place the new one,
    I would have the re-layout them, what would defeat my automation goal altogether.
    I just want to replace the existing indexes via script, as I can do using the interface.
    Is it possible?
    Thank you all in advance.
    Edson Furman
    [email protected]

    I'd like to re-ask the same question. I am able to generate an index for the first time, but am at a loss how to do the scripting equivalent of pressing the "OK" button in the following dialog:
    I'm guessing I should proceed something like this:
    myDocument.indexGenerationOptions.replaceExistingIndex = true;
    myIndex = myDocument.indexes[0].update();
    myIndex.generate( ? DO I REALLY HAVE TO SPECIFY A PAGE ETC. HERE ? );

  • 'unable to connect' and  index.php

    Hi. 
    I am developing a Web Site and index.php is my point of entry.
    Document Root     Library/WebServer/Documents
    so my path is:       Library/WebServer/Documents/dwwdSite
    httpd.conf file is modified to add index.php  and have it listed first.
    <IfModule dir_module>
    DirectoryIndex   index.php   index.html
    <IfModule>
    Troubleshooting:
    I was using Netbeans IDE and when I ran index.php it opened in the browser.
    When I launched 'any' of my index.php files from Netbeans IDE, they opened correctly in the brower
    I am NOW using DreamweaverCC and when I run the index.php Error Message ' Unable to Connect'.
    For the last 2 days I have been working on this and I am completely stuck.
    This morning I thought of another way to test the 'unable to connect' error.
    I decided to copy this same file into Netbeans IDE and I NOW get the same Error Message ' Unable to Connect'
    when running index.php from Netbeans.
    Somehow, my settings are not correctly configured anymore.
    Here are my screenshots from Dreamweaver > manage sites.
    I believe that this is a rather simple fix that I am somehow not seeing.
    Maybe some can spot some mistake.
    I appreciate your help and explanation.

    Hi Sudarshan.
    You have been very kind and very clear in your explanation.
    One of the very best that I have ever communicated with on this forum !
    I have checked many, many things.
    I wanted to make certain that I killed apache and restarted it.
    I do not think it is RUNNING at all.
    1.
    myNameMacBookPro:~ myName$ pwd
    /Users/myName
    2.
    myNameMacBookPro:~ myName$ ps -ax | grep http
    1892 ttys000    0:00.00 grep http
    3.
    myNameMacBookPro:  myName$ hostname
    local
    4.
    myNameMacBookPro:etc myName$ cd apache2
    reginaMacBookPro:apache2 myName$ ls
    extra            httpd.conf.pre-update    mime.types        other
    httpd.conf        magic            original        users
    5.
    myNameMacBookPro:apache2 myName$ sudo nano httpd.conf
    myNameMacBookPro:apache2 myName$ sudo apachectl -k restart
    Syntax error on line 1 of /private/etc/apache2/users/myNameBU.conf:
    Invalid command '{\\rtf1\\ansi\\ansicpg1252\\cocoartf1187\\cocoasubrtf370', perhaps misspelled or defined by a module not included in the server configuration
    httpd not running, trying to start
    myNameMacBookPro:apache2 myName$
    6.
    The above code may be a hint at part of the problem.
    I created myNameBU.conf   as a backup when I was editing the file.
    QUESTION.  Why is /private/etc/apache2/users/myNameBU.conf:
    being referenced above ?
    7.
    I scanned my ports from preferences and found these two which I believe are what you stated they should be.
    port 80 is html
    port 8080 is html-alt
    8.
    I have modified this line and tried it both ways restarting apachectl each time.
    AllowOverride None
    AllowOverride All
    9.
    And here is a part of my httpd.conf.
    excerpts.
    httpd.conf
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    User _www
    Group _www
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    DocumentRoot "/Library/WebServer/Documents"
    # Each directory to which Apache has access can be configured with respect
    # to which services and features are allowed and/or disabled in that
    # directory (and its subdirectories).
    # First, we configure the "default" to be a very restrictive set of
    # features.
    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
    </Directory>
    10.
    I took a look at this too.
    usr/bin
    #path to httpd binary including options if necessary
    HTTPD = "usr/sgin/httpd"
    # pick up any environmental variables if test - f /usr/sbin/envvars; then ./usr/sbin/envvars
    fi
    STATUSURL = "http://localhost:80/server-status
    11.
    Just a reminder.
    I started writing .php scripts with Netbeans IDE.
    The programs ran:  I got output in the brower.  Things worked just fine !
    I started writing .php scripts with DreamweaverCC.
    The programs NEVER ran.
    I have always gotten 'Unable to Connect"
    Firefox/Safari can't establish a connection to the server at localhost.'
    12.
    QUESTION.
    At one point I was on the phone with a member of the Adobe Technical Support Team.
    They connect to my desktop (only) remotely.  I am very cautious about this.
    Could something have been inadvertently changed when they did this ?
    They do need to connect through a PORT - yes ?
    This is very frustrating and I am loosing days of work.
    I want to get back to Web Development
    I love Adobe products but this should not be such a huge obstacle.
    When I called Technical support (after much troubleshooting individually and on this forum)
    the fellow told me that the ONLY support FTP - not LOCALHOST.
    This makes no sense.  People develop 'locally' then put it ftp it in the production stage.
    Again, I appreciate your assistance.

  • DB02 view is empty on Table and Index analyses  DB2 9.7 after system copy

    Dear All,
                 I did the Quality refresh by System copy export/import method. ECC6 on HP-UX DB29.7.
    After Import Runstats status n Db02 for Table and Index analysis was empty and all value showing '-1'. Eventhough
    a) all standard backgrnd job scheduled in sm36
    b) Automatic runstats are enabled in db2 parameters
    c) Reorgchk all scheduled periodically from db13 and already ran twice.
    4) 'reorgchk update statistics on table all' was also ran on db2 level.
    but Run stats staus in db02 was not getting updated. Its empty.
    Please suggest.
    Regards
    Vinay

    Hi Deepak,
    Yes, that is possible (but only offline backup). But for the new features like reclaimable tablespace (to lower the high watermark)
    it's better to export/import with systemcopy.
    Also with systemcopy you can use index compression.
    After backup and restore you can have also reclaimable tablespace, but you have to create new tablespaces
    and then work with db6conv and online table move to move one tablespace online to the new one.
    Best regards,
    Joachim

  • Do I need Logic Pro 8.0.1 Update, and if so, how do I get it now?

    Do I need Logic Pro 8.0.1 Update, and if so, how do I get it now?
    Tuesday, 2008-07-29
    Due to prolonged illness, I purchased the Logic Studio Upgrade version (I already had Logic Pro 7.2.3, with dongle) only last week. Logic Studio Upgrade version initially installs Logic Pro version 8.0.0. I then dutifully set out to download both the Logic Pro 8.0.1 Update and the Logic Pro 8.0.2 Update.
    As of this week, all attempts and maneuvers to simply get the Logic Pro 8.0.1 Update have failed. I cannot even find it, let alone download it!
    Yes, I've tried the relabeling juggling act to fool Software Update into eventually listing and providing both the Logic Pro 8.0.1 Update and the Logic Pro 8.0.2 Update—but no luck, not any longer. These moves may have worked up until relatively recently, but they do not work now, at least as of this week.
    All searching of Apple's site(s) and Support pages results in nada—Apple itself no longer lists any such file/dmg/download/update anywhere! All previous links are either dead or just dump one back on to the Logic Pro 8.0.2 Update page.
    (In my many searches, I noted what seemed to me to be a majority of opinion that the Logic Pro 8.0.1 Update was a dog, especially in Mac OS X Leopard 10.5.2 or 10.5.3. Many users reported crashes, panics, and.or freezes. Is this why Apple has pulled the update and rendered it extinct?)
    I Googled, I Asked Why, I Cuiled—but no Logic Pro 8.0.1 Update, except as that which lurked in the murky warez waters. Still, frustrated as I was, I did even try all such I could find . . . but no third party-hosted update worked at all.
    I am concerned because in all my previous experience with Apple and its applications, ample information is made readily available about the contents of any update and an explanation of its relationship to previous updates. By this latter I mean: Apple indicates that update "x" incorporates the previous updates "u" and "v"; therefore one can proceed safely to install update "x" even if one missed updates "u" and "v" or for whatever reason did not install them.
    So . . . do I need Logic Pro 8.0.1 Update, if I am then going to further update with the Logic Pro 8.0.2 Update? Does Logic Pro 8.0.2 Update incorporate the changes made in Logic Pro 8.0.1 Update? Will I be missing (critically?) something(s) in Logic Pro 8.0.1 Update if I in fact do not ever get it or install it? And how would I know? Apple has not only removed the update and all traces of it, but Apple has also removed all information about Logic Pro 8.0.1 Update—it is now literally as if it never existed.
    So what's a po' boy to do? Logic Pro 8.0.1 Update cannot now be found on VersionTracker or MacUpdate or anywhere else. To date, no user group or organization or educational institution or program or audio-related company posted it or archived it.
    Where/how can I get a copy of the Logic Pro 8.0.1 Update?
    If I can't, what do I do?
    If I can't, what do I miss?
    And where is Apple's support for Logic Studio/Logic Pro in all of this?
    Earnestly hoping,
    j.

    Rodger,
    Thank you for your gracious welcome . . .
    and thank you for your swift response . . .
    and thank you for your information (and encouragement!).
    Yes, I read that too, but searched in vain for the specifity of, say, your direction:
    "Go ahead and update to 8.0.2, as it contains the 8.0.1 update."
    So I shall!
    Again, many thanks.

  • Planner group is not updated in service notification using BAPI

    Hi,
    Planner group is not updated in service notification using BAPI BAPI_ALM_ORDER_MAINTAIN.
    I have written the below code, but planner group is not updated in the service notification.
    Please advice which parameters do i need to pass to update planner group in the service notification.
              wa_methods-refnumber      = '000001'.
              wa_methods-objecttype     = 'PARTNER'.
              wa_methods-method         = 'CREATE'.
              wa_methods-objectkey      = wa_subscr1-aufnr.
              APPEND wa_methods TO i_methods.
              wa_methods-refnumber      = '000002'.
              wa_methods-objecttype     = 'HEADER'.
              wa_methods-method         = 'CREATE'.
              wa_methods-objectkey      = wa_subscr1-aufnr.
              APPEND wa_methods TO i_methods.
              wa_methods-refnumber      = '000000'.
              wa_methods-objecttype     = ' '.
              wa_methods-method         = 'SAVE'.
              APPEND wa_methods TO i_methods.
              REFRESH i_partner.
              CLEAR wa_partner.
              wa_partner-orderid        = wa_subscr1-aufnr.
              wa_partner-partn_role     = 'VW'.
              wa_partner-partn_role_old = ''.
              wa_partner-partner        = wa_subscr1-parnr.
              wa_partner-partner_old    = ''.
              APPEND wa_partner TO i_partner.
              REFRESH i_planrgrp.
              CLEAR wa_planrgrp.
              wa_planrgrp-orderid        = wa_subscr1-aufnr.
              wa_planrgrp-plangroup      = wa_subscr1-ingpr.
              APPEND wa_planrgrp TO i_planrgrp.
              REFRESH i_planrgrp_up.
              CLEAR wa_planrgrp_up.
              wa_planrgrp_up-orderid     = wa_subscr1-aufnr.
              wa_planrgrp_up-plangroup   = 'X'.
              APPEND wa_planrgrp_up TO i_planrgrp_up.
    *----Change order details with Technician name
              CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
                TABLES
                  it_methods   = i_methods
                  it_header    = i_planrgrp
                it_header_up = i_planrgrp_up
                  it_partner   = i_partner
                  return       = i_return.
    Thanks & regards,
    Krishna

    Try this way
    CALL FUNCTION 'BAPI_SERVNOT_CREATE'
    EXPORTING
    * EXTERNAL_NUMBER =
    notif_type = 'S3'
    notifheader = ls_notif_h
    * TASK_DETERMINATION = ' '
    * SENDER =
    * ORDERID =
    IMPORTING
    NOTIFHEADER_EXPORT = ls_notif_e
    TABLES
    * NOTITEM =
    * NOTIFCAUS =
    * NOTIFACTV =
    * NOTIFTASK =
    * NOTIFPARTNR =
    * LONGTEXTS =
    * KEY_RELATIONSHIPS =
    return = lt_return
    * IF lt_return IS INITIAL.                                               " <<< Comment this lie
    read table  lt_return into ls_return with key type = 'E'. " << Change
    if sy-subrc ne 0.                                                             " << Change
    COMMIT WORK AND WAIT.
    write: / ls_notif_e-NOTIF_NO.
    ELSE.
    LOOP AT lt_return INTO ls_return.
    WRITE:/ 'errors'.
    * ls_return.
    ENDLOOP.
    endif.

  • Software Updates and System Restarts

    Hi Folks,
    I've read many articles posted here on system restarts, but I can't find one that addresses my issue. So here it is...
    Regarding the deployment of Software Update groups for Microsoft Updates. I have created the exact same deployment for each deployment, with the following relevant configuration;
    Deployment Settings
    -Type of Deployment: Required
    Scheduling
    -Software Available Time: ASAP
    -Installation Deadline: Friday morning at 3AM
    User Experience
    -User Notifications: Display in Software Center and Show all notifications
    -Deadline Behavior: Software updates installation [checked], System Restart [unchecked]
    -Device Restart behavior (supress system restarts): Servers [checked]; Workstations [unchecked]
    My goal is to advertise the updates for several days initially, allowing my clients to install updates on their workstations at their leisure, but then come Friday at 3am, they will be forced to install. However some clients shut their workstations
    down overnight, and some may take Friday off, so Monday morning I would like for the updates to install when they turn their workstations back on at say 9am, but postpone the restart until their maintenance window.
    What am I doing wrong?
    Many Thanks,
    Bill Hearn

    System restart checkbox is used to control what happens outside of MW.
    If you have no MW and did not select to restart outside of MW then systems will reboot after installation completes (unless user overrides it and does it sooner). Keep in mind that the 90 minute and 15 minute restart countdowns will be displayed if user is
    logged in (unless you have changed the times) if user did not interact with any notifications to select other options like install and reboot ahead of time.
    If you have MW and did not select to restart outside of MW, then PC will not reboot until MW starts (unless user overrides it, of course).
    If you select to reboot outside of MW checkbox then PC will reboot after installation ends, no matter if MW is set or not.

  • I keep getting a message saying my protection engine has corrupted and that i should try re-installing live update. What is live update and how do i run it? - be grateful for any help

    Hi,
    I turn my i mac on and when it has loaded onto the home screen I get a message popping up saying my protection engine has corrupted and that i should try reinstalling live update and my computer will no longer be protected until I do so. Would anyone be able to tell me what live update is and how I would run/reinstall it? - be grateful for any help!!!
    Thankyou

    It would be a great idea to uninstall Norton - you don't need it and it has a pretty poor reputation for mucking up otherwise healthy Macs.
    Have a look at this User Tip from klaus1: https://discussions.apple.com/docs/DOC-2435
    To uninstall Norton:
    https://support.norton.com/sp/en/us/home/current/solutions/kb20080427024142EN_En dUserProfile_en_us
    Edit: To see whether you actually have Norton installed launch Activity Monitor in the Utilities folder. If it's installed you'll likely see some Norton entries there.
    Also, in System Preferences>Users & Groups or Accounts, depending on OS)>Login Items, it might be listed.

  • Member of Target Group: Contact record updated

    We are creating a target group for a Campaign and several of the contacts had to be updated (changed Companies "Account" for instance) and the new data for that contact is not reflected on Members list, shows old data (old Company "Account").
    Without removing the member and re-adding, are we missing something or once they are added it holds the old data?
    We can find this down the road to be cumbersome when copying target groups and/or when using the same target group for other campaigns
    if a contact record is updated and the information is not matching to the member data.
    Any insight appreciated!

    Hi Gina,
    once the members are added to a group and after if you do any changes on the master data these changes wont reflect in the group already created, you should remove and save the group after again add back this time the new changed data will be updated.
    hope this clarify your issue.
    Regards,
    Suresh

Maybe you are looking for

  • Invoice validation program error:Could not find operating unit options

    Dear Team, Once my Payables Open Interface Import program successfully completed, I am trying to running invoice validation program which is ended with warning as bellow, (Bulk CALCULATE) START SYSDATE 17-DEC-2012 04:04:19 Could not find operating un

  • [SOLVED] Failed pacman -Syu system update

    I tried update pacman -Syu and gave me this message: error: failed to init transaction (unable to lock database) if you're sure a package manager is not already running, you can remove /var/lib/pacman/db.lck so I changed db.lck to db.lck.bac and when

  • How do i get imovie on my new macbook pro

    using a new macbook pro and can't find imovie.  is it pre-installed? how do i get it?

  • New Projects - Change Settings

    I have purchased Premere Elements 9.  I always take out the sd card and insert it into the camera to download the video to  a file I created. At this point I go to edit my video and the New Project - change settings box pops up. Not sure how to set t

  • Update Oracle from 4.5 to 8i

    How can I install Oracle 8i over older one (4.5) without affecting tables and information in the previous one. note: I am working on a network database and connecting to online ones. Please, help me. Regards, Hanady