Faster Updates

Is there some kind of Optimizer Hint which can be used to avoid generating Rollback Information when updating a Table . The Table which i have is A GLOBAL TEMPORARY TABLE WHICH does not allow a NOLOGGING OPTION with the Create Table clause. There is around 10 million rows to be updated in one single update block.
example
UPDATE SALES_FORECAST_MASTER
SET A = ( )
Here Sales_Forecast_Master has 10 million rows and is A GLOBAL TEMPORARY TABLE.
Thanks
Ravi

Watch :
SQL> create table t1n (col1 integer) nologging;
Table created.
SQL> create global temporary table t1x (col1 integer);
Table created.
SQL> insert into t1x select rownum from all_objects;
32448 rows created.
Statistics
25 recursive calls
33189 db block gets
229155 consistent gets
0 physical reads
4039700 redo size
863 bytes sent via SQL*Net to client
578 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
32448 rows processed
SQL> insert into t1n select rownum from all_objects;
32448 rows created.
Statistics
129 recursive calls
482 db block gets
229194 consistent gets
0 physical reads
501916 redo size
864 bytes sent via SQL*Net to client
578 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
32448 rows processed
So the normal nologging generates less redo
Now let's do an update :
SQL> update t1x set col1=2;
32448 rows updated.
Statistics
24 recursive calls
33198 db block gets
64 consistent gets
0 physical reads
4824780 redo size
863 bytes sent via SQL*Net to client
553 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
32448 rows processed
SQL> update t1n set col1=2;
32448 rows updated.
Statistics
24 recursive calls
33200 db block gets
67 consistent gets
0 physical reads
7680972 redo size
864 bytes sent via SQL*Net to client
553 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
32448 rows processed
SQL>
and now we see the normal table generating more redo on an update.

