Group-By workaround for optimization

This Group By is taken much more time than expected. Recent stats shows it took nearly 14 minutes. Is there any alternative/suggestion for it?
select C.ekey,C.gid,A.ecd,B.pyear, SUM(A.rate) as sum_rate,SUM(A.hrs) AS sum_hrs, SUM(A.amt) as sum_amt
from table_a A,table_b B, table_c C, table_d D,
(SELECT fx_time_key time_key FROM dual) tk
where to_char(D.end_date,'yyyy') = B.pyear
AND C.time_key = tk.time_key
AND C.eno = A.eno
AND D.eno = A.eno
AND D.cid = A.cid
GROUP BY C.ekey,C.gid,A.ecd,B.pyear
Message was edited by:
joshuaa

SELECT STATEMENT                           Cost = 740     
  SORT GROUP BY       
    MERGE JOIN CARTESIAN       
      TABLE ACCESS BY INDEX ROWID     table_c      
        NESTED LOOPS        
          HASH JOIN        
            HASH JOIN        
              TABLE ACCESS FULL          table_b      
              TABLE ACCESS FULL      table_d
            TABLE ACCESS FULL           table_a     
          INDEX RANGE SCAN           E_INDX      
      BUFFER SORT       
        TABLE ACCESS FULL DUAL      Could u make anything out of this?

