Faster procedure that can be use

pls guy i need to knw hw i ll b able to get a better procedure to run for shorter time.
i am trying extract data from two tables one in a remote location and another one in the present databse i m working on.
i want to use the extracted dat to update a column in the table.can u help to tune it better.i need to update a table of records of abt 70 million records.this is the procedure
CREATE OR REPLACE procedure AC_DATA.post_emp IS
begin
for i in (select distinct emp_id, user_id, user_emp_id
from emp, cust@miami
where emp_id = user_id)loop
begin
--update emp_log
update /*+ PARALLEL(emp_log,20) */ emp_log
set emp_id = i.user_emp_id
where emp_id = i.user_id;
commit;
end;
end loop;
end;
/

olayide wrote:
@ justin,tanx i am trying to run a procedure that will update the value of a particular column by comparing between two columns.I understand that you are doing something like the correlated update I posted. Again, since you haven't posted your table definitions, your data, or your expected output, it's rather hard for us to know exactly what correlated update you really want.
If you really want to do row-by-row processing (also known as "slow by slow" processing), it will take substantially longer to make the changes. It's also completely pointless to ask for parallel processing to be used for a single-row update. If you're not concerned about performance, loops can be very easy to code. But it sounded like you were concerned about performance.
Committing in the loop will, similarly, add an order of magnitude to the time required to process the data. And you don't appear to be doing anything that would make your code restartable in order to gain any sort of benefit from interim commits.
Justin

