Select running slow in prod but work fine in T-1

We have a query which run very slow on production database it is taking around 7 min to run.
While it is working fine on T-1 database which gets refreshed every night, here it takes around 3 seconds.
both the os version and database versions are same.
Database is also refreshed and have same data and statistics.
please update what could be the reason?
SELECT c.txt_master_claim_no "Master Claim No",
c.num_serial_no "Serial No",
TO_CHAR(c.dat_loss_date, 'dd / mm / yyyy') "Loss Date",
d.departmentname "Line of Business",
m.productname "Product",
tab.stat "Status"
FROM (SELECT t.num_claim_no, 'REPUDIATION' stat, num_update_no
FROM gc_clm_gen_info t, gc_clm_os a
WHERE t.num_update_no =
(SELECT MAX(p.num_update_no)
FROM gc_clm_gen_info p
WHERE p.num_claim_no = t.num_claim_no)
AND t.txt_claim_status = 'X'
AND a.cur_os_amount = 0
AND a.num_ac_year * 100 + a.num_ac_month =
(select max(s.num_ac_year * 100 + s.num_ac_month)
from gc_clm_os s
where s.num_claim_no = a.num_claim_no)
AND t.num_claim_no = a.num_claim_no
UNION
SELECT a.num_claim_no, 'DISBURSE' stat, num_update_no
FROM gc_clm_os a, gc_clm_gen_info b
WHERE a.cur_os_amount = 0
AND a.num_ac_year * 100 + a.num_ac_month =
(select max(s.num_ac_year * 100 + s.num_ac_month)
from gc_clm_os s
where s.num_claim_no = a.num_claim_no)
AND b.num_update_no >
(SELECT MAX(x.num_update_no)
FROM gc_clm_gen_info x
WHERE x.num_claim_no = b.num_claim_no
AND x.txt_claim_status in ('F', 'X'))
AND a.num_claim_no = b.num_claim_no
UNION
SELECT a.num_claim_no, 'DISBURSE' stat, num_update_no
FROM gc_clm_os a, gc_clm_gen_info b
WHERE a.cur_os_amount = 0
AND a.num_ac_year * 100 + a.num_ac_month =
(select max(s.num_ac_year * 100 + s.num_ac_month)
from gc_clm_os s
where s.num_claim_no = a.num_claim_no)
AND b.num_update_no =
(SELECT MAX(x.num_update_no)
FROM gc_clm_gen_info x
WHERE x.num_claim_no = b.num_claim_no)
AND a.num_claim_no = b.num_claim_no
And b.txt_claim_status = 'F'
and not exists
(select 1
from gc_clm_payment_details p
where p.num_claim_no = a.num_claim_no
and p.txt_status in ('APPROVAL DUE', 'APPROVED'))
) tab,
gc_clm_gen_info c,
uw_product_master m,
uw_department_master d
WHERE tab.num_claim_no = c.num_claim_no
AND c.num_update_no =
(SELECT MAX(d.num_update_no)
FROM gc_clm_gen_info d
WHERE d.num_claim_no = c.num_claim_no)
AND c.num_department_code = d.departmentcode
AND m.productcode = c.num_product_code
AND M.DEPARTMENTCODE=D.DEPARTMENTCODE
AND c.txt_claim_status NOT IN ('O', 'S')
AND c.num_update_no = tab.num_update_no
AND c.num_claim_no not in
(select p.num_claim_no
from gc_clm_payment_details p, gc_clmmst_resource_type r
where p.num_type_of_party = r.num_resource_type_cd
and r.txt_loss_exp = 'E'
and p.txt_status = 'APPROVAL DUE') and Upper(C.txt_master_claim_no) like '%C231110020345%' order by c.NUM_CLAIM_NO Desc;
Edited by: user12195658 on Mar 24, 2011 7:27 AM