Similar Messages

  • Sp_addlinkedsrvlogin AD group limitation (workaround? anyone?)

    Hello. I have looked all over boards and can't seem to find any elegant (or even hacky) workaround for this situation, hoping some of you geniuses can help. SQL Server 2008
    R2 Enterprise.
    We have a linked server to a DB2 server. The current linked server uses an DB2 (Unix) ID/PWD (batchID/service account) to the linked server. We don't have Kerberos and the mixed bag of Windows/Unix would sort of disallow it anyway. The SQL server (while mixed
    authentication mode) uses almost exclusively Windows Authentication and we are very good about using AD groups for everything, not INDIVIDUAL windows/sql logins (as part of our corporate security).
    The data on the DB2 server will soon have masked confidential fields for individual users but not the batch IDs. To ensure that anyone connecting to our SQL server can't just pull up the the unmasked data, we thought we would create another linked server an
    limit it to a specific Windows group - lets call it 'DOMAIN\DBA', that requires unmasked data for processing. Either that or -better- put the 'DOMAIN\DBA' group to the existing linked server mapping to an "unmasked" account on the DB2 side. This
    group has sysadmin and consists of a windows service account and prod support staff who have to manually run processes). But it is IMPOSSIBLE to set Windows Group LOGIN permissions on a linked server login. The sp_addlinkedsrvlogin specifically excludes server_principals
    type 'G'. Microsoft will not say why, except because they designed this for all linked servers to also be Windows SQL server -  but there you go.
    Does anyone know a way to do this without having to add the individual users from the 'DOMAIN\DBA' group to individual logins on the server? That just seems like a maintenance nightmare. This affects about 20 SQL servers in our organization. PLEASE? Anyone?
    Shelley

    Shelly  
    Is it possible to have SSIS package , bring the data into SQL Server and play with permissions? BTW is it db2 or AS400?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Aha!  Workaround for site corruption in iWeb '06 '08 updates

    I think I have found a workaround for a problem that's been plaguing me and no doubt other people who've bought iWeb '08 and used it to update an older site from iWeb '06 (skip to bottom for solution). This is relevant even after the 2.0.1 update that Apple shipped today.
    My iWeb project contains multiple sites, which I use to group photo albums. I found repeatedly that after I updated the site, made a change, and saved the project, a lot of the bitmap image files needed for pages with photo albums or other graphical embellishments were just gone from the project. Looking into the Domain.sites package (Finder: Show Package Contents) confirmed this - all the .jpg, .png files etc. just got trashed the first time I did a save (although the pages all looked ok after the upgrade but before the save!)
    At first I thought that the last site added to my multi-site project was spared at the expense of other 'sites' visible in the sidebar. Then I realized that only pages that had been viewed in iWeb after the update were spared! Generally I would view the pages in the bottom/last site as these were the ones I was currently working on - and these were spared.
    So I did an experiment - I opened (yet another) copy of my iWeb '06 backup in iWeb '08, and after the update but before saving I clicked on every page (thereby viewing it) in the whole site - and I have around 50 pages in about ten sites. Then I made a change to a single page, and saved the project. The fact that I had viewed all the pages seemed to make the problem go away! There were no missing photos or embedded bitmaps!
    *So the short version of the problem is:* any pages that have not been viewed within iWeb after updating a Domain.sites file (what I call the project) from '06 to '08 will have all associated bitmap image files deleted.
    *The solution:* immediately after updating the site, and before making any edits or saving, you must click on the sidebar entry for every page in the whole project (to view it in the editing window). In my case this meant also clicking on every entry of a blog, to display it.
    Conclusion: there must be some book-keeping of the database that supports iWeb that is not synchronized with the persistent store on disk unless a page is actually viewed.
    Hope this works for others, and that Apple gets a proper fix out ASAP. The 2.0.1 update issued today did not fix the problem for me - only the above workaround did.
    Rick

    Hi Rick,
    Sounds like my story, too. I have had some time to experiment on two different Macs (one G4 and one MacBook Pro). After losing the formatting and photos on one Mac after upgrading, I decided that I was going to test some theories on the other Mac prior to upgrading to iWeb '08. This is what I found - and what worked:
    Test 1:
    MacBookPro on iLife '06. I upgraded to iLife '08. I opened iWeb and noted that it did not recognize my original domain: iWeb '08 asked me to locate it or create a new one. I selected "choose" and selected the domain that I had created in iWeb '06 (user/library/application support/iweb). The site opened, performed the required update and opened up. I noticed immediately that some of the photos did not appear on some of the pages. Each time iWeb '08 was closed and reopened, more photos, sometimes different photos, would disappear. All that would remain was a grey placecard with a question mark in the middle (and the warning that the links were now missing). I even went as far as putting the photos back into position, saving and closing iWeb '08. But when I opened iWeb '08 again, the photos were missing...again.
    I rebuilt the entire site.
    Test 2:
    Powerbook G4 on iLife '06. BEFORE updating to iLife '08, I used the original iWeb '06 to publish the entire site to a local folder on my HD (as a security measure). Next, I created a copy of my domain (another security measure) and moved the original domain from 'user/library/application support/iweb' to my desk top. I then proceeded to upgrade to iLife '08. After upgrading, I opened iWeb '08 and received the notification that iWeb '08 needed to either create a domain or I needed to choose a domain. Since I moved my domain out of 'library/application support/iweb', I elected to create a new domain and saved it to the same location (library/application support/iweb).
    The new domain was created, iWeb '08 opened, I selected a template, then saved it and closed the program.
    Using Finder, I examined the new domain just created by iWeb '08. Using the 'get info' command, I noticed that the new domain has the extension ".sites2." The original domain created in iWeb '06 has the extension ".sites."
    I took my original iWeb '06 domain and used the finder "get info" command to manually change the extension from ".sites" to ".sites2." I got the warning asking me if I was sure I wanted to use ".sites2," and I selected yes, use ".sites2."
    Using the (original) domain just modified in the last step, now with the extension ".sites2", I inserted it into the 'user/library/application support/iweb' folder, replacing the domain file created during the start up of iWeb '08.
    I then opened iWeb '08.
    After a brief moment, iWeb '08 opened my domain revealing all four of my original web sites, complete and intact. After iWeb '08 updated the domain, I saved it, closed iWeb '08 and reopened it a few times before I was satisfied that EVERYTHING was working fine.
    In conclusion, I found that by changing the domain (created in iWeb '06) file extension to ".sites2", I was able to use iWeb '08 to successfully open it, complete and intact.
    I hope you may still have the opportunity to try this on your Mac. I also hope that you have good results.
    Cheers, Bryan

  • Extensions like Ghostery, WOT or AdBlock stop working after two or three times. Restarting the webpage in a new tab the extensions will work again for several times and then stop again. Has anybody an explanation or a workaround for this bug in Safari 5?

    Extensions like Ghostery, WOT or AdBlock stop working after two or three times. Restarting the webpage in a new tab the extensions will work again for several times and then stop again. Has anybody an explanation or a workaround for this bug in Safari 5?

    Remove the extensions, redownload Safari, reload the extensions.
    http://www.apple.com/safari/download/
    And if you really want a better experience, use Firefox, tons more choices and possibilities there.
    Firefox's "NoScript" will block the Trojan going around on websites. Best web security you can get.
    https://addons.mozilla.org/en-US/firefox/addon/noscript/
    Ghostery, Ad Block Plus and thousands of add-ons more have originated on Firefox.

  • Workaround for JSFL shape selection bug?

    There seems to be a bug in the document selection reporting in JSFL in  CS4 (haven't tested earlier versions).  I submitted it as a bug to Adobe  but I'd really like to find a workaround for it.  I've included my bug  report below.  Has anyone else encountered this?  If so, have you  figured out a workaround?  It's pretty annoying, making the tool I'm  working on really difficult to manage.
    ******BUG******
    After performing a publish preview, fl.getDocumentDOM().selection  reports an incorrect selection of raw shapes.
    Steps to reproduce bug:
    1. Create a JSFL command with the following contents:
    doc = fl.getDocumentDOM();
    fl.trace("there are " + doc.selection.length + " items selected");
    2. Start the authoring environment fresh, with a new document.
    3. Draw several shapes on the stage, not touching each other, all in  the same frame and layer.
    4. Select one of those shapes but leave the others unselected.
    5. Run the previously created JSFL command.  It will send the following  text to the output panel, as one would expect:
    "there are 1 items selected"
    6. Do a publish preview (either Flash or HTML).
    7. When it comes up, close the preview window.
    8. Deselect all and then select one of the shapes (again, keeping the  others unselected).
    9. Run the JSFL command again.  This time, it will say that there are n  items selected (where n is the number of shapes you drew in step 3).   So if you drew three shapes, it will print out the following:
    there are 3 items selected
    Note that this result will be the same even if you go to a different  document, do a publish preview on that document, then return to the  original.  It seems that simply doing a publish preview alters Flash's  state to report the selection incorrectly.
    Results: The JSFL command reports that all the shapes are selected,  despite the fact that only one of them is.  The only way I've found to  get Flash back to its normal behavior is to restart the authoring  environment.
    Expected results: In the steps above, the JSFL command should always  print out that there is one element selected.  There's no reason that  doing a publish preview should change that.

    When selected all shapes in selection are treated as one. You can see it if you run this script with selected multiple shapes:
    fl.trace( fl.getDocumentDOM().selection[0].contours.length );
    It will output you twise bigger number then selected shapes (because each Shape has two contours - one clockwise, other counterclockwise).
    Of course this. implementation is strange for me too. Thats how i found your post

  • How can i set up a distribtuion group on mail for iPhone?

    Hello,
    I was able to set up a distribution group on my "icloud.com" account.  I used my contacts and created a group and then went to my mail and was able to send it to that group.
    My next step is to do that on my iPhone 5. 
    I see the group under the contacts in settings that i have created, however, it is not recognized on my phone as a distribution group.
    Thanks for any help,
    Kyle

    You can't. "All contacts" means just what it says.

  • ITunes Match/iOS 7 iPhone music workaround for excessive data usage?

    I just got an email from AT&T indicating I had exceeded 150GB of home data usage this month. It was because I used my home wifi to download 5000 songs to my iPhone from iTunes Match to fill it.
    I'm frustrated, since it used to be so easy to make iTunes Match work for a large amount of music: In iOS 6 what I used to do (if I had to restore iPhone and set up as new phone): Plug iPhone 5 into computer, set up phone as new, check "manually manage music and videos" and "prefer 128kbps" and make sure iTunes Match was off in phone settings. Then drag & drop 5000 songs (about 40GB) from iTunes into phone. Once that was completed (a couple of hours), I could disconnect the iPhone from my Mac, turn iTunes Match to "on" in phone settings, and I'd get a message on the phone saying "All music on this device will be replaced" which is fine, but other than taking a while to update the remainder of my iCloud stored music, it used very little data.
    Fast-forward to this past weekend. After updating to iOS 7.0.2 and having to do a restore and set up as new iPhone, this approach didn't work: When the step came "All music on this device will be replaced," all of the 5000 songs entirely re-downloaded all over again, which took 27 hours and burned through 40+ GB of home data (not phone data, since I was on Wifi). I kept my phone at home, plugged in and on wifi all weekend so as not to burn through all of my LTE data.
    What is the deal? If I have to do this again (let's hope iOS 7.0.3 or 7.1 doesn't force my phone into recovery mode again), I certainly don't have the time or patience to let iTunes Match redownload all music again, and I certainly don't want to use up 40+ GB of home data.
    Is there a workaround for this? Have others been successful transferring music via computer first and then turning on Match without problem in iOS 7.0.2? I'm sure it worked that way in iOS 6, and without completely redownloading all the music again, since that process would have taken several hours and a lot of home data, and I have not had any problems like this prior to iOS 7.

    I think a better question is why do you "have to" restore your iPhone and set it up as a new device as often as you seem to? This seems to be more of a problem for you.
    I followup question is why do you have iTunes Match turned on if you're syncing all your music to your iPhone?
    Perhaps you should examine how you're using your iPhone and iTunes Match?
    brsedu wrote:
    Have others been successful transferring music via computer first and then turning on Match without problem in iOS 7.0.2? I'm sure it worked that way in iOS 6, and without completely redownloading all the music again, since that process would have taken several hours and a lot of home data, and I have not had any problems like this prior to iOS 7.
    To answer this question, yes I have. It has always worked this way for me.

  • Workaround for not being able to reference a multi-select field in a calculated field?

    Does anyone have a workaround for the fact that SP doesn't allow the use of a multi-select choice field to be used in a calculation in a calculated column?  I have a list that WAS a single choice in a Status field with three other calculated columns
    that were dependent upon that field.  Then I had to change the Status field to be to multi-select (checkboxes). Now of course my calculated columns don't work.  In addition, the end user can't fill them in either.
    I've got a Status field (multi-select), a Status Date field and Expiration Date field (calc).  The expiration date's calculation is shown below.   This worked great until I was asked
    to change the Status field to multi-select.<o:p></o:p>
    =IF(Status="NoI
    Review",DATE(YEAR([Status Date]),MONTH([Status Date]),DAY([Status
    Date])+21),"")<o:p></o:p>
    There are no mistakes; every result tells you something of value about what you are trying to accomplish.

    Hi run4it,
    Since SharePoint calculated column cannot reference the choice field with multiple-select value enabled, a workaround is to use workflow to copy the "Status" column value to another single line text column, then reference this single line text column in
    calculated column.
    Thanks,
    Daniel Yang
    Forum Support
    If you have feedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • Can someone help me find a workaround to get flash to work in XP Pro 64 bit, like there is a workaround for vista 64 bit?

    Can someone help me find a workaround to get flash to work in XP Pro 64 bit, like there is a workaround for vista 64 bit?
    I am trying to get rid of all my 32 bit apps because the more of them you run in 64 bit the less resources are available.
    Firefox has a 64 bit browser they call the Shiretoko build. I love it, it's twice as fast as a heavily tweaked 32 bit firefox. Java has a 64 bit plugin that works with it.
    The last holdout is Adobe.
    Microsoft is making Vista and Win 7 64 bit as easy and smooth as the 32 bit versions as a means to get people to start using them.
    Linux has a way to make flash work with 64 bit.
    Remember when we all had a 16 bit operating system and how much better things got with 32 bit?
    Adobe, it's time!.. don't you see that?
    Can someone help me solve my problem? Please?

    lostchild wrote:
    sorry but that doesnt help my options the guy i called said they discontinued the audigy 4 and 2. I dont know why he would say that but he said his supplier cant get them. Are they really discontinued? Also, isnt the audigy 2 zs or whatever its called for notebooks? i cant use an external one. Well not that i cant, i dont want to. I just want a good sound card mounted into my computer...
    Thanx in advance.
    no the audigy 2 zs is pci based. they have another called audigy 2 zs notebook and that's the one for laptop. if you can't find it from your vendor, you can always try getting it from someone else.

  • Workarounds for lack of sub-folder support

    I'm trying to find a workaround for the lack of sub-folder support for photos. For example, are there any apps that synchronise my photos with the original folder structure from my PC? I've spent quite a lot of time searching, but can't find the right solution.

    Hi all. Hope this helps...
    There is NO sub-folder (two or more folder levels) support in OS3x and OS4x until today. Hope this will change in near future, however that also means foregoing smoothness operation of the iDevice due to how the internal memory works inside (so far, thousands of photos can be viewed without a lag because how fast the iDevice can find the memory location of each file inside its big memory, and creating sub-folders will take great amount of time for the processor to find, put-together, and present the many photos to screen).
    There are other applications that support photos with sub-folders (folders inside folders inside folders inside folders inside folders and so on), however these are not specialized photo viewing app and will not show picture thumbnails but file listing instead:
    - GoodReader
    - OPlayer
    Two good photo and video viewing apps with privacy security; Photo Safe and Video Safe, are also available, which supports high-definition without reducing photo quality as in original iDevice, BUT does not support sub-folders (only one level folders/albums).
    I was hoping iOS4 had the Sub-folders feature for its iPhoto... doesn't have to be three-folder levels, but just additional one level sub-folders would be great.
    Cheers!

  • Error MIGO AA629 Balance for transac type group 10 negative for the area 01

    Hi
    I have the following principal case in the PRD (version 60.0 ECC):
    Active 25000549 number was discharged from the transaction MIGO 18/12/2009 USD 19295.22 and began to depreciate on 01.01.2010.
    On 22.04.2010 the vendor issues a credit note USD 11626.96 therefore created the Purchase Order number 9900000903 and when it will account for the transaction MIGO get the error message AA629 ( Balance for transaction type group 10 negative for the are). In transaction MIGO are using the kind of movement 161.
    SAP looked in and found a related note the following: 497297, 541200, 547233 but they refer to version 4.7 and 4.6C and make no reference to version 6.0.
    The error detail is as follows:
    Balance for transaction type group 10 negative for the area 01
    Message no. AA629
    Asset affected: 000025000549-0000
    Diagnosis
    With the transaction entered, the balance for the transactions in group 10 in area 01 will be negative in this fiscal year. However, the balance of transaction type group 10, according to its definition, must be positive in each fiscal year.
    System Response
    The system rejects this posting.
    Procedure
    Check the transaction type, the amount and the fiscal year in your posting. If you want to post a credit memo to an acquisition from the previous year, then use a transaction type for a retirement. If necessary, you can change balance rules after talking with your SAP consultant.
    My questions are: someone has thought of something similar? how to solve? must implement the foregoing notes?
    Thank you very much for your kind help

    Hi,
    notes 20347 and .302756.                                      
    Try to change following customizing temporarily to 160:               
    IMG->FI-AA->Transactions->Determine default transaction types for            
         internal transactions->Acquisition from goods receipt                                                                               
    Another alternative could be to TEMPORARILY change the definition  of transaction type group 10 so that it allows negative values.                                                                               
    139899   AA629 when posting MR01/MRHR/MIRO invoice receipt                                                                               
    AA629 is raised when the transactions per transaction type group in one year are negative in balance and the definition of the  transaction type group only allows positive values  (that means TABWG-VZJSAL is '+'). This is the case for transaction           
    type group 10. After posting transaction I recommend to set transaction   group 10 back to its original definition.                                    
    Regards Bernhard

  • SSAS Tabular in DirectQuery - What are the workarounds for formula limitations?

    Hello,
    I need to create an SSAS Tabular model against the database of a live, real-time, line of business transactional system (i.e. a CRM).
    The business requirement behind it is that we need to create some complex reports against live data, and our DW is only updated daily.
    This live model will however be partitioned with a time-variance limitation (e.g. only records which are XX old can be returned).
    Now here is the challenge. Since I am querying live data, then I believe the model must be configured in DirectQuery model. Am I right?
    The issue is that DirectQuery mode is full of formula limitations. So my concern is, if I need a calculated column or measure that I cannot make it work due to DirectQuery limitations, then what are the alternatives?
    Remember that the data source is from a live system, so it is not like I can create columns and measures in the underlying relational database.
    Please advise.
    Regards,
    P.

    Hi pmdci,
    According to your description, you want to use some functions in calculated measure which are not supported in DirectQuery mode. Right?
    In Analysis Services Tabular, since DirectQuery has the real time access and scalability, this comes with a price of restrictions on a number of DAX functions and missing Calculated Column feature. Generally the workaround for these scenarios
    is replacing those functions with other functions which are supported in DirectQuery mode, or create columns in the data source. However, as you said, your environment is not possible to create columns in the database. And a lot of those limited
    function are not replaceable, like time intelligence functions. So actually, there's no really effective workaround currently.
    For you requirement, I suggest you submit Microsoft a feature request
    at https://connect.microsoft.com/SQLServer
    so that we can try to modify and expand the product features based on your needs.
    Best Regards,  
    Simon Hou
    TechNet Community Support

  • Workaround for ORA-04030 error

    hi,
    we've encountered the following error:
    ORA-04030: out of process memory when trying to allocate 296 bytes (callheap, koposal dvoid)
    all of the research i've done points to setting up the database with a Very Large Memory configuration, which will be carried out at a later date as we're still in the development stage.
    is there a possible workaround for this error?
    thanks
    santosh sewlal

    hi,
    we're inserting into tables - spatial data and images, from a C#.net application that sends data to the db in a BLOB

  • Workaround for Invalid Certificate with Acrobat 9.0 and Adobe Reader v.7.0?

    Hello!
    In Adobe Acrobat 9.0 Professional, is there currently a workaround for the following scenario?:
    At our company, the source document is created in Word and then a PDF document is created using Adobe v.9.0. My colleague, who uses Adobe 9.0 Professional, places a certificate in the Header of the PDF document.
    When this document goes out for sign off, the users only have Adobe Reader v. 7.0. Once these users open the PDF document and try to place their signature in to the digital signature fields, the certificate in the document becomes invalid.
    Is there a way to save off the PDF in v.9 in different formats (A, F, etc.).
    Would saving off the PDF in another format retain the validity of the certificate in the PDF document when other users with Reader v.7.0 try to sign the document?
    Thx again for everyone's help!
    Susan Steen

    Hi Steve,
    fwiw - at the Forums' entry http://forums.adobe.com/index.jspa
    there is this announcement.
    Announcement: File Attachments Temporarily Disabled
    Hide Details
    We have temporarily disabled the ability to upload files to the forums in order to protect our customers/users from a potential security issue. Thank you for your patience while we mitigate this issue.
    by adobe-admin at Feb 22, 2010 12:20 PM
    So a file attachment may not be an option (?).
    Be well...

  • How do I create a group in contacts for texting?

    How do I create a group in contacts for texting to several people?

    Create your group on your computer, and sync it on your iPhone. But you cannot use this group for texting. You need an application for this. Easy Group is a free one I have developped.
    http://itunes.apple.com/fr/app/easy-group/id461469079?mt=8
    Remi
    Note: I may receive some form of compensation, financial or otherwise,from my recommendation or link.