Similar Messages

  • Creating a simple procedures that can be used to send emails

    Dear All, I would like to design a simple procedure that can be used to send out emails..How do i go about doing so. Kindly note I have a table called table_emp which contains the emails of sveral employees and their firstname, lastname, empid, username, email, username, userid as well
    Userid     FirstName         LastName            empid             Email                                      username            Manager
    123        John                Adams                550                [email protected]                    jadams                    0
    124        Lisa                  Rain                   551                [email protected]                    lrain                        1
    125        Mesina              Ray                   552                 [email protected]                     mray                       1All help will be greatly be appreciated. Thank you

    user13328581 wrote:
    Dear All, I would like to design a simple procedure that can be used to send out emails..How do i go about doing so. You said you would like to design a simple procedure that can be used to send out emails, but it looks to me that you want us to spoon-feed you and just give you what you need. You didn't even tried anything on your own... haven't you?
    Try something first on your own and if it doesn't work well it would be a valid reason to look for help.

  • Is there any way to an index that can be used to include the "OR condition "?

    Hello I have some questions.
    The test was conducted in the following procedure .
    create table test
    c1 varchar2(10),
    c2 varchar2(10),
    primary key(c1)
    create index test_idx1 on test(c2);
    Command> explain select * from test where c1 = 'AAAAAAAAAA' or c2 = 'AAAAAAAAAA';
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         TEST.C2 = 'AAAAAAAAAA' OR TEST.C1 = 'AAAAAAAAAA'
    Command>
    Command> explain select * from test where c1 = 'AAAAAAAAAA' and c2 = 'AAAAAAAAAA'
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   TEST.C1 = 'AAAAAAAAAA'
      NOT INDEXED:         TEST.C2 = 'AAAAAAAAAA'
    Command>
    By including the "OR condition " in this test does not use the index.
    Is there any way to an index that can be used to include the "OR condition "?
    Thanks.
    GooGyum.

    A database cannot in general use indexes in this way for an 'or' involving two different columns. However, for this specific example one can easily rewrite the query using 'UNION' to use the relevant indexes while still giving the same (correct) result:
    Command> explain select * from test t1 where t1.c1 = 'AAAAAAAAAA' union select * from test t2 where t2.c2 = 'AAAAAAAAAA';
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   T1.C1 = 'AAAAAAAAAA'
      NOT INDEXED:         <NULL>
      STEP:                2
      LEVEL:               2
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST_IDX2
      INDEXED CONDITION:   T2.C2 = 'AAAAAAAAAA'
      NOT INDEXED:         <NULL>
      STEP:                3
      LEVEL:               1
      OPERATION:           OrderBy
      TBLNAME:             <NULL>
      IXNAME:              <NULL>
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         <NULL>
      STEP:                4
      LEVEL:               2
      OPERATION:           UnionMergeSort
      TBLNAME:             <NULL>
      IXNAME:              <NULL>
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         <NULL>
    Maybe you can apply a similar trick? If you know there is no possibility of duplicate rows then you can further optimise this (in terms of performance) by using UNION ALL.
    Chris

  • Third party reporting tools that can be used with WLI 8.1

    All:
    I am working on Weblogic Integration 8.1. I am wondering are there any ready tools that can be used with WebLogic Integration process related tables to get different types of reports out of it.
    Can somebody point me to these tools??
    TIA,
    Prashanth Bhat.

    Are you using ADE to read bought books, library books, or only free books?
    If only free books, I suggest you install the superior free Calibre instead (http://calibre-ebook.com/)
    For bought or library books you do need to install ADE on the new machine.
    You will also need to register it with your Adobe ID; the same one you used on the last machine.
    If you can't remember that ID or the password, ask, and we may be able to help.
    I will give instructions for the latest version of ADE (2.0.1), even though I am afraid it has more problems than the old one it is more 'standard'.
    Goto http://www.adobe.com/uk/products/digital-editions/download.html
    Click on the 'Download Digital Edition 2.0.1 Windows (5.6 MB)'  (you can go direct to http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe if you prefer)
    When it has downloaded you must open/run it.  If you are using Internet Explorer, choose the Run option when you start the download.
    It should now go through a fairly standard install procedure, asking if it is ok to run the program, etc etc
    Take the easy 'yes' or equivalent option at each step.
    When it is safely installed, run it.  It should have put an icon on the desktop.
    You now need to authorize ADE. 
    Use ctrl-shift-U which will open up a dialog asking for your Adobe ID and password.
    You should now be able to use it pretty much as you used ADE on your old machine.
    Good luck.  Unfortunately not a very easy process even when all works well, and there are several things that can go wrong.
    Don't hesitate to ask again if you need help.

  • I want to create fillable PDF that can be used by many people running on both MAC and PC.  What Adobe product should I use?

    want to create fillable PDF that can be used by many people running on both MAC and PC.  What Adobe product should I use?

    Hans-Gunter
    Thanks so much.  I downloaded Acrobat XI.  It's been "extracting" for the past 30 minutes (even with a fast wi-fi).  Hope this is not a problem.
    Anne

  • System Image Restore Fails "No disk that can be used for recovering the system disk can be found"

    Greetings    
                                        - Our critical server image backup Fails on one
    server -
    Two 2008 R2 servers. Both do a nightly "Windows Server Backup" of Bare Metal Recovery, System State, C:, System Reserved partition, to another storage hard drive on the same machine as the source. Active Directory is on the C: The much larger D: data
    partition on each source hard drive is not included.
    Test recovery by disconnecting 500G System drive, booting from 2008R2 Install DVD, recovering to a new 500G SATA hard drive.
    Server A good.
    Server B fails. It finds the backed-up image, & then we can select the date we want. As soon as the image restore is beginning and the timeline appears, it bombs with "The system image restore failed. No disk that can be used for recovering the system
    disk can be found." There is a wordy Details message but none of it seems relevant (we are not using USB etc).
    At some point after this, in one (or two?) of the scenarios below, (I forget exactly where) we also got :
    "The system image restore failed. (0x80042403)"
    The destination drive is Not "Excluded".
    Used   diskpart clean   to remove volumes from destination drive. Recovery still errored.
    Tried a second restore-to drive, same make/model Seagate ST3500418AS, fails.
    Tried the earliest dated B image rather than the most recent, fail.
    The Server B backups show as "Success" each night.
    Copied image from B to the same storage drive on A where the A backup image is kept, and used the A hardware to attempt restore. Now only the latest backup date is available (as would occur normally if we had originally saved the backup to a network location).
    Restore still fails.         It looks like its to do with the image rather than with the hardware.
    Tried unticking "automatically check and update disk error info", still fail.
    Server A  SRP 100MB  C: 50.6GB on Seagate ST3500418AS 465.76GB  Microsoft driver 6.1.7600.16385   write cache off
    Server B  SRP 100MB  C: 102GB  on Seagate ST3500418AS 465.76GB  Microsoft driver 6.1.7600.16385   write cache off
    Restore-to hard drive is also Seagate ST3500418AS.
    http://social.answers.microsoft.com/Forums/en-US/w7repair/thread/e855ee43-186d-4200-a032-23d214d3d524      Some people report success after diskpart clean, but not us.
    http://social.technet.microsoft.com/Forums/en-US/windowsbackup/thread/31595afd-396f-4084-b5fc-f80b6f40dbeb
    "If your destination disk has a lower capacity than the source disk, you need to go into the disk manager and shrink each partition on the source disk before restoring."  Doesnt apply here.
    http://benchmarkreviews.com/index.php?option=com_content&task=view&id=439&Itemid=38&limit=1&limitstart=4
    for 0x80042403 says "The solution is really quite simple: the destination drive is of a lower capacity than the image's source drive." I cant see that here.
    Thank you so much.

    Hello,
    1. While recovering the OS to the new Hard disk, please don't keep the original boot disk attached to the System. There is a Disk signature for each hard disk. The signature will collide if the original boot disk signature is assigned to the new disk.
    You may attach the older disk after recovering the OS. If you want to recover data to the older disk then they should be attached as they were during backup.
    2. Make sure that the new boot disk is attached as the First Boot disk in hardware (IDE/SATA port 0/master) and is the first disk in boot order priority.
    3. In Windows Recovery Env (WinRE) check the Boot disk using: Cmd prompt -> Diskpart.exe -> Select Disk = System. This will show the disk where OS restore will be attempted. If the disk is different than the intended 2 TB disk then swap the disks in
    correct order in the hardware.
    4. Please make sure that the OS is always recovered to the System disk. (Due to an issue: BMR might recover the OS to some other disk if System disk is small in size. Here the OS won't boot. If you belive this is the case, then you should attach the
    bigger sized disk as System disk and/or exclude other disks from recovery). Disk exclusion is provided in System Image Restore/Complete PC Restore UI/cmdline. 
    5. Make sure that Number and Size of disks during restore match the backup config. Apart from boot volumes, some other volumes are also considered critical if there are services/roles installed on them. These disks will be marked critical for recovery and
    should be present with minimum size requirement.
    6. Some other requirements are discussed in following newsgroup threads:
    http://social.technet.microsoft.com/Forums/en-US/windowsbackup/thread/871a0216-fbaf-4a0c-83aa-1e02ae90dbe4
    http://social.technet.microsoft.com/Forums/en-US/windowsbackup/thread/9a082b90-bd7c-46f8-9eb3-9581f9d5efdd
    http://social.technet.microsoft.com/Forums/en-US/windowsbackup/thread/11d8c552-a841-49ac-ab2e-445e6f95e704
    Regards,
    Vikas Ranjan [MSFT]
    ------- This information is provided as-is without any warranties, implicit or explicit.-------

  • Is there a limit to no. of summary fields that can be used in a cross tab?

    Hi,
    While creating a cross tab is there a limitation to number of summarized fields that can be used?
    - The cross tab when uses 184 fields as summary fields leads to Crystal report application to crash at the time of export to excel.
    - Tried with two Datasources: XML and excel
    - If we reduce the number of summary fields used to 102 exactly, export works fine in excel.
    - If 2 cross tabs are used each containing 92 summary fields(in order to show 184) export to excel works fine.
    Please let me know if there is any such limitation which leads to CR application to crash when exporting in excel?
    Thanks
    Regards,
    Nidhi

    I suggest you purchase a case and have a dedicated support engineer work with you directly:
    http://www.sdn.sap.com/irj/boc/gettingstarted
    Or
    http://store.businessobjects.com/store/bobjects/Content/pbPage.CSC_map_countyselector/pgm.67024400?resid=jFmmLgoBAlcAAALO-iYAAAAP&rests=1278687224728
    If this is a bug you'll get a refund, if not post your enhancement request in the Idea Place. Or the Rep will suggest a better way to create your report.

  • When I sync my iphone 4S using iTunes it only syncs 8.5GB of music, not the entore library as specified.  Is there a capcity default limit of the amount of storage that can be used for music and if so how do I change it?

    When I sync my iphone 4S using iTunes it only syncs 8.5GB of music, not the entore library as specified.  Is there a capcity default limit of the amount of storage that can be used for music and if so how do I change it?

    The only limit is that of the device. No restrictions on how much of it you can use for music. Is part of your music library unchecked?
    tt2

  • What format i should use for my external hard drive that can be used interchangeably between mac and pc?

    What format i should use for my external hard drive that can be used interchangeably between mac and pc?

    Usually Fat32/MS-DOS as mentioned, but that has several limitatiuns, like 4GB filesize limit.
    One option is MacDrive for you PCs... allows them to Read/Write HFS+...
    http://www.mediafour.com/products/macdrive/
    More options...
    NTFS-3G Stable Read/Write Driver...
    http://www.ntfs-3g.org/
    MacFUSE: Full Read-Write NTFS for Mac OS X, Among Others...
    http://www.osnews.com/story/16930

  • Is there a list of Unicode characters that can be used in Acrobat bookmarks?

    I can add Greek characters to Acrobat bookmarks using hexadecimal strings. For example, to print a lower case gamma symbol I use <FEFF03B3>. FEFF is the required Unicode flag and 03B3 is the Unicode code for gamma. This works fine. However, there are no Unicode entries for greek characters in the PDF 32000-1:2008 PDF Specification manual. Table D.2 - PDFDocEncoding Character Set on page 656 lists Unicode characters and these also work when added to bookmarks but no Greek codes are in this table. Since I can sucessfully use Greek Unicode characters in the range of 0x0391 - 0x03CE and these characters are not listed in the PDF manual I am assuming there are additional Unicode character that will work in bookmarks. Therefore, I am looking for a complete list of Unicode characters that can be used in Acrobat's bookmarks. Does such a list exist?

    Thank you for the response.
    I'm sorry to hear there is no list available. I'm building the Acrobat bookmarks automatically. The input data contains entity codings (for example, a lower case Greek gamma is coded as &#x03B3;) and I was hoping to be able to just pass these through with an automatic conversion to a hexadecimal string (for example <FEFF03B3>). If I had a list of valid Unicode characters, that will display in an Acrobat bookmark, I could validate each entity before the conversion and catch the ones that won't display correctly. I know these types of characters are out there because I have already come across them. For example, a superscript 5 (0x2075) displays fine in MSWord but shows as a white box in a bookmark. Now I'll need to proof the output PDFs and look for white boxes in the bookmarks so that I can build my list of unicode characters that do not work in Acrobat bookmarks.
    Again, thanks for your help.

  • Need to know of a method / process that can be used to send the same msg to all those appearing in my email listings with the same extension after the "@" sign in their address(es) on my macbook [e.g., with "@gov.ca"; Snow Leopard].

    Need to know of a method / process that can be used to send the same msg to all those appearing in my email listings with the same extension after the "@" sign in their address(es) on my macbook [Snow Leopard].

    If you simply want to send the exact same message to everyone in your address book with emails ending in "@whatever.com", you can do the following:
    Create an email with subject, message and attachments but no addresses
    Open Address Book, All Contacts
    Search in Address Book for @whatever.com
    Select the results and drag them into the To: or Bcc: field of the email. If Bcc: then put your email address in the To: field.
    Send the email
    This will not personalize the emails (such as with "Dear firstname:" at the top of the message) but it will let you send an idential message to everyone who meets your criteria.

  • Has anyone tried to trade in the their iphone5 for the gift card that can be used to buy iphone6?

    Has anyone tried to trade in the their iphone5 for the gift card that can be used to buy iphone6?

        csa3, I want to make sure you are able to take advantage of this offer. Have you submitted a Preorder for the iPhone 6? If so, you can submit your appraisal before September 30, 2014 using the following link: http://bit.ly/GGnDDC
    AndreaS_VZW
    Follow us on Twitter @VZWSupport

  • Number of elements that can be used with 'in' Operator

    One of my SQL query having 'in' operator failed saying number of elements exceed.
    Is there a limit on number of elements that can be used with - 'in' operator.
    And if yes can it be increased?

    Parag Kalra wrote:
    One of my SQL query having 'in' operator failed saying number of elements exceed.
    Is there a limit on number of elements that can be used with - 'in' operator.
    And if yes can it be increased?You cannot have more than 1000 literals in an IN clause.
    Please check
    ORA-01795, limit on in clause
    Max number of values in IN clause
    Edited by: Rajesh Lathwal on May 24, 2010 12:28 PM

  • What component is included with Microsoft SQL Servers that can be used to perform a broad range of data migration tasks?

    What component is included with Microsoft SQL Servers that can be used to perform a broad range of data migration tasks?
    a. Full Text Search service
    b. SQL Notification Server
    c. SQL Reporting Server
    d. SQL Server Integration Services

    d.
    Are you having a test and trying to cheat?
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • To offer integrated forms, so like Jotform, there are templates that can be used and upload options to FTP client as well as other built in widgets.

    To offer integrated forms, so like Jotform, there are templates that can be used and upload options to FTP client as well as other built in widgets.

    What you need is merged help.
    You generate a parent and all the child projects. You always install the parent and then whichever child projects you require. The TOC, search and index automatically adjust. See the pages on my site.
    Note though that many people take another view to your Product Development. Show all the help and then people see information about something and realise they need it!
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

Maybe you are looking for

  • Taxes in  MIRO

    Hi, My Problem in MIRO regarding CIN and VAT. At the time of Creating Purchase order i dont no the Price of the material eventhough this Excise pass on case(Dealer Purchase) 1)MIGO i will just capture excise (Material account Debit 100Rs and Gr/Ir Cr

  • Multiple ZR2740w failures within one and half year

    Hello, i would like to ask you if it is "normal" for me to have this series of issues with my ZR2740w's (by normal i mean if this is typical problem for this model; i know it is not normal to have that many RMA) : 1) first ZR2740w (let's call it A, b

  • Blue background behind text

    Often when we print from a third party application the PDF comes out with a dark blue background that is very hard to read. Any fix for this?

  • ZSNES fails to run as non-root user (X BadAlloc Error) [Solved]

    Recently, I noticed that ZSNES failed to start unless it was run by root. The program, when called by a non-root user, would hang after generating the error: X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of f

  • Problem with a basic update ..

    i am trying to update a table say tab1 . the table tab1 has 3 rows and i want all to be updated . the query ... UPDATE     tab1 SET others =(SELECT                              tab2.c FROM tab2 WHERE EXISTS           (SELECT      1           FROM