P/L run much longer than B/S

I am trying to run P/L and B/S report build under my consolidation cube, I notice that it take only 30 second to run B/S while it take 10 minutes to run the P/L, anybody know why this happen and how to improve the performance for P/L,  I just run the light optimization, it's not help.
Thanks,

Hi Jian
This could be due to number of P & L accounts and related transactions. In normal course P & L account balances are more volatile.
Specifying selection options would also help, Apart from that if you are using hierarchy the option 'ENABLESHAREDMEMEORY' aat environment level could help
Regards
Surabhi

Similar Messages

  • HT5521 I have a lightning to usb cable which is 2m in length.  Is there any known issues with trying to recharge an iPad 4 with this longer length.  It seems to me it is taking much longer than a 1m cord to recharge.

    I have a lightning to usb cable which is 2m in length.  Is there any known issues with trying to recharge an iPad 4 with this longer length?  It seems to me it is taking much longer than a 1m cord to recharge.

    Axel,
    I'm afraid a new SSD won't be different from your bad USB stick. I had similar issues over USB with both a (no-brand) stick and TWO 64gb Kingston SSDNow's (running Kubuntu 12.04 with Kernel 3.11, ia_64): it all runs exceptionally well (wanna know how it feels like booting in 5 sec?) for a few days - then suddenly you find yourself facing that dreaded (initramfs) prompt. You ask yourself: why? Did I upgrade grub lately? Did I upgrade the Kernel? I don't recall so. Ok, let's fix this... insert favorite live cd, boot, fsck...what???? THOUSANDS of errors??? Hundreds of files and directories corrupted, and the system is unusable - Reinstall everything from scratch onto another drive.
    Rinse and repeat: did this 3 times. Then I found this analysis:
    http://lkcl.net/reports/ssd_analysis.html
    I also suspect USB power interrupts more abruptly than SATA power, at shutdown - basically aggravating any power interruption damages. So now I'm going to:
    - buy an Intel S3500!
    - add commit=1 to my mount options in /etc/fstab
    - edit shutdown procedure to add a 5-10 sec pause after unmounting drives.
    Just my two cents.
    Andrea
    Last edited by andreius (2013-12-29 16:51:04)

  • My four year old iMac is running much slower than when it was new.  Any suggestions on cleaning out the cob webs?

    My four year old iMac is running much slower than when it was new.  Does anyone have any suggestions on what I can do to "clean it up" and get it running like it used to?

    What year, screen size, CPU speed and amount of RAM installed?
    To find out info about your system,
    Click on the Apple symbol in the upper left of the OS X main menu bar. A drop down menu appears.
    Click About this Mac. A smaller popup window appears. This gives you basic info like what version of OS X your iMac is running, the speed of your iMac's CPU and how much RAM is installed.
    Click on the button that says More Info. A larger window appears giving you a complete overview of your iMac's hardware specs.
    Highlight all of this info and copy/paste all of this into another reply to this post, editing out your iMac's serial number before actually posting the reply.
    This will tell us everything about your iMac so we may begin to help with your iMac issues.
    How full is your Mac's hard drive?
    Locate your iMac's hard drive icon on the OS X desktop. Click the icon once, then use the keyboard key combination Command-I. This will give you additonal info about your iMac's internal hard drive.  
    Post this info in your reply here, also.
    Here are some general tips to keep your Mac's hard drive trim and slim as possible
    You should never, EVER let a conputer hard drive get completely full, EVER!
    With Macs and OS X, you shouldn't let the hard drive get below 15 GBs or less of free data space.
    If it does, it's time for some hard drive housecleaning.
    Follow some of my tips for cleaning out, deleting and archiving data from your Mac's internal hard drive.
    Have you emptied your Mac's Trash icon in the Dock?
    If you use iPhoto, iPhoto has its own trash that needs to be emptied, also.
    If you store images in other locations other than iPhoto, then you will have to weed through these to determine what to archive and what to delete.
    If you use Apple Mail app, Apple Mail also has its own trash area that needs to be emptied, too!
    Delete any old or no longer needed emails and/or archive to disc, flash drives or external hard drive, older emails you want to save.
    Look through your other Mailboxes and other Mail categories to see If there is other mail you can archive and/or delete.
    STAY AWAY FROM DELETING ANY FILES FROM OS X SYSTEM FOLDER!
    Look through your Documents folder and delete any type of old useless type files like "Read Me" type files.
    Again, archive to disc, flash drives, ext. hard drives or delete any old documents you no longer use or immediately need.
    Look in your Applications folder, if you have applications you haven't used in a long time, if the app doesn't have a dedicated uninstaller, then you can simply drag it into the OS X Trash icon. IF the application has an uninstaller app, then use it to completely delete the app from your Mac.
    To find other large files, download an app called Omni Disk Sweeper.
    Download an app called OnyX for your version of OS X.
    When you install and launch it, let it do its initial automatic tests, then go to the cleaning and maintenance tabs and run the maintenance tabs that let OnyX clean out all web browser cache files, web browser histories, system cache files, delete old error log files.
    Typically, iTunes and iPhoto libraries are the biggest users of HD space.
    move these files/data off of your internal drive to the external hard drive and deleted off of the internal hard drive.
    If you have any other large folders of personal data or projects, these should be archived or moved, also, to the optical discs, flash drives or external hard drive and then either archived to disc and/or deleted off your internal hard drive.
    Good Luck!

  • If i export my project, it runs much faster than in the canvas. How can I fix that?

    If i export my project, it runs much faster than in the canvas. How can I fix that?
    I'm from germany, sorry for my english!

    When you export your project, it is "compiled" into video format. Any player will play it at its frame rate.
    Motion is a compositing application. It has to make many more times the calculations needed to animate everything and 90% of the time, it's just not possible for Motion to keep up with "real time".  It's to be expected. Learning to live with that fact will make life a lot easier for you, I promise.
    There are a few things you can do to help speed up Motion:
    Reduce temporary play ranges to no more than about 5 seconds at a time. You can move the Play Range In and Out markers from section to section. Motion does all of its real time rendering in RAM. The longer the play range, to more it has to work managing that memory.
    Remove Preview Icons from the Layers list ( View menu > Layers Columns > Preview will toggle the views)
    When you play your animation, turn off on screen guides: (command - / will toggle onscreen guides)
    In Motion 5, reducing the quality of playback from the Render menu does not make a lot of difference anymore, so you might as well keep the default settings of Dynamic, Full and Normal on. However, Motion Blur, Frame Blending, Field Rendering, as well as the lighting options will affect playback, sometimes by quite a lot. So if you have Lights, turning off Lighting, Shadows, and Reflections will get back a lot of real time playback speed (just remember to turn on all that you need before rendering, or these things will be left out of the export!)
    HTH

  • I moved my music from the c drive to the d drive. All of my music is in itunes but my ipod won't sync with itunes. The syncing process is taking much longer than usual too. I left my ipod over night to sync and it didnt finish. Fails to sync every time.

    I moved my music from the c drive to the d drive. All of my music is in itunes but my ipod won't sync with itunes. The syncing process is taking much longer than usual too. I left my ipod over night to sync and it didnt finish. Fails to sync every time. I tried to restore my ipod and it didnt help.

    Ignore.  I figured it out:)

  • In CS6, JavaScript Running MUCH Slower than ActionScript

    Hi All,
    I am finding that in CS6, JS code runs MUCH slower than ActionScript code. I don't want to double-post here - Full details may be found where I posted them in the InDesign Scripting forum at  - CS6 JavaScript Running Much Slower than ActionScript, before I realized that this forum might be more appropriate.
    The basic gist of it is that I had a Flex/ActionScript Extension, which I obviously needed to start converting to JavaScript in advance of the next version not supporting ActionScript. I converted 20,000 lines of my business logic code from ActionScript to JavaScript (grrr...) - only to find that it now runs 5 times slower than it did in ActionScript.
    What has been the experience of others who have converted large Extensions from ActionScript to JavaScript?
    I would greatly appreciate any and all suggestions.
    TIA,
    mlavie

    Hi All,
    I am finding that in CS6, JS code runs MUCH slower than ActionScript code. I don't want to double-post here - Full details may be found where I posted them in the InDesign Scripting forum at  - CS6 JavaScript Running Much Slower than ActionScript, before I realized that this forum might be more appropriate.
    The basic gist of it is that I had a Flex/ActionScript Extension, which I obviously needed to start converting to JavaScript in advance of the next version not supporting ActionScript. I converted 20,000 lines of my business logic code from ActionScript to JavaScript (grrr...) - only to find that it now runs 5 times slower than it did in ActionScript.
    What has been the experience of others who have converted large Extensions from ActionScript to JavaScript?
    I would greatly appreciate any and all suggestions.
    TIA,
    mlavie

  • Why is my new iPad 3(32gb) taking a long time to download apps, much longer than my iPhone.

    My new iPad3 with wifi- is taking a really long time to download,much longer than my iPhone. Does anyone know what I can do?
    Or is that just normal.

    slow Internet connection.    

  • Fetching null records out of a function takes much longer than non-null

    Hi,
    We have a function that is called thousands of times on SQL. This function has a SELECT than can return one row at max.
    We realized that when the SQL statement doesn't return any record, it takes 3x times longer in the fetch phase.
    I made a simple test with three functions were each one was executed 1000 times. The first one has an extra outer join that guarantees that it always returns one record, a second one with an explicit cursor that can return 0 records and a third one with an implicit cursor that can also return 0 records.
    Here is the sample test code:
    DECLARE
    -- Local variables here
    CURSOR c IS
    SELECT teste_vasco.teste_vasco1(epis.id_episode) as val
    FROM episode epis
    WHERE rownum <= 1000;
    TYPE t_c IS TABLE OF c%ROWTYPE;
    l_c t_c;
    BEGIN
    -- Test statements here
    OPEN c;
    FETCH c BULK COLLECT
    INTO l_c;
    CLOSE c;
              for i in l_c.first..l_c.last
              loop
              dbms_output.put_line(i || ' :' || l_c(i).val);
              end loop;
    END;
    The difference between the tests is that instead of calling the vasco1 function, vasco2 and vasco3 is called.
    ###Test1
    -Function vasco1:
    FUNCTION teste_vasco1(i_episode IN episode.id_episode%TYPE) RETURN VARCHAR2 IS
    l_dt_set TIMESTAMP WITH LOCAL TIME ZONE;
    l_flg_stage VARCHAR2(3);
    l_dt_warn TIMESTAMP WITH LOCAL TIME ZONE;
    CURSOR c_care_stage IS
    SELECT cs.dt_set, cs.flg_stage, cs.dt_warn
    FROM episode epis
    LEFT JOIN care_stage cs ON (cs.id_episode = epis.id_episode AND cs.flg_active = 'Y')
    WHERE epis.id_episode = i_episode;
    BEGIN
    OPEN c_care_stage;
    FETCH c_care_stage
    INTO l_dt_set, l_flg_stage, l_dt_warn;
    CLOSE c_care_stage;
    IF l_dt_set IS NULL
    THEN
    RETURN NULL;
    END IF;
    RETURN l_dt_set || l_flg_stage || l_dt_warn;
    EXCEPTION
    WHEN OTHERS THEN
    pk_alert_exceptions.raise_error(error_code_in => SQLCODE, text_in => SQLERRM);
    pk_alert_exceptions.reset_error_state;
    RETURN NULL;
    END teste_vasco1;
    -Trace file:
    SELECT TESTE_VASCO.TESTE_VASCO1(EPIS.ID_EPISODE) AS VAL
    FROM
    EPISODE EPIS WHERE ROWNUM <= 1000
    call count cpu elapsed disk query current rows
    Parse 1 0.01 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.04 0.06 0 8 0 1000
    total        3      0.06       0.07          0          8          0        1000
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 286 (recursive depth: 1)
    Rows Row Source Operation
    1000 COUNT STOPKEY (cr=8 pr=0 pw=0 time=2035 us)
    1000 INDEX FAST FULL SCAN EPIS_EPISODE_INFO_UI (cr=8 pr=0 pw=0 time=1030 us)(object id 153741)
    SELECT CS.DT_SET, CS.FLG_STAGE, CS.DT_WARN
    FROM
    EPISODE EPIS LEFT JOIN CARE_STAGE CS ON (CS.ID_EPISODE = EPIS.ID_EPISODE AND
    CS.FLG_ACTIVE = 'Y') WHERE EPIS.ID_EPISODE = :B1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1000 0.07 0.05 0 0 0 0
    Fetch 1000 0.01 0.02 0 4001 0 1000
    total     2001      0.09       0.07          0       4001          0        1000
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 286 (recursive depth: 2)
    ###Test2
    -Function vasco2:
    FUNCTION teste_vasco2(i_episode IN episode.id_episode%TYPE) RETURN VARCHAR2 IS
    l_dt_set TIMESTAMP WITH LOCAL TIME ZONE;
    l_flg_stage VARCHAR2(3);
    l_dt_warn TIMESTAMP WITH LOCAL TIME ZONE;
    CURSOR c_care_stage IS
    SELECT cs.dt_set, cs.flg_stage, cs.dt_warn
    FROM care_stage cs
    WHERE cs.id_episode = i_episode
    AND cs.flg_active = 'Y';
    BEGIN
    OPEN c_care_stage;
    FETCH c_care_stage
    INTO l_dt_set, l_flg_stage, l_dt_warn;
    IF c_care_stage%NOTFOUND
    THEN
    CLOSE c_care_stage;
    RETURN NULL;
    END IF;
    CLOSE c_care_stage;
    IF l_dt_set IS NULL
    THEN
    RETURN NULL;
    END IF;
    RETURN l_dt_set || l_flg_stage || l_dt_warn;
    EXCEPTION
    WHEN OTHERS THEN
    pk_alert_exceptions.raise_error(error_code_in => SQLCODE, text_in => SQLERRM);
    pk_alert_exceptions.reset_error_state;
    RETURN NULL;
    END teste_vasco2;
    -Trace File:
    SELECT TESTE_VASCO.TESTE_VASCO2(EPIS.ID_EPISODE) AS VAL
    FROM
    EPISODE EPIS WHERE ROWNUM <= 1000
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.00 0.27 0 8 0 1000
    total        3      0.00       0.27          0          8          0        1000
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 286 (recursive depth: 1)
    Rows Row Source Operation
    1000 COUNT STOPKEY (cr=8 pr=0 pw=0 time=2048 us)
    1000 INDEX FAST FULL SCAN EPIS_EPISODE_INFO_UI (cr=8 pr=0 pw=0 time=1045 us)(object id 153741)
    SELECT CS.DT_SET, CS.FLG_STAGE, CS.DT_WARN
    FROM
    CARE_STAGE CS WHERE CS.ID_EPISODE = :B1 AND CS.FLG_ACTIVE = 'Y'
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1000 0.03 0.05 0 0 0 0
    Fetch 1000 0.00 0.00 0 2001 0 1
    total     2001      0.03       0.06          0       2001          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 286 (recursive depth: 2)
    Rows Row Source Operation
    1 TABLE ACCESS BY INDEX ROWID CARE_STAGE (cr=2001 pr=0 pw=0 time=11082 us)
    1 INDEX RANGE SCAN CS_EPIS_FACT_FST_I (cr=2000 pr=0 pw=0 time=7815 us)(object id 688168)
    ###Test3
    -Function vasco3
    FUNCTION teste_vasco3(i_episode IN episode.id_episode%TYPE) RETURN VARCHAR2 IS
    l_dt_set TIMESTAMP WITH LOCAL TIME ZONE;
    l_flg_stage VARCHAR2(3);
    l_dt_warn TIMESTAMP WITH LOCAL TIME ZONE;
    BEGIN
    BEGIN
    SELECT cs.dt_set, cs.flg_stage, cs.dt_warn
    INTO l_dt_set, l_flg_stage, l_dt_warn
    FROM care_stage cs
    WHERE cs.id_episode = i_episode
    AND cs.flg_active = 'Y';
    EXCEPTION
    WHEN no_data_found THEN
    RETURN NULL;
    END;
    IF l_dt_set IS NULL
    THEN
    RETURN NULL;
    END IF;
    RETURN l_dt_set || l_flg_stage || l_dt_warn;
    EXCEPTION
    WHEN OTHERS THEN
    pk_alert_exceptions.raise_error(error_code_in => SQLCODE, text_in => SQLERRM);
    pk_alert_exceptions.reset_error_state;
    RETURN NULL;
    END teste_vasco3;
    -Trace file:
    SELECT TESTE_VASCO.TESTE_VASCO3(EPIS.ID_EPISODE) AS VAL
    FROM
    EPISODE EPIS WHERE ROWNUM <= 1000
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.25 0.27 0 8 0 1000
    total        3      0.25       0.27          0          8          0        1000
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 286 (recursive depth: 1)
    Rows Row Source Operation
    1000 COUNT STOPKEY (cr=8 pr=0 pw=0 time=2033 us)
    1000 INDEX FAST FULL SCAN EPIS_EPISODE_INFO_UI (cr=8 pr=0 pw=0 time=1031 us)(object id 153741)
    SELECT CS.DT_SET, CS.FLG_STAGE, CS.DT_WARN
    FROM
    CARE_STAGE CS WHERE CS.ID_EPISODE = :B1 AND CS.FLG_ACTIVE = 'Y'
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1000 0.07 0.06 0 0 0 0
    Fetch 1000 0.00 0.00 0 2001 0 1
    total     2001      0.07       0.06          0       2001          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 286 (recursive depth: 2)
    Rows Row Source Operation
    1 TABLE ACCESS BY INDEX ROWID CARE_STAGE (cr=2001 pr=0 pw=0 time=11119 us)
    1 INDEX RANGE SCAN CS_EPIS_FACT_FST_I (cr=2000 pr=0 pw=0 time=7951 us)(object id 688168)
    As you can see, in the first example the fetch time of the SELECT in the function vasco1 takes 0.02 seconds and 0.06 in the SELECT of the test script. This test returned 1000 non-null records.
    In the tests 2 and 3, the fetch phase of the SELECT in the test script takes much more time - 0.27 seconds, despite the fetch of the SELECT in the functions (vasco2 and vasco3) took 0.00 seconds (as it only returned 1 row for the 1000 executions) and the only difference between them is the function that is called. Both test2 and test3 returned 999 null records and 1 non-null record.
    How it's possible than a select null records takes much longer than selecting non-null records?
    Hope you can understand the problem and thank you in advance for any help or suggestions.

    Thank you for the replies...
    But the thing is that the SELECT in the function is very fast and the fetch phase takes no time (0.00 second).
    And, as you can see in the execution plan, there's no need for a full index scan...only a range scan is performed:
    SELECT CS.DT_SET, CS.FLG_STAGE, CS.DT_WARN
    FROM
    CARE_STAGE CS WHERE CS.ID_EPISODE = :B1 AND CS.FLG_ACTIVE = 'Y'
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1000 0.07 0.06 0 0 0 0
    Fetch 1000 0.00 0.00 0 2001 0 1
    total     2001      0.07       0.06          0       2001          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 286 (recursive depth: 2)
    Rows Row Source Operation
    1 TABLE ACCESS BY INDEX ROWID CARE_STAGE (cr=2001 pr=0 pw=0 time=11119 us)
    1 INDEX RANGE SCAN CS_EPIS_FACT_FST_I (cr=2000 pr=0 pw=0 time=7951 us)(object id 688168)
    But, the fetch phase of the SQL that calls the function that has this query takes 0,27 seconds.
    As far as the contex switch, we are aware of that, but we can have modularity with this solution and the first function also have many context switching and is must faster.
    Edited by: Pretender on Mar 18, 2009 3:38 PM

  • Anyone else? CS4 running much slower than CS3?

    I just upgraded to CS4 from CS3. All of the applications are running much, much slower than CS3, particularly InDesign. My computer is literally fresh out of the box; specs below. Software and patches up to date. Thinking of uninstalling CS4 and reverting back to CS3. Any suggestions/feedback?
    MacBook Pro 15"
    2.66GHz Intel Core 2 Duo processor
    4GB memory
    320GB 5400-rpm hard drive
    NVIDIA GeForce 9600M GT graphics processor with 256MB
    1440 by 900 pixels
    Snow Leopard OX
    Purchased CS4 Master Collection. Other software installed includes iLife, iWork, Office for Mac.

    I'm not using In Design yet, but for Photoshop and Acrobat my sense is that they are fast or faster than CS3, and Snow Leopard has reduced the launch time for all my apps compared with Leopard.
    Yes there are issues with running Adobe apps with Snow Leopard, but some of them are the same issues when running CS3 apps with Leopard--and in any event, these are, I believe, all crashing bugs, not things that slow down responsiveness. I personally have had only a few problems with Design Std CS4 apps + Snow Leopard.

  • AE CC - saving projects takes much longer than in CS6

    I've noticed that After Effects CC takes much longer to save my current project than previously (about 2-3 minutes). I'm used to saving quite often so this is slowing down my workflow.
    The project was imported from AE CS6. I've tried starting a new project and importing the previous one manually (instead of a conversion). Same lag.
    All unused footage has been taken out and the footage has been consolidated.
    The AE CS6 project file and AE CC file are about 15mb so CC is not any bigger.
    There are about 50 files in Arri Raw 3K, the rest is in DPX and ProRes 1080p.
    I'm working from a Macbook Pro Retina 16GB Ram and all media and cache are on an external Lacie Big Disk thunderbolt Raid SSD.
    My impression is that AE CC is indexing all the files before saving so it's going through all the RAW sequenced files. This could slow down the saving process quite a lot.
    Is anyone experiencing the same lag time while saving projects?

    I'm having the same issue on my PC, saving is taking much longer and is also happening every time I RAM preview. Very strange, and in fact now its having trouble accessing the save location, a local hard drive. any answers for this isse?

  • I just restored my 24 inch imac and it seems to be running MUCH slower than before. Any Ideas why? thanks in advance for your help!

    I have erased and restored my 24 inch Intel iMac. I have upgraded to the last version of X os. My system is running WAY slower than it was before. Even opening windows seems to lag and the spinning wheel come up for everything. Every task is slow, even typing this! lol
    Here are my specs:
    Model Name:          iMac
      Model Identifier:          iMac8,1
      Processor Name:          Intel Core 2 Duo
      Processor Speed:          2.8 GHz
      Number Of Processors:          1
      Total Number Of Cores:          2
      L2 Cache:          6 MB
      Memory:          4 GB
      Bus Speed:          1.07 GHz
      Boot ROM Version:          IM81.00C1.B00
      SMC Version (system):          1.30f1
    Any ideas would be helpful. Is this a hardware issue?
    Thanks!

    Matt:
    Thanks for the update. It is good to know that the maintenance procedures helped. Regular maintenance and a good backup are key to computer security. Gulliver's article has a suggested schedule. Dr. Smoke's FAQ on Backup and Recovery has excellent information and advice. I part company with him on his insistence on Retrospect, which I have found to be difficult to use. SuperDuper has been shown the best backup software in these tests.
    If you usually leave your computer on or asleep, it is good practice to shut down and start up in Safe Mode occausionally. I do it about once weekly.
    Good luck.
    cornelius
    Message was edited by: cornelius

  • Parameterized queries running much slower than ones with hardcoded values

    Very often there is a huge performance difference when using parameters in a query, compared to running the same code after replacing the parameters with hardcoded values: the parameterized version of the code runs much slower!
    The case is not parameter sniffing as it is not a (compiled) stored proc, but code executed directly from the editor and the performance issue has been observed in different versions of SQL Server (2000 and 2005).
    How is this explained and how can the parameterized queries have similar performance with the hardcoded ones?
    Also, why does this happen in some cases and not always?
    Finally, the same is sometimes the case with stored procs: a very slow running proc speeds up tremendously when running its code directly, instead of calling the procedure --and even faster, according to the previous, when its parameters are replaced with
    hardcoded values 

    >>The case is not parameter sniffing as it is not a (compiled) stored proc, but code executed >>>directly
    from the editor ?>>>and the performance issue has been observed in different >>>versions of SQL Server (2000 and 2005).
    Something like below?
    --SQL Server creates 3 execution plan rather only one
    DBCC FREEPROCCACHE
    GO
    SELECT *
    FROM Sales.SalesOrderHeader
    WHERE SalesOrderID = 56000
    GO
    SELECT * FROM
    AdventureWorks.Sales.SalesOrderHeader WHERE
    SalesOrderID = 56001
    GO
    declare @i int
    set @i = 56004
    SELECT *
    FROM Sales.SalesOrderHeader
    WHERE SalesOrderID = @i
    GO
    select  stats.execution_count AS exec_count, 
    p.size_in_bytes as [size], 
    [sql].[text] as [plan_text]
    from sys.dm_exec_cached_plans p
    outer apply sys.dm_exec_sql_text (p.plan_handle) sql
    join sys.dm_exec_query_stats stats ON stats.plan_handle = p.plan_handle
    GO
    ----This time only (we get parameterization)
    DBCC FREEPROCCACHE
    GO
    EXEC sp_executesql N'SELECT  SUM(LineTotal) AS LineTotal
    FROM Sales.SalesOrderHeader H
    JOIN Sales.SalesOrderDetail D ON D.SalesOrderID = H.SalesOrderID
    WHERE H.SalesOrderID = @SalesOrderID', N'@SalesOrderID INT', 56000
    GO
    EXEC sp_executesql N'SELECT  SUM(LineTotal) AS LineTotal
    FROM Sales.SalesOrderHeader H
    JOIN Sales.SalesOrderDetail D ON D.SalesOrderID = H.SalesOrderID
    WHERE H.SalesOrderID = @SalesOrderID', N'@SalesOrderID INT', 56005
    GO
    select  stats.execution_count AS exec_count, 
    LEFT([sql].[text], 80) as [plan_text]
    from sys.dm_exec_cached_plans p
    outer apply sys.dm_exec_sql_text (p.plan_handle) sql
    join sys.dm_exec_query_stats stats ON stats.plan_handle = p.plan_handle
    GO
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Why does Mountain Lion take a long time to shut down my MacBook Air when I chose "Shut Down?"  Much longer than before the upgrade.

    Mountain Lion takes a long time to shut down.  Much longer then Lion.
    Any comments appreciated.
    Alan

    The honeymoon is over?

  • New hard drive running much louder than my orig. HD

    Hi there,
    I bought a Seagate Momentus XT hard drive and installed it in my MacBook Pro. It is running considerably louder than the stock HD in my Mac. Is this normal for this particular drive? Can I do anything about it? Its a hybrid drive, could that have something to do with it?
    Brandon

    You have a 13" so it only shows the single 'Exhaust' - running right at 2000rpm, which is normal. Your temps are also normal. So I would rule out the fan noise as a possibility. It could be as mende1 says - that Seagate drives are just 'noisier'... I have 4 external drives that are all Seagate and never here them (but they're in enclosures... both Thunderbolt and FireWire 800 connections).
    I think that you'll be fine - just don't let any 'chirping' go unheeded.
    Clinton

  • Firefox 4.0 runs much slower than FF 3.x and hangs

    After using FF 3.x for some time, I upgraded to FF 4.0 as soon as it came out. I find that simple things, like switching tabs and reloading pages takes much more time that FF3.x. On many occasions, I've had to cancel FF and restart it. Sometimes this was multiple times a day. The worst part was using Facebook and Farmville (a Flash application). It would hang many time in a session to the point that what took less than an hour took three or more.
    I finally tracked down the FF3.6 DL and reinstalled it and I find that the problem with FF4.0 no longer happens. In fact Farmville does not hang at all.
    The interesting thing is that each version of FF has its own icon and directory, but when I have one open and try the other, a second copy of the version running opens.

    http://support.mozilla.com/en-US/kb/Installing+a+previous+version+of+Firefox
    http://www.mozilla.com/en-US/firefox/all-older.html

