Power Measurement Take Too Long

Hi All,
I am using Agilent 8163B
with 2 slots:  81619A (2 heads) and 81618A (1 head) for power
measurements.  I setup my measurement with Agilent's time sutup driver
vi at 5 seconds average time.  However it took over 20 seconds total to
complete the measurement of 3 channels using the Agilent's 816x Read
PMW Value.vi (this VI calls a DLL hp816x_32).
My
question is that can I get this measurement done close to 5s with a
parallel read of 3 channels at the same time?  i.e., Is the DLL
hp816x_32 reentrant?
I tried to have a parallel wiring of
816x Read PMW Value.vi to test this, but still get a measuement time of
21 second.  Does anyone has a suggestion to improve this?
Thanks,
Bryan
Solved!
Go to Solution.

Lynn and Bill, thanks a lot for following up on my questions.  In my testing VI module I put "fetch" vi in a while loop after sending "initialize" and "average time" commands outside the loop.  When I set the "averaging time" to 5 seconds, I can see the power values from 3 channels are updated at about every 5 seconds. At the same time I monitored the loop index which updates at a far faster rate. This behavior must suggesting that the "fetch" vi was getting the same value within that 5 seconds when my loop was running repeatedly.  This value must be an average value as it didnt change within the 5second time window.  I guess my observation is indeed different from what Lynn posted. I did come across the programming guide yesterday as shown in Bill's link, but didnt look in detail, you know how we LabVIEW programmers got spoiled by the graphic code
After another look at the guide, it made more sense to my observations, i.e., Fetch command returns an average value right away and you can fetch all 3 channels. While the Read command triggers an measurement and exclude access to other channels after one read command was sent.  I also googled arount a little, and found the following text (not exactly for 8163B though) maybe also helpful to others in a similar situation.
Thanks again
Bryan
The READ? command provides a sequential method to make
measurements and retrieve the results. READ? will hang the GPIB bus
until the measurement is completed, or until the timeout value has been
exceeded. Associated SETup commands (for each measurement) are used
with the READ? command to retrieve desired measurement results in a
sequential manner.
Sending a READ? command is equivalent to an INITiate/FETCh cycle for a
measurement. A READ? command executes an abort action on that
measurement followed by an INITiate and a FETCH?.
READ? commands can be mixed with FETCH? queries in order to make
combinations of sequential and overlapped operations. One measurement
can be issued a READ? command (sequential), and the next measurement
can be issued INITiate/FETCh? commands (overlapped), if necessary.
The advantage of using the READ? commands to obtain measurement results, as opposed to the INITiate/FETCh method is:
It is simpler. Fewer commands are required to obtain measurement results.
Some disadvantages of using READ? over INITiate and FETCh are:
The test set does not process any additional GPIB commands until the requested measurement results are available.
The sequential nature of the READ? command does not allow the user to
make concurrent measurements. Concurrent measurements require the
overlapped commands INITiate, DONE? and FETCh? .
The READ? command does not provide measurement results such as statistics that are available using the INITiate/FETCh method.
The READ? commands have pre-defined measurement results. If additional
results are needed from a measurement they may be obtained with a
FETCh? query.