from T-1 explain plan output is:
Explain complete.
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)|
| 0 | SELECT STATEMENT | | 1 | 132 | | 5862 (4)|
| 1 | SORT ORDER BY | | 1 | 132 | | 5862 (4)|
| 2 | NESTED LOOPS | | 1 | 132 | | 5853 (4)|
| 3 | NESTED LOOPS | | 1 | 97 | | 5852 (4)|
| 4 | NESTED LOOPS | | 1 | 83 | | 5851 (4)|
| 5 | VIEW | | 78 | 2574 | | 5617 (4)|
| 6 | SORT UNIQUE | | 78 | 6992 | | 5617 (78)|
| 7 | UNION-ALL | | | | | |
| 8 | FILTER | | | | | |
| 9 | HASH JOIN | | 29 | 1943 | | 1266 (5)|
| 10 | HASH JOIN | | 2895 | 115K| | 584 (5)|
| 11 | INDEX FAST FULL SCAN | IND_GC_CLM_GEN_INFO | 2437 | 43866 | | 353 (5)|
| 12 | TABLE ACCESS FULL | GC_CLM_OS | 36517 | 820K| | 229 (4)|
| 13 | VIEW | VW_SQ_1 | 43391 | 1101K| | 680 (4)|
| 14 | HASH GROUP BY | | 43391 | 1313K| 4712K| 680 (4)|
| 15 | TABLE ACCESS FULL | GC_CLM_OS | 65293 | 1976K| | 228 (4)|
| 16 | SORT AGGREGATE | | 1 | 15 | | |
| 17 | INDEX RANGE SCAN | IND_GC_CLM_GEN_INFO | 6 | 90 | | 3 (0)|
| 18 | HASH JOIN | | 76 | 6840 | | 2001 (5)|
| 19 | HASH JOIN | | 2207 | 137K| | 1338 (5)|
| 20 | HASH JOIN | | 365 | 17885 | 1256K| 1054 (4)|
| 21 | TABLE ACCESS FULL | GC_CLM_OS | 36517 | 820K| | 229 (4)|
| 22 | VIEW | VW_SQ_2 | 43391 | 1101K| | 680 (4)|
| 23 | HASH GROUP BY | | 43391 | 1313K| 4712K| 680 (4)|
| 24 | TABLE ACCESS FULL | GC_CLM_OS | 65293 | 1976K| | 228 (4)|
| 25 | INDEX FAST FULL SCAN | PK_GC_CLM_GEN_INFO | 262K| 3849K| | 276 (5)|
| 26 | VIEW | VW_SQ_3 | 30152 | 765K| | 661 (5)|
| 27 | HASH GROUP BY | | 30152 | 883K| 3336K| 661 (5)|
| 28 | INDEX FAST FULL SCAN | IND_GC_CLM_GEN_INFO | 46690 | 1367K| | 356 (6)|
| 29 | FILTER | | | | | |
| 30 | HASH JOIN | | 511 | 43435 | | 1535 (5)|
| 31 | HASH JOIN ANTI | | 337 | 22579 | | 1180 (4)|
| 32 | HASH JOIN | | 365 | 17885 | 1256K| 1054 (4)|
| 33 | TABLE ACCESS FULL | GC_CLM_OS | 36517 | 820K| | 229 (4)|
| 34 | VIEW | VW_SQ_4 | 43391 | 1101K| | 680 (4)|
| 35 | HASH GROUP BY | | 43391 | 1313K| 4712K| 680 (4)|
| 36 | TABLE ACCESS FULL | GC_CLM_OS | 65293 | 1976K| | 228 (4)|
| 37 | INDEX FAST FULL SCAN | IND_GC_CLM_PAYMENT_DETAILS | 2396 | 43128 | | 125 (6)|
| 38 | INDEX FAST FULL SCAN | IND_GC_CLM_GEN_INFO | 44253 | 777K| | 354 (5)|
| 39 | SORT AGGREGATE | | 1 | 15 | | |
| 40 | INDEX RANGE SCAN | IND_GC_CLM_GEN_INFO | 6 | 90 | | 3 (0)|
| 41 | TABLE ACCESS BY INDEX ROWID | GC_CLM_GEN_INFO | 1 | 50 | | 3 (0)|
| 42 | INDEX RANGE SCAN | PK_GC_CLM_GEN_INFO | 1 | | | 2 (0)|
| 43 | SORT AGGREGATE | | 1 | 15 | | |
| 44 | INDEX RANGE SCAN | IND_GC_CLM_GEN_INFO | 6 | 90 | | 3 (0)|
| 45 | NESTED LOOPS | | 1 | 26 | | 5 (0)|
| 46 | TABLE ACCESS BY INDEX ROWID| GC_CLM_PAYMENT_DETAILS | 1 | 21 | | 4 (0)|
| 47 | INDEX RANGE SCAN | IND_GC_CLM_PAYMENT_DETAILS | 1 | | | 3 (0)|
| 48 | TABLE ACCESS BY INDEX ROWID| GC_CLMMST_RESOURCE_TYPE | 1 | 5 | | 1 (0)|
| 49 | INDEX UNIQUE SCAN | PK_GC_CLMMST_RESOURCE_TYPE | 1 | | | 0 (0)|
| 50 | INDEX RANGE SCAN | UW_DEPARTMENT_MASTER_INDX | 1 | 14 | | 1 (0)|
| 51 | INDEX RANGE SCAN | IND_UW_PRODUCT_MASTER | 1 | 35 | | 1 (0)|
Note
- 'PLAN_TABLE' is old version
61 rows selected.

