Best practices with the sliders with loops

I have the following code:

Declare

    CURSOR c_contacts_cursor
    IS
      SELECT OUTLET_CODE,
        OUTLET_NAME,
        CONTACT_NAME,
        MOBILE_NO,
        ALT_NO,
        ADDRESS1,
        ADDRESS2,
        CITY,
        POSTCODE,
        EMAIL
      FROM SYNC_CONTACTS
      WHERE (source      = 'W' OR SOURCE = 'T') AND SURVIVAL_FLAG = 'Y';

    TYPE temp_string IS TABLE OF VARCHAR2 (2000);
        
    V_OUTLET_CODE  temp_string;
    V_OUTLET_NAME  temp_string;
    V_CONTACT_NAME temp_string;
    V_MOBILE_NO    temp_string;
    V_ALT_NO       temp_string;
    V_ADDRESS1     temp_string;
    V_ADDRESS2     temp_string;
    V_CITY         temp_string;
    V_POSTCODE     temp_string;
    V_EMAIL        temp_string;
       
BEGIN

    OPEN c_contacts_cursor;
    FETCH c_contacts_cursor BULK COLLECT INTO
    V_OUTLET_CODE,
    V_OUTLET_NAME,
    V_CONTACT_NAME,
    V_MOBILE_NO,
    V_ALT_NO,
    V_ADDRESS1,
    V_ADDRESS2,
    V_CITY,
    V_POSTCODE,
    V_EMAIL;
    CLOSE c_contacts_cursor;

    FOR indx IN 1 .. V_OUTLET_CODE.count
    LOOP
      --xecutable statements on V_OUTLET_CODE(indx) and the like

    END LOOP;
End;

I used the above structure at length in many functions and procedures of all associated with an application and works very well. However, I began to review my code and I thought he might be better way to do it. One of the methods I've found is cursor for loop: http://www.techonthenet.com/oracle/loops/cursor_for.php

and http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/cursor_for_loop_statement.htm#LNPLS1155

I'm trying to understand the advantages and disadvantages of each method. I get the following (rating my approach is, and cursor for loop is B

(1) A is faster because it uses in BULK COLLECT IN as opposed to B which is implicitly opens, fetch a row and close each round loop.

(2) A is a bit messy, a lot more code as opposed to B which is readable, ranger.

First of all, I would like to know, if my conclusions are correct or not?

Second, what other differences might be between the two?

Third, is there another approach, that I'm not aware? Or what improvement could be applied to my approach, if there is?

Hawk333 wrote:

Yes, I did. Executable statements are most HTTP POST and PUT request that write in MongoDB on a platform that does not write in BULK. So I have to write one record per HTTP request.

Then pass PL/SQL to run multipe HTTP put and recorded at the same time. In which case manual removal bulk buys you no performance gain and zero scalability.

Use DBMS_PARALLEL_EXECUTE to chunk the workload. Execute each thread (parallel work process) using a standard FOR cursor loop (for example for loop in(select...) end of loop; c...) --and inside the loop, make HTTP calls.

Tags: Database