Similar Messages

  • Quantity conversion takes too long

    Dear Gurus,
    I'm having a problem with the query execution time when I convert the quantities of the materials in KGs.
    I have done all the steps to set up material conversion with reference infoobject 0material and using a dynamic determination of conversion factor using central units of measurement (T006) otherwise reference infoobject.
    With these settings the query takes too long to execute because of the large number of material codes. If I remove this conversion the query is executed very fast.
    Any ideas? Do I have to create an index in UOM0MATE ODS? What am I missing here?
    Regards,
    Panos

    Hi Panos,
    I had the same issue, but it's solved for me now. I tried the same way you did, by creating a secondary index on the active table of the DSO. The only difference is, that I included all the SID fields to the index.
    Did you mark your index as unique? Also make sure, that the index really is created on the DB.
    If the performance still is not getting better, check in RSRT the statistics if the unit conversion really is the problem.
    Kindly regards,
    Matthias

  • Takes too long to hibernate when I close the lid - Also random device noise when it boots up

    Hello guys.
    Ever since i've wiped the machine, i've been having these two problems. When I close the lid, it used to go to sleep straight away, but now I can see the sleep light (and the power button) flash and flash, then it goes to sleep.
    When waking up it goes through the lenovo startup screen and resuming windows, then it asks for a password, before I used to open the lid and it would ask me for the password straight away. I know it was going to sleep because I could hear the beep straight away when I closed and opened it, but now it just takes too long.
    Also, everytime I boot up into windows or resume into windows from a sleep state, I can hear the device noise, like something is being plugged in/out. But there is nothing being plugged in or out at the time. I can't get to device manager quick enough to see what it is that is causing it. 
    But all drivers seem okay.
    Thanks in advance.
    Sam.
    EDIT: Also noticed, when the lid is closed, randomly the laptop turns off (hear the beep) an then turns back off again.
    Weird.
     T420 model number: 4180-PR1 with OS: Windows 7 Pro 64 bit
    T420 4180-PR1 - OS: Windows 7 Pro 64 bit
    Solved!
    Go to Solution.

    Hi Sam,
    is this to do with the T420 model number: 4180-PR1 with OS: Windows 7 64 bit installed on it as in another thread you posted in?
    Maybe you could pop the information into your signature; members like to know which system and OS are involved.  At the top next to Sign Out choose   My Settings > Personal Profile > Personal Information - Signature
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • MAcbook takes too long to boot

    From one day to another our macbook takes too long to boot. The problem is since we push the power button until the first grey apple shows up, it can take up to 30 seconds. Since the apple shows up it boot in a few seconds. All the process up to 1.20 minutes.

    Also... once you are in OS X, go to System Preferences and Startup Disk. Make sure your OS X volume is selected. Sometimes this can change causing your system to look for another startup disk... and it needs to "time out" before it moves on to the next. This is most common after removing a BootCamp installation of Windows... but can happen for any number of reasons.

  • Ipad 4th gen retina display takes too long downloading apps

    I have a Ipad 4th Gen ios 6.1.3. When i tap the app store icon it takes too long to show the info. The same occurs when i itry to install some apps. Comparing with a Asus Memo Pad 10 is slower what does not have to be. My network runs till 200mbps and the ipad has full power and full wi-fi connection.
    Is there a problem of comfiguration or other?.
    Thank you very much for the help.

    Have you tried this:
    1. Close all apps in the Task Bar. Double-click the Home button and hold apps down for a second or two. Tap the minus sign to close app.
    2. Hold the Sleep and Home button down until you see the Apple Logo.

  • Sometimes my computer takes too long to connect to new website. I am running a pretty powerful work program at same time, what is the best solution? Upgrading speed from cable network, is it a hard drive issue? do I need to "clean out" the computer?

    Many times my computer takes too long to connect to new website. I have wireless internet (time capsule) and I am running a pretty powerful real time financial work program at same time, what is the best solution? Upgrading speed from cable network? is it a hard drive issue? do I only need to "clean out" the computer? Or all of the above...not to computer saavy.  It is a Macbook Pro  osx 10.6.8 (late 2010).

    Almost certainly none of the above!  Try each of the following in this order:
    Select 'Reset Safari' from the Safari menu.
    Close down Safari;  move <home>/Library/Caches/com.apple.Safari/Cache.db to the trash; restart Safari.
    Change the DNS servers in your network settings to use the OpenDNS servers: 208.67.222.222 and 208.67.220.220
    Turn off DNS pre-fetching by entering the following command in Terminal and restarting Safari:
              defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false

  • Accessing BKPF table takes too long

    Hi,
    Is there another way to have a faster and more optimized sql query that will access the table BKPF? Or other smaller tables that contain the same data?
    I'm using this:
       select bukrs gjahr belnr budat blart
       into corresponding fields of table i_bkpf
       from bkpf
       where bukrs eq pa_bukrs
       and gjahr eq pa_gjahr
       and blart in so_DocTypes
       and monat in so_monat.
    The report is taking too long and is eating up a lot of resources.
    Any helpful advice is highly appreciated. Thanks!

    Hi max,
    I also tried using BUDAT in the where clause of my sql statement, but even that takes too long.
        select bukrs gjahr belnr budat blart monat
         appending corresponding fields of table i_bkpf
         from bkpf
         where bukrs eq pa_bukrs
         and gjahr eq pa_gjahr
         and blart in so_DocTypes
         and budat in so_budat.
    I also tried accessing the table per day, but it didn't worked too...
       while so_budat-low le so_budat-high.
         select bukrs gjahr belnr budat blart monat
         appending corresponding fields of table i_bkpf
         from bkpf
         where bukrs eq pa_bukrs
         and gjahr eq pa_gjahr
         and blart in so_DocTypes
         and budat eq so_budat-low.
         so_budat-low = so_budat-low + 1.
       endwhile.
    I think our BKPF tables contains a very large set of data. Is there any other table besides BKPF where we could get all accounting document numbers in a given period?

  • Report Takes Too Long Time

    Hi!
    I am in troubble
    following is the query
    SELECT inv_no, inv_name, inv_desc, i.cat_id, cat_name, i.sub_cat_id,
    sub_cat_name, asset_cost, del_date, i.bl_id, gen_desc bl_desc, p.prvcode, prvdesc, cur_loc,
    pldesc, i.pmempno, pmname, i.empid, empname
    FROM inv_reg i,
    cat_reg c,
    sub_cat_reg s,
    gen_desc_reg g,
    ploc p,
    province r,
    pmaster m,
    iemp_reg e
    WHERE i.sub_cat_id = s.sub_cat_id
    AND i.cat_id = s.cat_id
    AND s.cat_id = c.cat_id
    AND i.bl_id = g.gen_id
    AND i.cur_loc = p.plcode
    AND p.prvcode = r.prvcode
    AND i.pmempno = m.pmempno(+)
    AND i.empid = e.empid(+)
    &wc
    order by prvdesc, pldesc, cat_name, sub_cat_name, inv_no
    and this query returns 32000 records
    when i run this query on reports 10g
    then it takes 10 to 20 minuts to generate report
    how can i optimize it...?

    Hi Waqas Attari
    Pls study & try this ....
    When your query takes too long ...
    hope it helps....
    Regards,
    Abdetu...

  • OPM process execution process parameters takes too long time to complete

    PROCESS_PARAMETERS are inserted every 15 min. using gme_api_pub packages. some times it takes too long time to complete the batch ,ie completion of request. it takes about 5-6 hrs long time ,in other time s it takes only 15-20 mins.This happens at regular interval...if anybody can guide me I will be thankful to him/her..
    thanks in advance.
    regds,
    Shailesh

    Generally the slowest part of the process is in the extraction itself...
    Check in your source system and see how long the processes are taking, if there are delays, locks or dumps in the database... If your source is R/3 or ECC transactions like SM37, SM21, ST22 can help monitor this activity...
    Consider running less processes in parallel if you have too many and see some delays in jobs... Also indexing some of the tables in the source system to expedite the extraction, make sure there are no heavy processes or interfaces running in the source system at the same time you're trying to load... Check with your Basis guys for activity peaks and plan accordingly...
    In BW also check in your SM21 for database errors or delays...
    Just some ideas...

  • Web application deployment takes too long?

    Hi All,
    We have a wls 10.3.5 clustering environment with one admin server and two managered servers separately. When we try to deploy a sizable web application, it takes about 1 hour to finish. It seems that it takes too long to finish the deployment. Here is the output from one of two managerd server system log. Could anyone tell me it is normal or not? If not, how can I improve this?
    Thanks in advance,
    John
    +####<Feb 29, 2012 12:11:03 PM EST> <Info> <Deployer> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330535463373> <BEA-149059> <Module copyrequest of application copyrequest [Version=COPYREQUEST0002bb] is transitioning from STATE_NEW to STATE_PREPARED on server Pinellas1tMS3.>+
    +####<Feb 29, 2012 12:11:05 PM EST> <Info> <Deployer> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <9baa7a67b5727417:26f76f6c:135ca05cff2:-8000-00000000000000b0> <1330535465664> <BEA-149060> <Module copyrequest of application copyrequest [Version=COPYREQUEST0002bb] successfully transitioned from STATE_NEW to STATE_PREPARED on server Pinellas1tMS3.>+
    +####<Feb 29, 2012 12:11:06 PM EST> <Info> <Deployer> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330535466493> <BEA-149059> <Module copyrequest of application copyrequest [Version=COPYREQUEST0002bb] is transitioning from STATE_PREPARED to STATE_ADMIN on server Pinellas1tMS3.>+
    +####<Feb 29, 2012 12:11:06 PM EST> <Info> <Deployer> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330535466493> <BEA-149060> <Module copyrequest of application copyrequest [Version=COPYREQUEST0002bb] successfully transitioned from STATE_PREPARED to STATE_ADMIN on server Pinellas1tMS3.>+
    +####<Feb 29, 2012 12:11:06 PM EST> <Info> <Deployer> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330535466809> <BEA-149059> <Module copyrequest of application copyrequest [Version=COPYREQUEST0002bb] is transitioning from STATE_ADMIN to STATE_ACTIVE on server Pinellas1tMS3.>+
    +####<Feb 29, 2012 12:11:06 PM EST> <Info> <Deployer> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330535466809> <BEA-149060> <Module copyrequest of application copyrequest [Version=COPYREQUEST0002bb] successfully transitioned from STATE_ADMIN to STATE_ACTIVE on server Pinellas1tMS3.>+
    +####<Feb 29, 2012 1:00:42 PM EST> <Info> <Diagnostics> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330538442300> <BEA-320143> <Scheduled 1 data retirement tasks as per configuration.>+
    +####<Feb 29, 2012 1:00:42 PM EST> <Info> <Diagnostics> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330538442301> <BEA-320144> <Size based data retirement operation started on archive HarvestedDataArchive>+
    +####<Feb 29, 2012 1:00:42 PM EST> <Info> <Diagnostics> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330538442301> <BEA-320145> <Size based data retirement operation completed on archive HarvestedDataArchive. Retired 0 records in 0 ms.>+
    +####<Feb 29, 2012 1:00:42 PM EST> <Info> <Diagnostics> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330538442301> <BEA-320144> <Size based data retirement operation started on archive EventsDataArchive>+
    +####<Feb 29, 2012 1:00:42 PM EST> <Info> <Diagnostics> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330538442301> <BEA-320145> <Size based data retirement operation completed on archive EventsDataArchive. Retired 0 records in 0 ms.>+
    +####<Feb 29, 2012 1:10:23 PM EST> <Info> <Cluster> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1330539023098> <BEA-003107> <Lost 2 unicast message(s).>+
    +####<Feb 29, 2012 1:10:36 PM EST> <Info> <Cluster> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330539036105> <BEA-000111> <Adding Pinellas1tMS2 with ID -9071779833610528123S:entwl2t-vm:[7005,7005,-1,-1,-1,-1,-1]:entwl2t-vm:7005,entwl3t-vm:7007:Pinellas1tDomain:Pinellas1tMS2 to cluster: Pinellas1tCluster1 view.>+
    +####<Feb 29, 2012 1:11:24 PM EST> <Info> <Cluster> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330539084375> <BEA-000128> <Updating -9071779833610528123S:entwl2t-vm:[7005,7005,-1,-1,-1,-1,-1]:entwl2t-vm:7005,entwl3t-vm:7007:Pinellas1tDomain:Pinellas1tMS2 in the cluster.>+
    +####<Feb 29, 2012 1:11:24 PM EST> <Info> <Cluster> <entwl3t-vm.co.pinellas.fl.us> <Pinellas1tMS3> <[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330539084507> <BEA-000128> <Updating -9071779833610528123S:entwl2t-vm:[7005,7005,-1,-1,-1,-1,-1]:entwl2t-vm:7005,entwl3t-vm:7007:Pinellas1tDomain:Pinellas1tMS2 in the cluster.>+
    Edited by: john wang on Feb 29, 2012 10:36 AM
    Edited by: john wang on Feb 29, 2012 10:37 AM
    Edited by: john wang on Feb 29, 2012 10:38 AM

    Hi John,
    There may be some circumstances like when there are many files in the WEB-INF folder and JPS don't use TLD.
    I don't think a 1hour deployment is normal, it should be much more faster.
    Since you are using 10.3.5, I suggesto you to install the corresponding patch:
    1. Download patch 10118941p10118941_1035_Generic.zip
    2. Uncompress the file p10118941_1035_Generic.zip
    3. Copy the required files (patch-catalog_XXXXX.xml, CIRF.jar ) to the Patch Download Directory (typically, this folder is <WEBLOGIC_HOME>/utils/bsu/cache_dir).
    4. Rename the file patch-catalog_XXXXX.xml into patch-catalog.xml .
    5. Start Smart Update from <WEBLOGIC_HOME>/utils/bsu/bsu.sh .
    6. Select "Work Offline" mode.
    7. Go to File->Preferences, and select "Patch Download Directory".
    8. Click "Manage Patches" on the right panel.
    9. You will see the patch in the panel below (Downloaded Patches)
    10. Click "Apply button" of the downloaded patch to apply it to the target installation and follow the instructions on the screen.
    11. Add "-Dweblogic.jsp.ignoreTLDsProcessingInWebApp=true" to the Java options to ignore additional findTLDs cost.
    12. Restart servers.
    Hope this helps.
    Thanks,
    Cris

  • RPURMP00 program takes too long

    Hi Guys,
    Need some help on this one guys. Not getting any where with this issue.
    I am running RPURMP00 ( Program to  Create Third-Party Remittance Posting Run ) and while running it in test mode for 1 employee it takes too long .
    I ran this in background during off hours , but it takes 19,000 + sec to run and then cancels .
    The long text message is “No entry in table T51R6_FUNDINFO (Remittance detail table for all entities) for key 0002485844 “   and     “Job cancelled after system exception ERROR_MESSAGE”
    I check the program and I found a nested loop within the program (include RPURMP02 ) and decided to debug it with a break point.
    It short dumped and here is the st22 message and source code extract.
          ----Message -
    " Time limit exceeded ".
    "The program "RPURMP00" has exceeded the maximum permitted runtime without
    Interruption and has therefore been terminated."
          ----Source code extract -
    Include RPURMP02
      172 &----                   
      173 *&      Form  get_advice_info                                                               
      174 &----                   
      175 *       text                                                                               
    176 ----                   
      177 *  -->  p1        text                                                                     
      178 *  <--  p2        text                                                                      
      179 ----                   
      180 FORM get_advice_info .                                                                     
      181                                                                               
    182 * get information for advice form only if vendor sub-group and                             
      183 * employee detail is maintained                                                             
      184   IF ( NOT t51rh-lifsg IS INITIAL ) AND                                                    
      185      ( NOT t51rh-hrper IS INITIAL ).                                                       
      186                                                                               
    187 *   get remittance items employee number                                                   
      188     SELECT * FROM t51r4 WHERE remky = t51r5-remky. "#EC CI_GENBUFF "SAM0632658             
      189 *     get payroll seqno determined by PERNR and RDATN                                      
    >>>>>       SELECT * FROM t51r8 WHERE pernr = t51r4-pernr                                        
      191                             AND rdatn = t51r5-rdatn                                        
      192                             ORDER BY PRIMARY KEY. "#EC CI_GENBUFF                          
      193         EXIT.                                                                               
    194       ENDSELECT.                                                                               
    Has anyone ever come across this situation? Any input from anyone on this?
    Regards.
    CJ

    Hi,
    What is your SAP version?
    Have you checked if some OSS notes is there on performance.
    Regards,
    Atish

  • AME CS6 rendering with AE and Pr takes too long

    Hi Guys,
    Need some help here. i have rendered a 30 secs mp4 video with 1920 x 1080 HD format 25 frames w/o scripting in AME for 4 hours!
    Why does it take too long? I have rendered a 2 minute video with same format w/ scripting but only spare less than 30 minutes for rendering.
    Im using After Effects and Premium Pro both CS6 and using Dynamic Link in AME.
    What seems to be wrong in my current settings?
    Any help would be appreciated.
    Thanks!

    This may be a waste of time, but it won't take a minute and is something you should always do whenever things go strangely wrong  ............ trash the preferences, assuming you haven't done it already.
    Many weird things happen as a result of corrupt preferences which can create a vast range of different symptoms, so whenever FCP X stops working properly in any way, trashing the preferences should be the first thing you do using this free app.
    http://www.digitalrebellion.com/prefman/
    Shut down FCP X, open PreferenceManager and in the window that appears:-
    1. Ensure that only  FCP X  is selected.
    2. Click Trash
    The job is done instantly and you can re-open FCP X.
    There is absolutely no danger in trashing preferences and you can do it as often as you like.
    The preferences are kept separately from FCP X and if there aren't any when FCP X opens it automatically creates new ones  .  .  .  instantly.

  • My Query takes too long ...

    Hi ,
    Env   , DB 10G , O/S Linux Redhat , My DB size is about 80G
    My query takes too long ,  about 5 days to get results , can you please help to rewrite this query in a better way ,
    declare
    x number;
    y date;
    START_DATE DATE;
    MDN VARCHAR2(12);
    TOPUP VARCHAR2(50);
    begin
    for first_bundle in
    select min(date_time_of_event) date_time_of_event ,account_identifier  ,top_up_profile_name
    from bundlepur
    where account_profile='Basic'
    AND account_identifier='665004664'
    and in_service_result_indicator=0
    and network_cause_result_indicator=0
    and   DATE_TIME_OF_EVENT >= to_date('16/07/2013','dd/mm/yyyy')
    group by account_identifier,top_up_profile_name
    order by date_time_of_event
    loop
    select sum(units_per_tariff_rum2) ,max(date_time_of_event)
    into x,y
    from OLD_LTE_CDR
    where account_identifier=(select first_bundle.account_identifier from dual)
    and date_time_of_event >= (select first_bundle.date_time_of_event from dual)
    and -- no more than a month
    date_time_of_event < ( select add_months(first_bundle.date_time_of_event,1) from dual)
    and -- finished his bundle then buy a new one
      date_time_of_event < ( SELECT MIN(DATE_TIME_OF_EVENT)
                             FROM OLD_LTE_CDR
                             WHERE DATE_TIME_OF_EVENT > (select (first_bundle.date_time_of_event)+1/24 from dual)
                             AND IN_SERVICE_RESULT_INDICATOR=26);
    select first_bundle.account_identifier ,first_bundle.top_up_profile_name
    ,FIRST_BUNDLE.date_time_of_event
    INTO MDN,TOPUP,START_DATE
    from dual;
    insert into consumed1 VALUES(X,topup,MDN,START_DATE,Y);
    end loop;
    COMMIT;
    end;

    > where account_identifier=(select first_bundle.account_identifier from dual)
    Why are you doing this?  It's a completely unnecessary subquery.
    Just do this:
    where account_identifier = first_bundle.account_identifier
    Same for all your other FROM DUAL subqueries.  Get rid of them.
    More importantly, don't use a cursor for loop.  Just write one big INSERT statement that does what you want.

  • Sql Query takes too long to enter into the first line

    Hi Friends,
      I am using SQLServer 2008. I am running the query for fetching the data from database. when i am running first time after executed the "DBCC FREEPROCCACHE" query for clear cache memory, it takes too long (7 to 9 second) to enter into first
    line of the stored procedure. After its enter into the first statement of the SP, its fetching the data within a second. I think there is no problem with Sqlquery.  Kindly let me know if you know the reason behind this.
    Sample Example:
    Create Sp Sp_Name
    as
     Begin
     print Getdate()
      Sql statements for fetching datas
     Print Getdate()
     End
    In the above example, there is no difference between first date and second date.
    Please help me to trouble shooting this problem.
    Thanks & Regards,
    Rajkumar.R

     i am running first time after executed the "DBCC FREEPROCCACHE" query for clear cache memory, it takes too long (7 to 9 second)
    Additional to Manoj: A
    DBCC FREEPROCCACHE clears the procedure cache, so all store procedure must be newly compilied on the first call.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Query designer takes too long to save a query

    Hi dear SDN friends.
    I´m working with query designer in BI 7 and sometimes it takes too long to save a query, about ten minutes. Sometimes it never ends saving and some other times it saves the same query in 1 minute.
    Can anybody please give an advice about this behavior of the query designer?
    We have recently update BI to sp18. In query designer I have sp5 revision 529
    Best regards,
    Karim Reyes

    Hello Karim,
    I would suggest testing this again in the latest Frontend Patch available (FEP 602).  In FEPs 600, 601, & 602 there were some performance and stability improvements made which may correct your issue.  If the issue persists, I would suggest then opening a Customer Message via Service Marketplace.
    It can be downloaded from:
        http://service.sap.com/swdc
    u2192Download
    u2192Support Packages and Patches
    u2192Entry by Application Group
    u2192SAP Frontend Components
    u2192BI ADDON FOR SAPGUI
    u2192 BI 7.0 ADDON FOR SAPGUI 7.10
    u2192 BI 7.0 ADDON FOR SAPGUI 7.10
    u2192Win32
    See SAP Note 1085218 for planned FEP releases.
    I hope that helps.
    Regards,
    Tanner Spaulding
    SAP NetWeaver RIG Americas, BI

Maybe you are looking for