Similar Messages

  • Program Error from running the *,exe file but works fine running with CVI

    When starting CVI created program on Win 2000, I get message “Program Error”.
    I have created a program using NI/CVI version 5.5. I am running windows 2000, I get message 
    “Program Error"
    *.exe has generated errors and will be closed by Windows. You will need to restart the program.
    An error log is being created.”
    It works fine when running directly from the compilier, but if I run just the *.exe I get this error.  I never used to.
    Please let me know if anyone else had this problem or knows solution.
    Thank you very much.
    Craig

    In the debugger unitialized globals are initialized to zero, but not for a release .exe.  So if you are checking whether a global pointer is NULL before it is set to a value by your application it will generally work fine in the debugger but may crash as a release configuration depending on what you use that pointer for.  That's a common thing I have run into.

  • LSMW Fails when run in B/G but works fine in Front end..why?

    Hi All,
    i am trying to run a batch process by LSMW, my files are accurate, no problem with them, everything works fine but it fails when run in BG..works absolutely fine in front end. whats the diff with running in B/G?
    same thing happens when i am trying to execute an RFC thru SAP JCO, it works when debugger is on (i guess switching on debugger is similar to running in B/G) but it doesnt work when debugger is off. but when i execute that RFC directly in se37 from SAP gui it works fine..fails when connected to JCO..
    i am not having this issue with r/3 4.6c or mySAP ECC.6.0  i have this issue only in r/3 4.7.
    has anyone faced the similar situtaion? pls help.
    thanks.
    p.s if this may help. the RFC and LSMW error both are pertaining to change in address of US employees.( infotype 0006)

    Applying  SAP note 928273 Solved this issue.

  • No voice when selecting "start speeking" in mail, but works fine in Safari and text edit.

    No voice in "mac mail" on IMac Lion 10.7.2. when I select Start speeking,
    Works fine in Safari and text edit.
    Also works fine in Mail on my Macbook Pro 10.6.8

    I Plugged Headphones in to headphone jack and selected speech in mail and could here voice through headphones.
    Disconnected headphones and 'Mail' 'Speech' now plays fine through speakers ?

  • Selection tool not transforming rectangles but works fine with other shapes

    I can't transform rectangle shapes with the selection tool.  I've already tried showing the bounding box (command+shift+B), but it still doesn't work.  I have no transforming issues with any of the other shapes, just the rectangles.  Please help!

    2bcris,
    The Live Rectangle bug which is limited to the MAC versions starting with 10.7 and 10.8, but not 10.9 (Mavericks).
    So a switch to Mavericks with a reinstallation might be the way to solve it here and now.
    To get round it in each case, it is possible to Expand the Live Rectangles to get normal old fashioned rectangles, or to Pathfinder>Unite, or to use the Scale Tool.
    A more permanent way round that is to create normal old fashioned rectangles, after running the free script created by Pawel, see this thread with download link:
    https://forums.adobe.com/thread/1587587

  • I have a Mac running 10.9.2. My wireless mouse with not scroll in mail but works fine in other applications? Any suggestions?

    I have a Mac running 10.9.2. My apple wireless mouse will not scroll in Mail but works fine in other applications.
    Any suggestions?

    First, see this discussion. If the solution suggested there doesn't work for you, continue.
    If you've installed a Mail plugin called "Mail Unread Menu" and you know how to remove it, please do that, then quit and relaunch Mail. Test. Otherwise, see below.
    Back up all data.
    1. Triple-click anywhere in the line below on this page to select it:  
    ~/Library/Mail/Bundles
    Right-click or control-click the highlighted line and select 
    Services ▹ Open
    from the contextual menu.* A folder may open, or you may get an error message that the item can't be found. Either result is normal. If the folder does open and has contents, move the contents to the Desktop. Relaunch Mail and test. If there's no change, put the contents of the folder back and quit Mail again.
    2. Repeat with this line:
    /Library/Mail/Bundles
    This time you may be prompted for your login password when you remove the items. Make sure they're removed from the folder and not just copied to the Desktop. If necessary, copy them first and then move the originals to the Trash.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

  • Trying to download image files into lightrrom 5 on an imac running 10.8.5. Works fine with camera roll section but Icloud section does not appear as source in lightroom. How to access?

    Trying to download image files into lightrrom 5 on an imac running 10.8.5. Works fine with camera roll section but Icloud section does not appear as source in lightroom. How to access?

    You need to sync them in iTunes and download them there, then simply open them from the folder where they are stored in other programs.
    Mylenium

  • People picker is not working for ie11 but working fine for other lower version

    i am using sharepoint 2010 and windows authentication
    recently i have updated my ie to ie11 and problem goes here.
    when i try to select from people picker, there are an unexpected error happened 
    however when i use other ie version, people picker work fine, what goes wrong?
    i have already added my system as trusted site
    if there any others thing i miss out?

    Hi,
    According to your post, my understanding is that People picker is not working for ie11 but working fine for other lower version.
    IE 11 is known to have compatibility issues on SharePoint 2010, please make sure to:
    first of all, try installing latest update for IE 11 (several compatibility issues were fixed since the first release)
    add the site to compatibility view (in IE> Tools> Compatibility view settings> type site name> add)
    add the site to trusted sites and set the zone security level to low (in IE> Internet Options> Security> trusted sites> sites>add your site there> ok> custom level> select low> reset> ok)
    You can use developer tools (f12) and set browser mode to the version that is most compatible with your environment.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Audio attachment will not open and play on Ipad4 but works fine on PC. Any suggestions?

    I have been sent an audio attachment in an email to a Hotmail account. It opens and plays fine on my PC but will not open on my Ipad. I get a pop up wanting to forward the attachment from my Comcast email account but neither will open and play it. Any suggestions?

    I kept looking and found this answer in an Ipad forum from IpadJunkie. "Try the OPlayerHD lite app...free. When pressing and holding the WMA attachment select open with OPlayer and it works fine."

  • TS2972 First night I was able to watch 2 TV shows (45 min each) with no problems, but thereafter programs will not stream without constant pause to buffer. Weather conditions are ideal and my internet comes from crappy hugesnet, but worked fine the first

    First night I was able to watch 2 TV shows (45 min each) with no problems, but thereafter programs will not stream without constant pause to buffer. Weather conditions are ideal and my internet comes from crappy hugesnet, but worked fine the first night.

    The speed may have been ok at that time and is too inconsistent/too slow overall. interference may have proven to be more of an issue since as well. If using public DNS that will provide Intermittant results
    I'm sure using a hotspot would be fine but it depends on your viewing habits. An HD movie is around 4-5GB. It would also be subject to speed. requirements so best to test to see how it compares.
    You would have to check with your Carrier if hotspot it's enabled then just to into your settings and toggle it ON

  • Newest version of flash player not playing in newest version of google chrome but works fine in IE

    newest version of flash player not playing in newest version of google chrome but works fine in IE

    jennifer.jones214 wrote:
    In your  opinion, should I uninstall Firefox if I am installing Waterfox?
    Waterfox can coexist peacefully with Waterfox.  I have both installed, but never use Firefox any more.
    Not only can Waterfox run in 64-bit address space, it also is better optimized during compile time than Firefox.  (For obvious reasons; Firefox is compatible with many old systems, Waterfox only needs to be compatible with new 64-bit systems.)
    P.S. regarding Chris' advice above; Firefox and Waterfox use the same profile, so if that is actually the problem, then it will occur in both browsers.

  • How do I do a defrag? My machine is running slow and defragging always worked with Microsoft. Thanks in advance.

    How do I do a defrag? My machine is running slow and defragging always worked with Microsoft. Thanks in advance.

    Pat,
    Use Activity Monitor to keep an eye on your disk use and memory use. You may hear different figures, but I like to see my free disk and free memory above 25%. Sometimes all it takes is a Restart. Try to minimize the number of browser windows you have open at once. Quit unused applications.
    Many of us in this discussion area like to use OnyX periodically. It clears caches and repairs permissions, etc. You can download it from this site.  Be sure to download the one for the OS version you are using. There is a script called Automation within OnyX that allows you to start it and come back later when it's done with several actions.
    Jerry

  • My imac feels really hot, but works fine.  Should I be worried?

    My imac feels really hot, but works fine.  Should I be worried??  My son plays a Star Wars game on line that seems to make it become really hot.  He says it skips during the game, so he gets out of the game.  When I check the computer, everything is fine.  Thanks!!

    alb,
    What you are experiencing is fairly commom.  When our grandkids play games on our Mac, that's when things do get pretty warm, especially in the upper left hand corner where the CPU is.  The imac does rely heavily on "heat sink" technology instead of high speed, noisy fans to keep things running properly.  That being said, be sure to keep the vents that are located on the top back section of the computer screen, clean.  This will allow for proper venting. If your son plays computer games long and often, you can keep a small external fan running in back of the Mac. This may be appropriate in the hot Summer,  in a non air conditioned environment.
    Wuz

  • TS1966 I cannot play video on safari but works fine on google chrome?  What do i need to do to fix it?

    I cannot play video on safari but works fine on google chrome?  What do i need to do to fix it?

    If you have the ClickToFlash extension installed, that can prevent Flash based video from streaming. Safari > Preferences > Extensions
    It can also be installed as a plugin in /Library/Internet-Plug-Ins.
    Try uninstalling the currently installled Flash plugin (required for most YouTube content) then reinstall new >  Troubleshoot Flash Player | Mac OS
    From your Safari menu bar top of your screen click Safari > Preferences then select the Advanced tab.
    Select:  Show Develop menu in menu bar
    Now from the menu bar click Develop > Empty Caches

  • HT1414 touch screen does not work on my ipod when playing music on itunes, but works fine on every other thing on ipod

    touch screen does not work on my ipod when playing music on itunes, but works fine on every other thing on ipod, can anyone help or what is the cause

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          