Maybe you are looking for

  • How to Convert the content in BLOB field into a PDF file...

    Hi, I am having PDF files stored in BLOB column of a table in Oracle Database (11G R2). I want to retrieve the files back and store them in hard disk. I am successful in storing the content as a file with '.doc' but if I store the file as '.pdf', ado

  • This version of iTunes has not been correctly configured

    I completed a scan on my computer, and asked it to delete all duplicated files. For some reason i cannot open my iTunes, it just says 'This version of iTunes has not been correctly configured'. Me being me, i haven't copied any files or music to an e

  • Error, in Getting started with Labview. Chapter 3, part 4.

    Hi. Still struggling on, trying to find the time to work through the "Getting Started with LabVIEW" document. Only 19 days left to go, and I'm still only in chapter 3!... Right.  In the "Saving Data When Prompted by a User" exersise, part 4... 4.   R

  • ISCSI issue - can't detect the volume

    Hi, I configured iSCSI LUN on the NSS324 and put one of the NAS interface in to the iSCSI VLAN that has jumbo packet size support. Attached are my config screenshot. From the NAS, I can ping my vmware server's iSCSI interface at 9000 byte packet size

  • Select-options in ModulePool

    hi experts, I am facing one issue regarding the modulepool programming . In Module Pool Programming I am using select-options, I want to upload the selected ranges and also the excluded values as zeros in the database.Please any one help me.