Similar Messages

  • Fast Updates for 8 million records..!!

    Hi All,
    I was wondering is there any fast method for updating 8 million records out of 10 million table?
    For eg :
    I am having a customer table of 10m records and columns are cust_id, cust_num and cust_name.
    i need to update 8m records out of 10m customer table as follows.
    update customer set cust_id=46 where cust_id=75;
    The above statement will update 8m records. And cust_id is indexed.
    But if i fire the above update statement we'll face rollback segment problem..
    Even if i use ROWNUM and commit after 100K records still its gonna take huge time and also i know CTAS will be lot lot faster but for this scenario i guess its not possible.. Right?
    Any help is much appreciated...
    Thanks.

    You didn't specify what version you're on, but have you looked at dbms_redefinition?
    create table cust (cust_num number, constraint cust_pk primary key (cust_num), cust_id number, name varchar2(10));
    create index cust_id_idx on cust(cust_id);
    insert into cust values( 1, 1, 'a');
    insert into cust values( 2, 2, 'b');
    insert into cust values( 3, 1, 'c');
    insert into cust values( 4, 4, 'd');
    insert into cust values( 5, 1, 'e');
    select * From cust;
    create table cust_int (cust_num number, cust_id number, name varchar2(10));
    exec dbms_redefinition.start_redef_table(user,'cust', 'cust_int', 'cust_num cust_num, decode(cust_id, 1, 99, cust_id) cust_id, name name');
    declare
    i pls_integer;
    begin
    dbms_redefinition.copy_table_dependents( user, 'cust', 'cust_int', copy_indexes=>dbms_redefinition.cons_orig_params, copy_triggers=>true, copy_constraints=>true, copy_privileges=>true, ignore_errors=>false, num_errors=>i);
    dbms_output.put_line('Errors: ' || i);
    end;
    exec dbms_redefinition.finish_redef_table(user, 'cust', 'cust_int');
    select * From cust;
    select table_name, index_name from user_indexes;
    You would probably want to run a sync_interim_table in there before the finish.
    Good luck.

  • Fast update

    hello ,
    please how can i make this procedure to work faster,it is doing the update slowly and i really dont like the sloww process
    begin
    for i in (select party_key
    from act_frd_emp.party
    where party_id is null)
    loop
    begin
    update /*+ parallel(party,10000) */act_frd_emp.party
    set party_id =i.party_key
    where party_key = i.party_key;
    commit;
    end;
    end loop;
    end;
    thanks for ur help.

    hello,
    i want to thank everybody for the help and love shown in helping me to resolve my issue,may the good LORD increase you in knowledge,
    really appreciate it guys.
    once again
    thanks
    ajani abdulrahman

  • MSI R4850 PROBLEM - PLEASE HELP FAST (UPDATED) :S

    I install my new PC and what do you know, there are exclamation marks on the POST and BIOS screens replacing some parts of the background... But when windows starts everything looks fine. I can watch movies and there is no problem. But then I saw this in the VGA driver tab:
    So I install a few games, and it is similar to that picture. The whole screen is covered with little squares on some spots and there seems to be faulty graphics.
    While playing a map in Warcraft, not only the graphics was like this, but every now and then the screen would freeze, go black and return to the same bad graphics. Also after 5 minutes it gave me a BSOD.
    I have the latest ati grafics drivers, and I tried replacing the 4850 with my old video card, an MSI Nvidia N7800GT and these problems are not present with that card, so it has to be the a problem with the 4850.
    So what is wrong with the VGA? Is it some hardware fault? What should I do?
    My system (only a day old):
    MSI P45 Platinum (Zilent) BIOS v1.0
    Intel Core 2 Duo E8300
    A-DATA Vitesta 1066+ 2x1GB
    MSI R4850
    1XWD RAPTOR 74GB
    1XWD CAVIAR 200GB
    1XWD CAVIAR 500GB
    1XSAMSUNG SATA DVDRW 22x
    PSU: Cooler Master Real Power M520
    HANNS-G HI221DP (22" Widescreen connected with DVI-D Single Link Cable)

    OK, so I tested the VGA in another system. And as it started it showed the exclamation marks in post again. Then I installed the drivers and i restarted, and the exclamation marks were gone. Then tested games, Warcraft and Crysis and everything works splendid. This was on my friend's PC which is:
    MB ASUS P5Q Updated to Latest BIOS
    PQI DDR2 800MHz 2GB
    CPU Intel Core 2 Quad Q6700
    HDD 320GB Hitachi 16MB cache @ SATA2
    Windows XP PRO x86
    So the VGA is ok here, but doesn't work fine on my system. Any ideas?
    EDIT: Updated BIOS version to 1.4 and the problem persists... some help pleaseee!

  • Fast update on remote panel

    Hello All,
    I have a front panel with a few knobs, 4 XY graphs and other numeric controls. All the XY plots have points drawn on them every 1 second. The trouble is when I look at the front panel with a remote connection (LAN, intranet) the update speed seems to be about 7-11 seconds. Every 7-11 seconds, I can see the XY plots updating where as the data acquisition is every second. Although the update speed in every 6-11 seconds on the remote panel, all the data points are drawn. I would like the user to see the XY plot update in real time. Does anyone have any ideas on how I can increase the update speed? Thank.
    KB

    Hi,
    The slow update speed could be caused by the XY graphs. Try to see if reducing the number of XY graphs increases the speed. Also, try using charts rather than graphs and that should improve the performance.
    Regards,
    Ankita A.
    National Instruments

  • Trying to understand Android OS updates delays

    This is not another hate mail, it´s more about trying to understand the facts and motives regarding the OS updates (or lack of).
    Hopefully this material will arrive at someone from Sony with enough power to do something about it.
    Ever since I can remember, Sony has been THE brand for electronics. I can´t remember a TV or VCR in my house that it wasn´t Sony, and they lasted for LOTS of years.
    When a couple years ago I finally had the money (and the need) for a Smartphone, i chose the X10 Mini, which is a great little phone from a great brand, but it´s stuck at Android 2.1... which makes it a crippled android nowadays...
    It really bothered me the lack of OS updates, so I chose to buy a Galaxy Nexus, but it´s really expensive in my country. So my second option was a Galaxy Ace 2, but they haven´t arrived to my country yet, so I went with my third option: Xperia Sola, knowing beforehand that it´s a great phone, a great brand, but I might get slow OS updates.
    I bought it about 10 days ago when I saw they were starting to roll out the updates.
    10 days later I still don´t have my update. And not only that, but I don´t see much light at the end of the tunnel...
    I found a thread with the SI numbers that were updated, and there were a bunch on Oct 1, another bunch on Oct 4, and one code on Oct 8, and no other update since...
    I also read that those who did get the update, were having bugs with the OS, and also found threads from other Xperia models, whose updates began rolling 3 months ago, and there is still people who hasn´t gotten the update...
    As a customer, and a owner/CEO of a small company, I have a really hard time understanding how a HUGE company like Sony can be making such mistakes...
    I have been thinking objective reasons, and I can only think of one. I know it´s a wild guess, but I´m starting to think that our salvation might be the very thing that means our condemnation: CYANOGENMOD!!!
    Think about it: Why would Sony spend more money hiring twice as much programmers, when they can make only one update per phone, and sit down and see how CM releases begin to appear, for all tastes and needs. And... IT´s FREE!!!
    Also, if there is a software related problem (way more likely than a hardware problem), then the CM developers take the fall, instead of Sony. And I´m beginning to see custom OS installers that are more user friendly, so it might be something that they take in accout when neglecting OS updates.
    If that´s the line Sony is following, it´s a very risky move and it won´t work. Sony Mobile will crash and burn, but it´s still a better business plan that "let´s get lazy and make ULTRA slow updates so we don´t spend a lot of money programming".
    If you can´t afford more programmers, stop including so much bells and whistles and make your OS near vanilla. Include a couple of Xperia menus, a custom theme and voila!
    The main reason I wanted the Galaxy Nexus is Vanilla OS, which means inmediate OS updates. Sony on the other hand, takes a year or two to release it after its launch. If they release it at all...
    Another though...  why not stop making that many different phones! Really! There are like 5 Xperia models i can´t tell one from the other... even with specs side by side!
    You are trying to make too many phones and you are failing with all of them! (Software and software updates are also part of the phone, one of the most importants...)
    I know hiring programmers is expensive, but you are sacrificing one of the most expensive values for a company EVER: Customer credibility! Which as you know better than me, takes years to create.
    If Apple had problems with carriers and code aprooving and stuff, they might get away with it, becouse they alone have all the devices. If iOS 6 is delayed a few months, it´s delayed for everyone, and besides Apple fanboys rarely complain about Mac products, but Android is a more independent and educated market.
    I´m not saying that Apple users are ignorant, not at all, but I´m pretty sure most iPhone owners don´t even know what processor or how much RAM their phone has. They just "swallow" the Apple Way of Life. (it´s a good phone becouse Apple says so).
    The Android user on the other side, because of the fragmentation of the market, has many brands and models to choose from. An Android user about to buy a new phone will most likely go online looking for different models, specs, reviews in webs and forums...etc.
    You can´t say "I don´t know how HTC and other companies get their updates so soon, but we take a lot more becouse Google and the Operators must aproove the code.", because there are many other brands that have exactly the same difficulties or more, since they are smaller, and we can SEE online that they are indeed delivering solid and relativly fast updates.
    Did we miss something? Does HTC use Witchcraft to get their code aprooved?
    My underlying point is this: You are getting lazy... VERY lazy with software programming for your phones, and WE KNOW IT!
    It´s not the "difficulties" you claim, becouse every brand has those difficulties.
    This isn´t 1999 you know. We are in the information age. If you lie to us and tell us that your phones have the latest OS, I can go online and see that you don´t (Hello!!!). If I see that the company lies to it´s customers, I will stop buying their products. If I´m so dissapointed with how Sony handles OS updates and their customers queries about it, then I want for the first time ever to sell my Cell Phone becouse I´m not happy with it, or the brand behind it.
    We also live in the "Here and now" age. You can´t expect your customers to read about new Android releases on news and blogs, and wait YEARS with arms crossed waiting for their update... The world doesn´t work like that. Not anymore at least...
    It´s not a matter of how many recources you have, it´s about how you use and balance them. GIVE MORE IMPORTANCE TO SOFTWARE UPDATES! IT´S WAY MORE IMPORTANT THAT YOU THINK! LISTEN TO YOUR CUSTOMERS!!!
    You guys are Sony are smart and design great products, but you are not GOD! You are not our wife, no one has sworn alliagence to you.
    If you stop giving us good products and start lying to us, we hate you and stop giving you our money. Simple as that.
    My sola is beatiful, I love the design, the screen, the hardware... but it hasn´t been updated yet to 4.0, not to mention 4.1, which REALLY is the latest version... so stop advertising that your phones have the latest Android OS, unless you want angry customers switching to other companies, which you are getting.
    I also read some stories that Androind 4.0 was announced for the Xperia PLAY, and then it was called off... Do you have any idea how pissed I would be and ripped off I would be if I bought my phone based in that information and then you say it won´t be available?
    Well, actually right now my possition is worse, since you SAY you will update my phone, but you don´t say when, and I read online about people still not getting their updates months after the rollout started, so I´m in the limbo right now...
    As a company, one of the worse things you can do is calling your customers stupid, and when I see the answers you give in this forum, then I feel insulted. I feel like they are talking to an idiot or ignorant person with the so called "diplomatic" answers, which are basicly empty excuses for not doing your job right.
    You gave us the frikking CDs, DVDs and Blu-Rays!!! Don´t tell us you can´t tweak an already built OS in a year!
    I really hope you change their OS update policies really soon, before you lose the already small cellphone market share you have, or at least change your P.R. and C.M. policies towards a more open one.
    We all are humans and make mistakes, but we customers really appreciate honesty and truth.
    Have an open conversation with your customers! Don´t lie about your shortcomings! Accept then and ask the community to help you solve them, ask them what they biggest problems are, what features are most important to them, how often do they expect updates... LISTEN TO THEM!!
    "Succes is a meneace. It tricks smart people into thinking they can´t lose."
    Ps: Nothing personal with the mods from this forum, I´m not killing the messenger, I know that you can ONLY give the info you are allowed to give, and even if you wanted, you probably don´t know the answers yourself, since you work in the Communications department, not Developement or anything technical, and if you can't give any given info, then they probably won´t give it to you either... My message is to the company as a whole. I just hope you will be a good messenger and give this to whoever needs to read it.

    My bad, it´s closer to 40 the number of phones released hehe
    I know it´s all about money, and I know Sony is obligated to neglect users who haven´t given them money after an x ammount of time. However, it´s not a matter of making the phones obsolete earlier, so the users want to buy a new phone faster and therefore getting more money.
    A person will buy a new phone when he/she has the money to do so and wants to do so.
    It´s not a matter of WHEN. It´s a matter of WHAT.
    The question is not "When will that user buy a new phone?", but rather "When that user buys a new phone, whenever that is, what phone will it be?"
    I have a love/hate relationship with Apple. I would never use a iPhone. I would love having any Mac, if someone gives it to me, but I would never spend my harn earned dollars on such an overpriced piece of hardware over general principals.
    However, i do recognice that Steve Jobs was a business genius. Weather you like or love his ideas and methods, he turned a garage project into the biggest company in the world, with a market value higher than Exxon with 1/3 of it´s assets.
    Apple is a money making machine, and that is where the "hate" part of my relationship comes from.
    However, it surprised me a lot to see that they released iOS 6 for the iPhone 3GS, released in 2008!
    That get´s you thinking, that inside all that "SELL NOW" culture Apple is, they also support their older devices that people bought years ago but can't buy a new phone now. However, when they can do it, it will surely be another iPhone. Because they FEEL that the company listens and cares for them.
    Also if you jump from iOS 6 on the 3 GS to a brand new iPhone 5, the transition will be virtually non-existant, except for Siri and a couple of features.
    However jumping from Android 1.5 or 2.1 to Jelly Bean, might not be so easy on some users, making them more likely to give iPhone a shot.
    Since they have to adapt to another phone anyway, they might as well try the apple...
    And for old users, it gives people a sense of continuity and care about the user. Otherwise we feel like being kicked out of a restaurant right after we payed the bill.

  • The IOS 6 updates in find my iphone app is horrible. I was using IOS 5 on my iphone till I got a note in apps to update to IOS 6, I thought it would be good, but it changed all my apps, and I do not like it.

    The IOS 6 updates for findmy iphone does not work as well as IOS 5 app. It will not let you update your location when you tap the refresh arrow. So tired of it telling me that my iphone is offline when it is never off. The IOS 5 was great and it worked so much better then the IOS 6. Not only have find my iphone app changed but all my apps changed when I downloaded the IOS 6 update. If I knew that I would not get the same apps back as they are now, I would put my iphone back to factory settings. But my fast updates on my computer are IOS 6.

    sukicheeka wrote:
    No I do not have a technical problem or question.
    This is a technical support forum.  I suggest you re-read the Terms of Use of this forum that YOU agreed to by signing up to post to see what is appropriate.
    Posting like you did in a technical support forum makes you look quite foolish.

  • Writing a BULK Update for a Update statement

    I want write(convert) this Query in PL/sql code using Bulk Collect and Update since this query is taking more time to execute. How I can achive this ?
    Please Help me.
    UPDATE my_master aa
    SET (pay_date, last_mod_by, last_mod_date, verified_status) =
    (SELECT TO_DATE ('03/09/2007', 'dd/mm/yyyy'), 'S1',
    TO_DATE ('22/02/2008', 'dd/mm/yyyy'), 'Y'
    FROM dtl_1 a, dtl_2 b
    WHERE a.br_id = b.nr_id
    AND aa.acct_num = a.acct_num
    AND TO_DATE (TO_CHAR (aa.dat1, 'mm/yyyy'),
    'mm/yyyy'
    ) <
    TO_DATE (TO_CHAR (a.dat1, 'mm/yyyy'),
    'mm/yyyy'
    WHERE (acct_num) =
    (SELECT a.acct_num
              FROM dtl_1 a, dtl_2 b
    WHERE a.br_id = b.nr_id
    aa.acct_num = a.acct_num
    AND TO_DATE (TO_CHAR (aa.dat1, 'mm/yyyy'),
    'mm/yyyy'
    ) <
    TO_DATE (TO_CHAR (a.dat1, 'mm/yyyy'),
    'mm/yyyy'
    AND dat1 <
    (SELECT a.dat1
    FROM dtl_1 a, dtl_2 b
    WHERE a.br_id = b.nr_id
    aa.acct_num = a.acct_num
    AND TO_DATE (TO_CHAR (aa.dat1, 'mm/yyyy'),
    'mm/yyyy'
    ) <
    TO_DATE (TO_CHAR (a.dat1, 'mm/yyyy'),
    'mm/yyyy'
    ))

    "More" is a relative term. More than what? Perhaps you just mean it is taking a long time and you think it should be possible to make it faster.
    First, if I tidy up the query and simplify the date expressions so it's easier to read, I get this, which should give the same results (but not be any faster):
    UPDATE my_master aa
    SET    ( pay_date, last_mod_by, last_mod_date, verified_status ) =
           ( SELECT DATE '2007-09-03', 'S1', DATE '2008-02-22', 'Y'
             FROM   dtl_1 a
                  , dtl_2 b
             WHERE  a.acct_num = aa.acct_num
             AND    TRUNC(aa.dat1,'mm') < TRUNC(a.dat1,'mm')
             AND    b.nr_id = a.br_id )
    WHERE  acct_num =
           ( SELECT a.acct_num
             FROM   dtl_1 a
                  , dtl_2 b
             WHERE  a.acct_num = aa.acct_num
             AND    TRUNC(a.dat1,'mm') > TRUNC(aa.dat1,'mm')
             AND    b.nr_id = a.br_id )
    AND    dat1 <
           ( SELECT a.dat1
             FROM   dtl_1 a
                  , dtl_2 b
             WHERE  a.acct_num = aa.acct_num
             AND    TRUNC(a.dat1,'mm') > TRUNC(aa.dat1,'mm')
             AND    b.nr_id = a.br_id );If so, I'm a bit confused by the second subquery. Don't you already compare dat1 in the first subquery? I can't test this but isn't it the same as:
    UPDATE my_master aa
    SET    ( pay_date, last_mod_by, last_mod_date, verified_status ) =
           ( SELECT DATE '2007-09-03', 'S1', DATE '2008-02-22', 'Y'
             FROM   dtl_1 a
                  , dtl_2 b
             WHERE  a.acct_num = aa.acct_num
             AND    TRUNC(aa.dat1,'mm') < TRUNC(a.dat1,'mm')
             AND    b.nr_id = a.br_id )
    WHERE  EXISTS
           ( SELECT NULL
             FROM   dtl_1 a
                  , dtl_2 b
             WHERE  a.acct_num = aa.acct_num
             AND    TRUNC(a.dat1,'mm') > TRUNC(aa.dat1,'mm')
             AND a.dat1 > aa.dat1
             AND    b.nr_id = a.br_id );Although if a.dat1 is in a later month than aa.dat1 then the second check is redundant anyway.
    Message was edited by:
    William Robertson

  • Update query in sql taking more time

    Hi
    I am running an update query which takeing more time any help to run this fast.
    update arm538e_tmp t
    set t.qtr5 =(select (sum(nvl(m.net_sales_value,0))/1000) from mnthly_sales_actvty m
    where m.vndr#=t.vndr#
    and m.cust_type_cd=t.cust_type
    and m.cust_type_cd<>13
    and m.yymm between 201301 and 201303
    group by m.vndr#,m.cust_type_cd;
    help will be appreciable
    thank you

    This is the Reports forum. Ask this in the SQL and PL/SQL forum.

  • Update query which taking more time

    Hi
    I am running an update query which takeing more time any help to run this fast.
    update arm538e_tmp t
    set t.qtr5 =(select (sum(nvl(m.net_sales_value,0))/1000) from mnthly_sales_actvty m
    where m.vndr#=t.vndr#
    and m.cust_type_cd=t.cust_type
    and m.cust_type_cd<>13
    and m.yymm between 201301 and 201303
    group by m.vndr#,m.cust_type_cd;
    help will be appreciable
    thank you
    Edited by: 960991 on Apr 16, 2013 7:11 AM

    960991 wrote:
    Hi
    I am running an update query which takeing more time any help to run this fast.
    update arm538e_tmp t
    set t.qtr5 =(select (sum(nvl(m.net_sales_value,0))/1000) from mnthly_sales_actvty m
    where m.vndr#=t.vndr#
    and m.cust_type_cd=t.cust_type
    and m.cust_type_cd13
    and m.yymm between 201301 and 201303
    group by m.vndr#,m.cust_type_cd;
    help will be appreciable
    thank youUpdates with subqueries can be slow. Get an execution plan for the update to see what SQL is doing.
    Some things to look at ...
    1. Are you sure you posted the right SQL? I could not "balance" the parenthesis - 4 "(" and 3 ")"
    2. Unnecessary "(" ")" in the subquery "(sum" are confusing
    3. Updates with subqueries can be slow. The tqtr5 value seems to evaluate to a constant. You might improve performance by computing the value beforehand and using a variable instead of the subquery
    4. Subquery appears to be correlated - good! Make sure the subquery is properly indexed if it reads < 20% of the rows in the table (this figure depends on the version of Oracle)
    5. Is tqtr5 part of an index? It is a bad idea to update indexed columns

  • Update Process Very Slow in Oracle 8 which update bulk data

    Dear all
    i am just updating data through SQLsub-query,but i want to get to column from sub-query and need to update my source table, but there is problem is that through sub-query just return a single column while updating,but i don't wan't to re-type another query for another column due to performance issue.
    Also the other issued related performance is very slow,how should i fast update in bulk.
    Please suggest,
    Thanks

    Actually i am update time roster table with machine date, first i get from file & insert into Machine_table & then
    i make joing query & then update roster table which is like below.
    in roster table data consist 1 to last day of month of every employee.
    update roster a
    set (a.timein,a.timeout) = (select timein,timeout from machine_table mch
    where a.roster_date = mch.roster_date and a.person_id = mch.person_id);
    this query is updating around 7750 & it takes to much time.
    please help urgent thanks.

  • Updating Swing components from a different class

    I would like to use the JTextArea component in a JFrame to display fast updating text from my application. My application is very simple. When the app launches the GUI is created then my application engine would start processing and displaying text data into the GUI. After reading about Thread safety when using Swing components I concluded it would not be a good idea for my app engine class to update the JTextArea class directly using methods such as .append(String).
    I would be grateful for any suggestions on how I should approach updating Swing components from different classes.
    Many Thanks in advance Sean

    Hi
    Why don't you just implement a basic callback method?
    To do this the right way you should probably define a simple Interface that has a public method like updateProcessText(String s). Your swing class then implements this interface, basically forcing it to provide the public method you defined (this is no different than implementing ActionListener, which forces you to define actionPerformed). Secondly modify your processing class, so that it take's a class that implements the interface you just created, as one of the arguments in it's constructor. Lastly assign the argument from your construnctor to a private var - this will enable your processing class to have a handle to your swing class and update it as it pleases.
    This might sound very complex, but it's really simple once you've done it once.

  • PWM Update Rate using PXI 7334 & 6602 cards

    I have a NI 8176 controller and a PXI 7334 (FlexMotion) Motion Controller Card. I am using the PWM output to control an actuator and I would like to update the duty-cycle as frequently as possible.
    I have the card PWM frequency set to 32 kHz, but can only achieve 1.5 kHz update rate.
    The attached VI shows the code I'm using to write to the card.
    I also have a PXI 6602 card, I can achieve an update rate of 6.5 kHz with that, but I bought the 7334 card with the expectation of achieving a faster update rate.
    Any advice on how to improve the update rate of either card would be appreciated. Likewise, does anyone know another hardware set-up that would be a viable alternative?
    Many thanks,
    Brian
    Attachments:
    pwm_generation_with_7334_card_-_tick_method_of_speed_measurement.vi ‏50 KB
    PWM_Benchmark_V1.1.vi ‏112 KB

    Hi Amaury, thanks for the fp2 file, I’ve just moved site, got my lab back yesterday. (please watch the numbers 7344 and 7334 in the text below!)
    The FPGA2 firmware I had was Version 5.20.0001, MAX would not allow me to select the file 7344pwm.fp2, I got the message “This file is not valid for the Flexmotion board selected”.
    However, I went to C:\Program Files\National Instruments\Motion\FlexMotion\bin and deleted 7344.fp2
    I then renamed 7344pwm.fp2 to 7344.fp2 and copied it to the “bin” folder, then in MAX I selected new file to download, pointed to 7344.fp2 and successfully download the new firmware to my 7334 motion controller. Now in MAX the FPGA2 firmware version is 5.20.000f.
    Unfortunately I c
    an still only update the PWM duty-cycle on my 7334 at 3.6 kHz!
    Is this correct? do I need to update the file 7334.fp2 instead? or does the file 7344pwm.fp2 also work for the 7334 card?
    Also, is it possible to generate a PWM using the stepper motor output in open-loop mode? If so, do you have example code on how this is done?
    Thanks again for your help,
    Brian
    Regards
    Ray Farmer

  • Update table from another table

    I have two tables
    t1 t2
    a b c d e f
    1 2 3 1 1 11
    4 5 6 1 2 22
    7 8 9 7 1 33
    I would like to update t1.c with t2.f if t1.a = t2.d and t2.e = 1
    result:
    t1 t2
    a b c d e f
    1 2 11 1 1 11
    4 5 6 1 2 22
    7 8 33 7 1 33
    I tried
    update t1
    set c = (select f from t2 where t1.a = t2.d and t2.e = 1)
    but this nulls out column t1.c where a = 4, since there is no row in t2 with d=4.
    I then tried
    update t1
    set c = (select f from t2 where t1.a = t2.d and t2.e = 1)
    where a in (select d from t2 where e = 1)
    which worked, but took a lot longer (the real tables have a lot more rows)
    Is there a better way to only update rows in t1, where a row in t2 exists?
    Thanks, Salomon

    Try using exists instead of in and see if the update runs faster:
    update t1
    set c = (select f from t2 where t1.a = t2.d and t2.e = 1)
    where exists(select d from t2 where t1.a = t2.d and t2.e = 1)

  • Help with this update statement..

    Hi everyone,
    I am trying to update a column in a table .I need to update that column
    with a function that takes patient_nbr and type_x column values as a parameter.
    That table has almost "300,000" records. It is taking long time to complete
    almost 60 min to 90 min.
    Is it usual to take that much time to update that many records?
    I dont know why it is taking this much time.Please help with this update statement.
    select get_partner_id(SUBSTR(patient_nbr,1,9),type_x) partner_id from test_load;
    (it is just taking 20 - 30 sec)
    I am sure that it is not the problem with my function.
    I tried the following update and merge statements .Please correct me if i am wrong
    in the syntax and give me some suggestions how can i make the update statement fast.
    update test_load set partner_id = get_partner_id(SUBSTR(patient_nbr,1,9),type_x);
    merge into test_load a
    using (select patient_nbr,type_x from test_load) b
    on (a.patient_nbr = b.patient_nbr)
    when matched
    then
    update
    set a.partner_id = get_partner_id(SUBSTR(b.patient_nbr,1,9),b.type_x);
    there is a index on patient_nbr column
    and the statistics are gathered on this table.

    Hi Justin,
    As requested here are the explain plans for my update statements.Please correct if i am doing anything wrong.
    update test_load set partner_id = get_partner_id(SUBSTR(patient_nbr,1,9),type_x);
    "PLAN_TABLE_OUTPUT"
    "Plan hash value: 3793814442"
    "| Id  | Operation          | Name             | Rows  | Bytes | Cost (%CPU)| Time     |"
    "|   0 | UPDATE STATEMENT   |                  |   274K|  4552K|  1488   (1)| 00:00:18 |"
    "|   1 |  UPDATE            |        TEST_LOAD |       |       |            |          |"
    "|   2 |   TABLE ACCESS FULL|        TEST_LOAD |   274K|  4552K|  1488   (1)| 00:00:18 |"
    merge into test_load a
    using (select patient_nbr,type_x from test_load) b
    on (a.patient_nbr = b.patient_nbr)
    when matched
    then
    update
    set a.partner_id = get_partner_id(SUBSTR(b.patient_nbr,1,9),b.type_x);
    "PLAN_TABLE_OUTPUT"
    "Plan hash value: 1188928691"
    "| Id  | Operation            | Name             | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |"
    "|   0 | MERGE STATEMENT      |                  |   274K|  3213K|       |  6660   (1)| 00:01:20 |"
    "|   1 |  MERGE               |        TEST_LOAD |       |       |       |            |          |"
    "|   2 |   VIEW               |                  |       |       |       |            |          |"
    "|*  3 |    HASH JOIN         |                  |   274K|    43M|  7232K|  6660   (1)| 00:01:20 |"
    "|   4 |     TABLE ACCESS FULL|        TEST_LOAD |   274K|  4017K|       |  1482   (1)| 00:00:18 |"
    "|   5 |     TABLE ACCESS FULL|        TEST_LOAD |   274K|    40M|       |  1496   (2)| 00:00:18 |"
    "Predicate Information (identified by operation id):"
    "   3 - access("A"."patient_nbr"="patient_nbr")"Please give some suggestions..
    what's the best approach for doing the updates for huge tables?
    Thanks

Maybe you are looking for

  • Transaction code for product master - SNP

    What is the significance of CFM2 transaction and EXIT_SAPLCMAT_001 user exit.

  • Can someone shed some light in these Console messages?

    Hi, I opened Console and looked under the "All Messages" Header and I found the following 3 repetitive messages: 4/26/12 4:44:02 PM kernel NVRM: 0x702a called in D3 4/26/12 4:44:02 PM kernel NVRM: 0x702a called in D3 4/26/12 4:44:02 PM kernel NVRM: 0

  • Mapping Required

    Hi Experts, I have a file to IDoc scenario for Goods Receipts. I am receiving the good receipts in batch and the incoming  structure is given below- DT_SABRE_GoodsReceipts      GoodsReceiptsData   0.unbounded          Header                    0.1   

  • No sound on avi clips

    I am new to CS5 premier pro. I have avi clips on time line ( vid and audio waves ) but no sound. Have gone into preferences to determine proper output but to no avail?  Mind you clips play properly on widows media player and on Adobe On Location, als

  • Bulletin Board Possibilities

    Just a quick question. Is there the capability in the current iWeb or are there plans for a future version of iWeb to support the ability of a website to support a bulletin board or some forum feature? Thanks.