Maybe you are looking for

  • How to see images in m4a file using itunes

    So I used garageband to make an enhanced podcast. It has audio and images. That went fine, and I saved it as an m4a file (from the share menu, I chose "Export podcast to disk"). When I open it in itunes, I hear the audio, and can choose the chapters,

  • Getting only 1 peak value per cycle

    Hi, I am studying hopping, and my subjects hop on a force plate at 2.2Hz for 30 seconds. I am attempting to output one peak ground reaction force for each hop in a bar chart, but my program is running so quickly that I get multiple peaks for each hop

  • Flex Builder 3 Performance

    Hi, Flex Builder's a great tool, but I get frustrated when it slows to a crawl. Are there any known issues? Any ways to make it optimize the performance. Any help would be appreciated. Thanks

  • Render Problem, komische Transparenz

    Hallo liebe Leute, ich habe ein Problem, und zwar sehe ich bei einer Vorschau mit halber Auflösung mein Projekt perfekt, aber sobald ich die Auflösung auf Voll stelle bekomme ich komische Transparenzen und manchmal verschwinden die Texturen sogar gan

  • SCCM 2012 client not getting updates, processidtosessionid failed, getfileinfosize failed, createobjectasync error

    I have one particular client that will not pull down patches from the site server. The ccmcache folder stays empty, nothing appears in Software Center, report Compliance 5 - Specific Computer says it needs 4 patchs and that they are approved (other c