Best way to get sequence.next value in pl-sql/triggers

Hi,
I want to know the best practice about to get the sequence.next value in pl-sql procedures / triggers from the below two methods.
1. SELECT PRINT_BATCH_SEQ.NextVal INTO PSQNO FROM DUAL;
INSERT INTO TABLE R1TMP VALUES (PSQNO, '12-MAR-06');
2. INSERT INTO TABLE R1TMP VALUES (PRINT_BATCH_SEQ.NextVal, '12-MAR-06');
From the above two statements which one is best with respect to performance / parsing /memory usage.
Kindly give your suggession please.
Thanks,
Riaz.

Hi,
Thanks for your immediate reply.
My thought was
1. when we do like this, at the time of insert the cost of the operation will be more and this will lead some performance issue as bulk insert.
2. If we get it from dual and send the value as bind variable, then we can avoid the parsing of the sql.
Please correct me if i am wrong.
thanks,
riaz.

Similar Messages

  • When I'm done with my fcp sequence, whats the best way to get it to dvd?

    When I'm done with my fcp sequence, whats the best way to get it to dvd?

    The advice to go to Compressor left out the part that you may want to convert your audio to AC3 becaus ethe MPEG2 bitrate is probably too high for DVD specs.
    This method is in the DVDSP manual and it's in the Compressor manual, both difficult to locate, but easily searchable.
    Here's what I'd do: Export the timeline form FCP in the native sequence settings, self-contained. Bring that self-contained movie into DVDSP and let DVDSP handle the transcode.
    The advice to go to iDVD is even easier.
    bogiesan

  • Best way to get the values of local variables

    What is currently the best way to get the values of local variables. I know it is not currently possible to set watchpoints on local variables, but what are the best workarounds?

    You have to use StackFrame methods, eg, visibleVariables and getValues. To get a StackFrame for a thread, that thread has to be suspended, eg, by a BreakpointEvent.

  • Whats the best way to get the server name in a servlet deployed to a cluster?

              Hi,
              I have a servlet in a web application that is deployed to a cluster, just
              wondering what is the best way to get the name of the node that the server is
              running on at run time??
              Thanks
              

              Please try to modify the following code and test for your purpose: (check Weblogic
              class document for detail)
              import javax.naming.*;
              import weblogic.jndi.*;
              import weblogic.management.*;
              import weblogic.management.configuration.*;
              import weblogic.management.runtime.*;
              MBeanHome home = null;
                   try{
                        //The Environment class represents the properties used to create
                             //an initial Context. DEfault constructor constructs an Environment
                             //with default properties, that is, with a WebLogic initial context.
                             //If unset, the properties for principal and credentials default to
                             //guest/guest, and the provider URL defaults to "t3://localhost:7001".
                             Environment env = new Environment();
                             //Sets the Context.PROVIDER_URL property value to the value of
                             //the argument url.
                             if(admin_url!=null){
                                  env.setProviderUrl(admin_url);
                                  //Sets the Context.SECURITY_PRINCIPAL property to the value of
                                  //the argument principal.
                                  env.setSecurityPrincipal(username);
                                  //Sets the value of the Context.SECURITY_CREDENTIAL property to
                                  //the value of the argument cedentials
                                  env.setSecurityCredentials(password);
                                  //Returns an initial context based on the properties in an Environment.
                                  ctx = env.getInitialContext();
                             }else ctx = new InitialContext();
                             home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
                             ctx.close(); //free resource
                             // or if looking up a specific MBeanHome
                             //home = (MBeanHome) ctx.lookup(MBeanHome.JNDI_NAME + "." + serverName);
                             DomainMBean dmb = home.getActiveDomain(); //Get Active Domain
                             ServerMBean[] sbeans = dmb.getServers(); //Get all servers
                             if(sbeans!=null){
                                  for(int s1=0; s1<sbeans.length; s1++){
                                       String privip = sbeans[s1].getListenAddress();
                                  sbeans[s1].getName();
                             sbeans[s1].getListenPort();
                                                 WebServerMBean wmb = sbeans[s1].getWebServer();
                   }catch(Exception ex){
              "Gao Jun" <[email protected]> wrote:
              >Is there any sample code? Thanks
              >
              >Best Regards,
              >Jun Gao
              >
              >"Xiang Rao" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Sure. You can use the Weblogic management APIs to query ServerBean.
              >>
              >>
              >> "Me" <[email protected]> wrote:
              >> >
              >> >Thanks for your reply, i was hoping to find a better way for example
              >> >a class in
              >> >weblogic API.
              >> >
              >> >Thanks
              >> >
              >> >"Xiang Rao" <[email protected]> wrote:
              >> >>
              >> >>Physical: InetAddress.getLocalHost().getHostName()
              >> >>Weblogic: System.getProperty("weblogic.Name");
              >> >>
              >> >>
              >> >>"Me" <[email protected]> wrote:
              >> >>>
              >> >>>Hi,
              >> >>> I have a servlet in a web application that is deployed to a
              >cluster,
              >> >>>just
              >> >>>wondering what is the best way to get the name of the node that
              >the
              >> >>server
              >> >>>is
              >> >>>running on at run time??
              >> >>>
              >> >>>Thanks
              >> >>
              >> >
              >>
              >
              >
              

  • What is the best way to get a tune created in GB for iPad into iMovie for iPad?

    What is the best way to get a tune created in GB for iPad into iMovie for iPad?

    Haven't done it myself, but seems like the correct workflow would be:
    From GarageBand (iOS), My Songs -> select song -> Send to iTunes
    From iMovie HD (iOS), My Project -> Insert Media -> select by song name
    I'm not sure if GB creates its own playlist for tagging exported songs in your iTunes library so selecting by name would be the next-best method.
    Have you tried this?

  • Are there any ways to get sequence number other than getting it for each re

    are there any ways to get sequence number other than getting it for each record

    CACHE is the number of values Oracle stores in memory. So the first call to NEXTVAL Oracle grabs x numbers; subsequent calls to NEXTVAL are served from memory until they're all gone and them another bunch is grabbed. The attached sql*plus output demonstrates this behaviour.
    Note that normally unused numbers in the cache are returned to the data dictionary but in exceptional circumstances (DB crash) they may be lost.
    Cheers, APC
    SQL> create sequence seq cache 3
      2  /
    Sequence created.
    SQL> select last_number from user_sequences
      2  where sequence_name = 'SEQ'
      3  /
    LAST_NUMBER
              1
    SQL> select seq.nextval from dual
      2  /
       NEXTVAL
             1
    SQL> select last_number from user_sequences
      2  where sequence_name = 'SEQ'
      3  /
    LAST_NUMBER
              4
    SQL> select seq.nextval from dual
      2  /
       NEXTVAL
             2
    SQL> select last_number from user_sequences
      2  where sequence_name = 'SEQ'
      3  /
    LAST_NUMBER
              4
    SQL> select seq.nextval from dual
      2  /
       NEXTVAL
             3
    SQL> select last_number from user_sequences
      2  where sequence_name = 'SEQ'
      3  /
    LAST_NUMBER
              4
    SQL> select seq.nextval from dual
      2  /
       NEXTVAL
             4
    SQL> select last_number from user_sequences
      2  where sequence_name = 'SEQ'
      3  /
    LAST_NUMBER
              7
    SQL>

  • Best way to get LARGE (multi-DVD) project to show on a TV?

    My wife has compiled an iMovie '09 project that has about 42 hours worth of dance videos.  The project consists of many clips of all sorts of esoteric dancing, with a brief fade between each one.  It looks fine on her iMac.  She wants to show these videos on a TV at the "Dance Ladies Retreat" that is coming up in a couple months.  Some ideas we've considered are:
    Buying her a new MacBook, and moving the iMovie project over via Firewire, Ethernet cable, or similar.  Then taking the MacBook to the event, and hooking it up to the TV via cable.  This method will be very expensive.
    Saving the project on a 256 giga-byte USB drive.  First we'd have to get this mondo iMovie project into a format that would work on a PC laptop, which could then be attached to the TV.  Not sure how to get the iMovie project into a PC-readable format.
    Break the mondo iMovie project up into DVD-size chunks.  My wife bought Aimersoft DVD Creator, which we may try to use if we decide to split the iMovie project up into a number of DVDs, but I'm not sure if it can merge movie clips.
    Any ideas would be appreciated.
    Thank you
    ATB

    Geoff: Thank you for your reply!  I downloaded VLC Player and was able to read a DVD's worth of my wife's project that she had copied onto Aimersoft's DVD Creator software.  First I saved the Aimersoft DVD Creator file onto my flash drive, and tried to play it on my PC with Media Player.  No joy.  VLC-Player worked like a champ!
    OK, now I need to figure out the next piece of the puzzle, which is the best way to get all of her work onto this single, 256 Gb flash drive that we have on order from Amazon.  The ultimate plan is to store the entire iMovie output onto the 256 Gb flash drive, and play it using my ASUS laptop through an HDMI cable.  Looks like we have two main choices for this:
    Copy all of her iMovie project onto DVD Creator, and save these onto the big flash drive.  This has the advantage of breaking her project up into manageable chunks, but will VLC Player be able to play those chunks sequentially?
    Stay with iMovie, and "share" her project onto the 256 Gb flash drive.  Maybe first we should split the huge project up into several smaller projects, perhaps 4 hours each.  A couple questions here: what do you think would be the nominal size for breaking up the huge project, and what would be the best option for saving the movie using "share."
    Thank you very much.  By the way, I found a nice explanation of the features and uses of iMovie 09 (that's the one we have) at this web site: http://www.kenstone.net/fcp_homepage/imovie_09_stone.html
    Thank you
    ATB

  • Best Way to Create Array of Values From ArrayCollection

    I often use Arrays of values from ArrayCollections in my
    application in order to facilitate faster performance when
    filtering other Collections.
    For instance, let's say I have an ArrayCollection of Objects
    with the properties "id", "name", "label", and "isActive". What
    would be the best way to get an Array of all the "id" values?
    Right now, I am looping over the ArrayCollection, and adding
    the value of the property I need to an Array using Array.push().
    For larger Collections, this seems like overkill. I was wondering
    if anyone knew of some quicker way to get an Array of values of one
    property from an Array Collection.
    My current method for doing this is attached below...
    Thanks.

    No, that won't work - toArray() simply returns the entire
    Collection as an Array.

  • Best way to get quality DVD

    I just finished a short (7-min) video, mostly of hi-res still images. What is the best way to get this thing onto DVD and looking it's best?
    Thank you!

    I have done a couple DVD's of a 2 hour long video of a three camera shoot and they came out pretty good... so this is how I did it.
    I am assuming your project settings are for DV/NTSC. That being the case, I simply used the Export QuickTime Movie feature in the file menu. When the prompt comes up, it should default to Current Settings on the "Settings" drop down menu. Click ok, and voila, you will have a .mov movie file of your sequence in DV/NTSC specs. Also, I should add, that if you are setting up chapter markers in FCP, select which markers you would like to use in the appropriate drop down menu.
    From here, just import the .mov file into iDVD or DVD Studio Pro and make the DVD. I have used both DVD authoring programs, and they both come out looking great.
    If you want to go HD, or maybe convert to PAL format, or whatever, just select the setting you want in the prompt box for Export QuickTime Movie in FCP.
    It has worked for me so far and the DVD's look great. Hope this helps.
    Good Luck!

  • HT1349 I lost/had my iPhone stolen. Tried using Find My iPhone and it's offline. It was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Tried using Find My iPhone and it's offline. It (Find my iPhone) was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Find My iPhone is good for misplaced iPhone but not good for thief and it was never meant to be.
    You chance of getting it back is very small.
    There are a few things you can try.
    Try remote lock/wipe your iPhone through Find My iPhone.
    https://www.icloud.com
    You can report to the police, cell carrier (expensive cell charges for international calls, roaming etc)
    Change all the passwords used in iPhone: Apple ID, E-mail, Bank Account ....
    http://support.apple.com/kb/HT2526

  • What's the best way to get user testing of our app (we're based in the UK)

    Hi all.
    We've just developed our first app for Palm and would really like to get some feedback from Palm users (our app allows users to take photos and send them as real printed postcards. We'd be very happy to give users free postcards in exchange for feedback).
    The problem we have is that Palm users are pretty sparse in the UK. We've found that user testing with non-Palm users becomes handset testing rather than app testing. We have to teach them how to use Palm ("Where's the back button?") and so the testing mainly focuses on the particularities of Palm rather than our app. Plus, we don't benefit from the user being able to compare to other Palm apps.
    Any advice on the best way to get feedback from Palm users? Especially as they'll need to download the SDK and install our app using it in order to get it onto their phones.
    If any of the users of this forum are interested in giving the app a go and sending us feedback, I'd love to send you the IPK and then chat. Just send me an email using [email protected]
    Our app is available for Pixi+, Pre+ and Pre2.
     Thanks,
     Freddie.
    Post relates to: Pixi Plus p121ueu (SFR)

    Hello freddie:
    Welcome to the Palm Forums. Thank You for the offer. I highly suggest offering it up
    to our many enthusiasts on Twitter as a beta with the #webos hashtag or joining
    the Precentral.net community and list it in a topic there, homebrew beta. You would
    get better beta response if you Package your app and put it in an ipk to simplify
    the install.
    Hope that helps... Best of luck with your app!
    notimeoff

  • How can I get the default value of a particular preference programatically. I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    How can I get the default value of a particular preference in FireFox?.
    I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
    I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
    Any help towards acheiving this programtically is greatly appreciated.
    If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Dear Friend,
    Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
    Then you can get the value from the outparameter using callablestatement.getXXX().
    Try that way.
    For free tral versions of JDBC Drivers go to www.Atinav.com

  • Best way to give a default value to a New Column with existing rows

    Adding some columns to SQL tables with existing data rows. There are also views created from these tables. The views are used in some report/query software so NULL values are not good. Interested in learning about the best way to set a default value. 
    These are the ways that I can think of
    1) ALTER TABLE using the DEFAULT to add the column and set the default value
    ++ Adds a constraint which is not terrible. Constraints are just not used much in this shop.
    2) ALTER TABLE to add the column then do an UPDATE statement to update the values
    ++ might be an issue for tables with millions of rows
    3) ALTER TABLE to add the column then use ISNULL in the CREATE VIEW

    It is a large table with 444 columns and max row size of 2268. 907k records took 1 minute 38 seconds to UPDATE the column. I have about 12 fields to add to this table and about 44 tables (not all this large of course) so it will take some time to
    UPDATE.  Although ... i just tried updating 3 columns in a single UPDATE and it took 1 minute 36 seconds. So If I did all 12 fields in a single UPDATE it would be about the same time as a single Field.  I will think about it.

  • HT3775 I NEED I TUNES FOR A 64 BIT PC. OPERATING SYSTEM IS WINDOWS 8, NON TOUCH SCREEN. WHICH IS THE ABSOLUTELY BEST WAY TO GET ITUNES OPERATING CORRECTLY ON MY PC????//I HAVE TRIED SEVERAL THINGS, NONE OF WHICH ARE WORKING. IS ITUNES DELIBERATELY EXCLUDI

    I cannot get itunes to work/install on myPC. I am running windows 8 in a 64 bit machine. I also want to purchase books via itunes for my Nook. Are you deliberately excluding PC owners so we cannot use ituens on our computers???? I have selected a community but have no idea what community I should be working with. Can somone explai these communities to me? Also. you don't allow much time to go thru the sign up process. I had to start over SEVERAL times as you kept timing me out. Jesus...when people are signing up for the first time, we have no idea of the questions that will be asked. Give us a break and give us time to sign up. Not everone is disability free and able to go thru your process quickly...you are NOT user friendly. You should be for people who are wanting to join your community. I used to want an Apple product but now that  I have had first hand experience with your web page, I think I will probably stay away from Apple products. VERY DISAPPOINTING

    Jan 11, 2014 10:26 AM  Re: I NEED I TUNES FOR A 64 BIT PC. OPERATING SYSTEM IS WINDOWS 8, NON TOUCH SCREEN. WHICH IS THE ABSOLUTELY BEST WAY TO GET ITUNES OPERATING CORRECTLY ON MY PC????//I HAVE TRIED SEVERAL THINGS, NONE OF WHICH ARE WORKING. IS ITUNES DELIBERATELY EXCLUDING
      Re: I NEED I TUNES FOR A 64 BIT PC. OPERATING SYSTEM IS WINDOWS 8, NON TOUCH SCREEN. WHICH IS THE ABSOLUTELY BEST WAY TO GET ITUNES OPERATING CORRECTLY ON MY PC????//I HAVE TRIED SEVERAL THINGS, NONE OF WHICH ARE WORKING. IS ITUNES DELIBERATELY EXCLUDING PC'S  in response to Birdlover1      
    Post over in the iTunes for Windows forum, here:
    https://discussions.apple.com/community/itunes/itunes_for_windows
    sebastian

  • Starting Fresh With iTunes 9.0.1...best way to get music back in/import?

    Had some library troubles with iTunes 9, and decided to do a clean install of not only the program, but of Snow Leopard itself. I was waiting on an iTunes update to come out before I decided to re-load my library in, since I didn't want to risk repeat problems (I've always been one of those bleeding edge-ers, and this is the 1st time I've ever had a problem/held back...guess I learned my lesson). 9.0.1 is out and seems to address the problems I'd been having, but I caught the "start fresh" bug and I want to start over with iTunes. No playlists, play counts, etc need to be saved.
    I do have a full backup of my previous system (thanks SuperDuper!), and I'm wondering what the best way to get all of my music back into iTunes is.
    -Do I use the Finder to simply drag the contents of my old "iTunes Music" folder into the new "iTunes Media" folder?
    -Do I drag the whole folder and drop it onto the iTunes window? (I'm worried this method won't put iPhone apps, ringtones, audiobooks and podcasts in the right place).
    -Do I use the import function?
    Notes: prior to making the backup, I did upgrade to/select iTunes Media Organization
    I did see THIS article: http://support.apple.com/kb/HT1451 but it says it's old and I wonder if it applies to iTunes 9.
    Thanks for any help!

    You might want to check that your certificate that you made has been applied to iTunes.app
    try this code in Terminal"
    codesign -dvvvv /Application/iTunes.app
    Does the name on the certificate match the one you created?

Maybe you are looking for

  • Most of the Soundtrack Loops Won't Play! HELP!

    Hello everyone. I just got my new macbook pro in today and I started up soundtrack. I tried playing some loops but they are mostly all the color red and won't play. They are .aiff files and they are all red! Help! Is this problem a software problem o

  • Nokia 6230 - no sound through speaker

    Hi everyone, I'm using a UK Nokia 6230 on v04.28. For a few weeks now I've been having trouble with the speaker. Ringtones, videos and mp3's will not work at all. Keyboard tones work fine. Phone hasn't had a drop or contact with water or anything. I

  • HT1212 i forgot my passcode where can i find it

    i forgot my passcode how can i get it back

  • IPhoto won't quit! Empty trash with 8000 +....

    Cleaned up iPhoto, deleting, now have 8000+ images in iPhoto trash. Click iPhoto Trash>Empty Trash, and separate upper right "Empty Trash" button... neither one will dump all these photos.... And the program freezes with swirling after the box shows

  • Variable in regex replace pattern

    Hi, I need to use a variable in a regex replace pattern - how can I do it? Specifically, I need to pass arguments to a shell script that then uses that argument in a replace pattern: #!/bin/bash #$1 now holds the argument sed 's/searchpattern/replace