Maybe you are looking for

  • How to get the java code of the message mapping

    how to get the java code of the message mapping, I mean to ask how to get the background java code of the message mapping(graphical mapping). And where to view it?

  • Toolbar installed that has caused a blank strip across the top of my facebook page which i cannot click on

    I accidentally installed a toolbar i do not want. i think i successfully uninstalled it, but after it was installed, when i go into the facebook app, there is a strip across the top of the facebook page on which i cannot click on to . this strip incl

  • Campus Manager data collection

    Hi I am getting all the cisco devices discovered in DCR but missing one of the 6513 in the data collection which is already there in DCR.It is also missing in the topology diagram.However this 6513 is reflected in all other modules like DFM , RME and

  • Send message with abap proxy client

    I'm trying to send message to XI, but no message in sxmb_moni. I have created logical port with LPCONFIG. ABAP code REPORT  Z_HTTP_SEND. DATA: * Reference variables for proxy and exception class   lo_clientProxy     TYPE REF TO ZPCO_MI_COMPANY_OB,  

  • How do I Edit a MPEG1 video clip with QT Pro?

    I have several video clips from my Sony H-1 digital camera that I want to edit. They are in MPEG 1 file format. I have them on my iMac in iPhoto and when I open them in QT Player (bought the Pro key) the Edit features (cut, copy, delete) are greyed o