Similar Questions

  • vSpere 5 Networking of best practices for the use of 4 to 1 GB NIC?

    Hello

    I'm looking for a networking of best practices for the use of 4-1 GB NIC with vSphere 5. I know there are a lot of good practice using 10 GB, but our current config does support only 1 GB. I need to include the management, vMotion, Virtual Machine (VM) and iSCSi. If there are others you would recommend, please let me know.

    I found a diagram that resembles what I need, but it's for 10 GB. I think it works...

    vSphere 5 - 10GbE SegmentedNetworks Ent Design v0_4.jpg(I had this pattern HERE - rights go to Paul Kelly)

    My next question is how much of a traffic load is each object take through the network, percentage wise?

    For example, 'Management' is very small and the only time where it is in use is during the installation of the agent. Then it uses 70%.

    I need the percentage of bandwidth, if possible.

    If anyone out there can help me, that would be so awesome.

    Thank you!

    -Erich

    Without knowing your environment, it would be impossible to give you an idea of the uses of bandwidth.

    That said if you had about 10-15 virtual machines per host with this configuration, you should be fine.

    Sent from my iPhone

  • Best practices for the compression of the image in dps

    Hello! I read up on best practices for the compression of the image in dps and I read the asset from the source of panoramas, sequences of images, Pan and zoom images and audio skins is resampled not downloading. You will need to resize them and compress them before deleting the in your article, because the dps do not do it for you. Hey can do!

    So Im also read as he active source of slideshows, scrolling images, and buttons ARE resampled as PNG images. Does this mean that DPS will compress for you when you build the article? Does this say I shouldn't worth going bother to resize these images at all? I can just pop in 300 DPI files 15 MB used in the print magazine and dps will compress their construction article - and this will have no effect on the size of the file?

    And this is also the case with static background images?


    Thanks for your help!

    All images are automatically resampled to based on the size of the folio you do. You can put in any image resolution you want, it's not serious.

    Neil

  • What is the best practice for the enumeration for the ADF?

    Dear all,

    What is the best practice for the enumeration for the ADF?

    I need to add the enumeration to my request. ex: sex, marital status.

    How to deliver? Declarative custom components or is there another way?

    Thank you.
    Angelique

    Check out this topic - '5.3 fill view object Rows with static data' in Guide of Dev
    http://download.Oracle.com/docs/CD/E17904_01/Web.1111/b31974/bcquerying.htm#CEGCGFCA

  • best practices for the storage of the vm and vhd

    no doubt this question has been answered not once... Sorry

    I would like to know the best practice for the storage of the vm and its virtual hard disk to a SAN.

    Any show advantage does make sense to keep them on separate LUNS?

    Thank you.

    It will really depend on the application of the virtual machine - but for most of the applications no problem by storing everything on the same data store

  • Best practices for the use of reserved words

    Hello
    What is the best practice for the use of the reserved words as column names.
    For example if I insisted on the use of the word to a column name comment as follows:

    CREATE TABLE...
    VARCHAR2 (4000) "COMMENT."
    ...

    What is the impact on the track I could expect and what problems should I be informed when doing something like that?

    Thank you
    Ben

    The best practice is NOT to use reserved words anywhere.
    Developers are human beings human. Humans have their moments to forget things.
    They will not forget to use the "", or you can force it to use the "' everywhere.
    The two methods are Oracle certified ways to end up in hell.

    ----------
    Sybrand Bakker
    Senior Oracle DBA

  • The best practices with only 4 cards network network

    I'm used to esx with fiber channel without configuration.  This will be my first experience connecting esx to an iscsi san.

    I just have 4 network cards on the server and wonder what is the best practice.

    I think that 2 of the 4 network cards will be dedicated to the San for HA.

    But the other 2 types of throw me a loop for.

    I know I want to console, vmotion and trunk for VLANs, but I don't think I can have all 3 on the same vswitch?

    Am I stuck with having the console and vmotion on a network card and the trunk of the other?  IE - no failover?

    Is there anyway to get console, vmotion and trunk at all exist together?

    Thank you in advance.

    If it were an election, I vote for Josh26

    Just a few additions to his recommendation:

    vSwitch0:

    2 natachasery connected to the ports of the trunk on the pSwitch (vmnic0, vmnic1)

    Service - VLANxxx - Portgroup (vmnic0, vmnic1 active standby) Console

    VMkernel Portgroup for vMotion - VLANyyy - (vmnic0 vmnic1 standby, active)

    Machine Virtual Network - VLANzzz - (vmnic0, vmnic1 active standby)

    vSwitch1:

    2 natachasery (vmnic2, vmnic3)

    VMkKernel Portgroup for iSCSI

    With the above configuration you separate iSCSI traffic, what is most important.

    SC and the VM network share a teddy and vMotion has its dedicated Teddy.

    Everything is redundant.

    André

  • Best practices with the virtual directories CFIDE and Jakarta

    Right now I'm going through implementation of our new virtualized ColdFusion 10 Application/Web/database server, and I noticed that during installation, since I had 'Connect all IIS sites' selected, he created maps of handler for each, but each also gave a virtual directory for "CFIDE" and "Jakarta".

    Best practices guides told to restrict access to the "adminapi', 'administrator', 'componentutils' and 'wizards' records under the CFIDE directory, but is - it safe to simply remove these virtual directories (and leave the mappings Manager) so that sites can always treat the types of file associated with CF?

    1 the site we have is the default localhost is linked to, I felt I would just let these virtual directories, since to reach CF ACP this server, we'd have to goto: http://localhost/CFIDE/administrator/index.cfm

    I know that if a file from a site needs to access things like file CFScripts, CF will automatically take the virtual directory is there and create < script > tags use a src of "/ CFIDE/scripts" (which if I remove this virtual directory, would break the functionality, but assuming that I do not use this technology to other sites) It removes "CFIDE" and "Jakarta" is going to hurt anything?

    Look at the Guide of ColdFusion 9 Lockdown that Pete Freitag wrote.  A large part of it still applies to the 10 ColdFusion, especially security aspects of IIS.  There is an article on the creation of filters of aggregate demand which allows you to block access to most (or all) of the subdirectories in CFIDE.

    Regarding the Jakarta virtual directory, you need this one.  That's what allows the IIS connector to function.

    -Carl V.

  • Best practices with streams WCCP of WAAS

    Hello

    I have a module WAAS SRE 910 in 2911 router that intercepts packets this router with WCCP.

    All packets are received by the external interface (gi 0/2, connected to a switch with port configured in vlan WCCP) and are sent back to the router via the internal interface (IG 1/0 connected directly to the router):

    WAAS # sh interface IG 1/0

    Internet address: 10.0.1.1

    Subnet mask: 255.255.255.0

    State of the admin: to the top

    Operating status: running

    Maximum transfer unit size: 1500

    Entry errors: 0

    Entry packets dropped: 0

    Packets received: 20631

    Output errors: 0

    Output packets dropped: 0

    Load interval: 30

    Input rate: 239 bps, 0 packets/s

    Output: 3270892 bps, 592 packets/s

    Packets sent: 110062

    Auto-negotiation: on

    Full Duplex: Yes

    Speed: 1000 Mbit/s

    WAAS # sh interface 2/0 gi

    Internet address: 10.0.2.1

    Subnet mask: 255.255.255.0

    State of the admin: to the top

    Operating status: running

    Maximum transfer unit size: 1500

    Entry errors: 0

    Entry packets dropped: 0

    Packets received: 86558

    Output errors: 0

    Output packets dropped: 0

    Load interval: 30

    Input rate: 2519130 bps, 579 packets/s

    Output rate: 3431 bps, 2 packets/sec

    Packets sent: 1580

    Auto-negotiation: on

    Full Duplex: Yes

    Speed: 100 Mbps

    The default route configured in module WAAS is 0.0.0.0/0 to 10.0.1.254 (interface of the router).

    It would be better that the packets leave module WAAS of the external interface (instead of the internal interface)?

    Is there a best practice recommended by Cisco on this?

    Thank you.

    Stéphane

    Hi Stephane,

    That's right, internal interface means SM1/0.

    The best way is to have traffic at the start of the internal interface module so that we are sure, it hits the redirect exclude statement and that we do not have the crest of the loops because WCCP.

    Kind regards

    Nicolas

  • Best practices with two natachasery

    Hello

    I'll put up a small environment Vi3 with two HP DL380 G5 machines ESX and NFS on NetApp for storage. This must be installed in a field of laboratory and serve as both a learning platform Vi3, we, the admins and a test environment for some of our customers run their own virtual machines with the test software and others. For this purpose, safety is a higher priority than redundancy, roughly equal performance. What is a decent way to implement the two natachasery for this configuration?

    vSwitch0 and pNIC1:

    -VMkernel (vMotion and NFS)

    -Console service

    vSwitch1 and pNIC2:

    -VM network

    This would obviously no redundancy (not counting the vMotion between hosts) but separate VM and non - VM traffic. Is there anything else I should be concerned?

    Thanks in advance,

    Daniel

    Hi Daniel,.

    Available seems very well, simply create a trade.

    (Depends on the load, you might want to consider making another Nic dual or quad). I have 2 natachasery for virtual machines and 2 for NFS...

    Here is a great link to the blog created by Texiwill: (best practices for up to 8 NIC explained)

    It was useful for me (thanks Texiwill..!)

    http://www.astroarch.com/wiki/index.php/Blog_Roll#Cisco_Subnet_-_Blue_Gears_-_Virtual_Networking

    Alex

  • Best practices for the application of sharpness in your workflow

    Recently I tried to get a better understanding of some of the best practices for sharpening in a workflow. I guess that I didn't know, but there are several places to sharpen. Who are the best? They are additive?

    My typical workflow involves capture an image with a professional DSLR in RAW or JPEG or import into Lightroom and export to a JPEG file for the screen or printing of two lab and local. 

    There are three places in this workflow to add sharpening. In the DSLR manually into Lightroom and when exporting a JPEG file or print directly from Lightroom

    It is my understanding that sharpening is added to RAW images even if you add sharpening in your DSLR. However sharpening will be added to the JPEG from the camera. 

    Back to my question, it is preferable to manually the sharpness in the SLR in Lightroom or wait until you export or output of your printer or final JPEG file. And additive effects? If I add sharpening to the three places I am probably more sharpening?

    You have to treat them differently both formats. Data BULLIES never have any sharpening applied by the camera, only JPEG files. Sharpening is often considered to be a workflow where there are three steps (see here for a seminal paper on this idea).

    I. a step sharpening of capture which compensates for the loss of sharp in detail due to the Bayer matrix and the filter anti-repliement and sometimes the lens or diffraction.

    II. A creative sharpening step where some details in the image are 'highlighted' sharpness (do you eyelashes on a model's face), and

    III. output sharpening, where you fix the loss of sharpness due to the scale/resampling for the properties of the average output (as blur because of an impression how process works or blurry because of the way that a screen LCD sets out its pixels).

    These three are implemented in Lightroom. I. and II. are essential, and basically must always be performed. II. until your creative minds. I. is the sharpening that see you in the Panel to develop. You need zoom at 1:1 and optimize the settings. The default settings are OK but quite conservative. Usually you can increase the value of the mask a little so that you're not sharpen noise and play with the other three sliders. Jeff Schewe gives an overview of a strategy simple to find the optimal settings here. It is for the cab, but the principle remains the same. Most of the photos will benefit from optimization a bit. Don't go overboard, but just OK for smoothness to 1:1.

    Stage II as I have said, is not essential, but it can be done using the local adjustment brush, or you can go to Photoshop for this. Stage III, however, is very essential. This is done in the export, the print panel Panel or the web. You can't really get a glimpse of these things (especially the sharpening printing-oriented) and it will take a little experimentation to see what you like.

    For jpeg, sharpening is done already in the camera. You could add a small extra capture sharpening in some cases, or simply lowering the sharpening in camera and then have more control in the post, but generally, it is best to leave it alone. Stage II and III, however, are still necessary.

  • Best practices for the design of a printing environment?

    Greetings,

    If there is a better place for this, please let me know.

    Objective:

    Redesign and redeploy my printing environment with best practices in mind.


    Overview: VMWare environment running 2008 R2, with about 200 printers. I have a majority of printers HP ranging from 10 years old again. LaserJet MFP, OfficeJets, etc... etc... In addition to the copiers Konica, Xerox and Savin. Many of our models of printer are not taken in charge in 2008, and still less x 64.

    Our future goals include services eprint, as well as the desire to manage the print quality, and levels of consumition by something like Web Jetadmin.

    Currently we have a 2003 Server x 86 server running our printers very old and 6 months ago the rest on a single x 64 server 2008r2. We ended up not giving it the attention to detail, it is necessary and pilots have become very congested, this led to a PCL6 only, UPD update that ended up corrupting several drivers through the UPD PCL 5 and 6 of the spectrum. At this time, we brought a second server 2008r2 and began to emigrate to those affected. In some cases, we were forced to remove manually the drivers off the customer system32-> coil-> driver and reinstall.

    I've not had much luck finding good best practice information and thought I'd ask. Some documents I came across suggested that I should isolate a universal driver to a single server, such as 3 servers for PCL5, PCL6, and Psalm then, there is the need to deal with my various copiers.

    I appreciate your advice, thank you!

    This forum focuses on the level of consumer products.  For your question you can have the best results in the forum HP Enterprise here.

  • Best practices for the firmware update 40 + switches

    Hello.

    I need for firmware (and boot code) updated over 40 switches PowerConnect (mainly 5324).

    What is the best practice on that?

    I tried to download and install Dell OpenManage Network Manager, but it seems like an application of 'disorder' for someone who doesn't know. I threw a look at the demo of Dell for the application, but the quality is very bad and it is a version different than the one I downloaded (V3.0.1.15) you cannot use the guides directly.

    Are there other options that manual session opening, then TFTP the new firmware and boot code? Or can someone a link to a valid demo or documentation that can help me with the work?

    Thanks in advance.


  • Best practices for the application of page multi Landscape/Portrait

    Hello
    I am looking for information on track to develop auto guide demand in pure actionscript with new components of qnx.fuse, but there is not a good example in real code. Every time I tried to make it resizable layout to get deformated fluid only components in portrait or landscape mode.

    I have a simple application with the point main and 3 displays:

    public class Main extends NavigatorSprite
    {
        public function Main()
        {
            addEventListener(Event.ADDED_TO_STAGE, init); 
    
            stage.nativeWindow.visible = true;
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            stage.nativeWindow.activate();
        }
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
            navigator.pushView(View1);
        }
    }
    
    public class View1 extends ViewSprite
    {
    
        private var container:Container;
        private var button_two:LabelButton;
        private var button_three:LabelButton;
    
        public function View1
        {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
    
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
    
            container = new Container();
            var layout:RowLayout = new RowLayout();
            container.layout = layout;
    
            button_two = new LabelButton();
            button_two.label = "to page 2";
            button_two.width = 150;
            button_two.height = 45;
            button_two.addEventListener(MouseEvent.CLICK, handleTwoClicked);
            container.addChild(button_two);
    
            button_three = new LabelButton();
            button_three.label = "to page 3";
            button_three.width = 150;
            button_three.height = 45;
            button_three.addEventListener(MouseEvent.CLICK, handleThreeClicked);
            container.addChild(button_three);
    
            addChild(container);
        } 
    
        private function handleTwoClicked(e:Event):void
        {
            navigator.pushView(View2);
        }
    
        private function handleThreeClicked(e:Event):void
        {
            navigator.pushView(View3);
        }
    }
    
    public class View2 extends ViewSprite
    {
    
        private var container:Container;
        private var back:BackButton;
    
        public function View2
        {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
    
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
    
            container = new Container();
            var layout:RowLayout = new RowLayout();
            container.layout = layout;
    
            back = new BackButton();
            back.label = "Back";
            back.width = 100;
            back.height = 45;
            back.addEventListener(MouseEvent.CLICK, goBack);
            container.addChild(back);
    
            addChild(container);
        } 
    
        private function goBack(e:Event):void
        {
            navigator.popView();
        }
    }
    
    public class View3 extends ViewSprite
    {
    
        private var container:Container;
        private var back:BackButton;
    
        public function View3
        {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
    
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
    
            container = new Container();
            var layout:RowLayout = new RowLayout();
            container.layout = layout;
    
            back = new BackButton();
            back.label = "Back";
            back.width = 100;
            back.height = 45;
            back.addEventListener(MouseEvent.CLICK, goBack);
            container.addChild(back);
    
            addChild(container);
        } 
    
        private function goBack(e:Event):void
        {
            navigator.popView();
        }
    }
    

    Is there for example some best practices how to modify this code to have pages and components with the same sizes in portrait and landscape? On presentation buttons size always 150 width and height 45 and wil containers have stageWidth and stageHeight.

    Thank you if someone could help with this problem

    Hello

    Try listening to a shift in focus screen with this code:

    stage.addEventListener(Event.RESIZE, onResizeHandler, false, 0, true);
    

    You can only change the width/height of your components to the event based on the width/height of the floor.

    I will guard against specifying specific sizes, if you want your code to work on devices BB10. I recommend using %'s.

    Kind regards

    Dustin

  • Best practices for the configuration of virtual drive on NGC

    Hello

    I have two C210 M2 Server with 6G of LSI MegaRAID 9261-8i card with 10 each 135 GB HDDs. When I tried the automatic selection of the RAID configuration, the system has created a virtual disk with RAID 6. My concern is that the best practice is to configure the virtual drive? Is - RAID 1 and RAID5 or all in a single drive with RAID6? Any help will be appreciated.

    Thank you.

    Since you've decided to have the CPU on the server apps, voice applications have specified their recommendations here.

    http://docwiki.Cisco.com/wiki/Tested_Reference_Configurations_%28TRC%29

    I think that your server C210 specifications might be corresponding TRC #1, where you need to have

    RAID 1 - first two drives for VMware

    RAID 5 - 8 hard drives within the data store for virtual machines (CUCM and CUC)

    HTH

    Padma

Maybe you are looking for

  • Last update of security 10.11.6 will not completely download

    My wife's computer has received a notification that the last security update was available. I have tried three times now to download; about a third of the way through the download, download simply stops. Never seen that before. Any ideas?  Thanks, Ji

  • Clock speed of Centrino M30

    I have a portable Satellite Pro M30 and when I check the system information, it indicates that the speed of the clock is 598 MHz, while the processor should run at 1.5 GHz, I tried to use "high" option from BIOS, but this does not alter the frequency

  • Activate the night mode shift

    Hello world Is it possible to get the night shift enabled mode low power? I do not understand why Apple did it, cause I don't think not that night shift uses a lot of battery. And it's very annoying getting the white screen again when you activate th

  • Extension memory on the Satellite 2410

    Hello I intend to expand the memory of my Satellite 2410 601. It has 256 MB DDR at the present time. I plan on using a memory module 256 more to extend the total memory to 512 MB. I want to know is whether I can use one of the DDR memory module avail

  • Can I sort my "favourites" while offline?

    Can I sort my "favourites" while offline?  I have a very long list and I have a large number of them in sub-foldrs, but I do not necessarily have want everything to be in alphabetical order.