Connecting to the db is taking too long with Shared Servers connection

Hi all
OS: Solaris 11 SPARC 64 bits
DB: 2-node RAC Oracle 11.2.0.3.5
After doing a migration of a 40GBs database from a 9i database to a 11g database, it's takin too long to connect to the db, which is using shared server. In the moment, there aren't any applications using the db, just myself. Doing some tests, i saw that when i use a dedicated connection, i can connect almost instantly, but using the shared connection, it takes almost 4 seconds to connect, via sqlplus. Here are some shared server parameters:
shared_server_sessions               integer
shared_servers                          integer     1
max_shared_servers                   integer     20
dispatchers                               string      (protocol=TCP)(disp=5)
max_dispatchers                        integer     5
lsnrctl service
  Instance "INSTANCE", status READY, has 6 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:5 refused:0 state:ready
         LOCAL SERVER
      "D004" established:93 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: orahml01, pid: 4073>
         (ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=65402))
      "D003" established:85 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: orahml01, pid: 4070>
         (ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=44055))
      "D002" established:90 refused:0 current:2 max:1022 state:ready
         DISPATCHER <machine: orahml01, pid: 4066>
         (ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=41277))
      "D001" established:89 refused:0 current:1 max:1022 state:ready
         DISPATCHER <machine: orahml01, pid: 4062>
         (ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=61887))
      "D000" established:91 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: orahml01, pid: 4060>
         (ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=44222))
  INSTANCE =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = hostname-scan)(PORT = 1521))
      (CONNECT_DATA =
        (SERVER = SHARED)
        (SERVICE_NAME = INSTANCE)
INSTANCE1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = hostname-vip)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = INSTANCE)
      (INSTANCE_NAME = INSTANCE1)
INSTANCE2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = hostname-vip)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = INSTANCE)
      (INSTANCE_NAME = INSTANCE2)
  ) The alert.log doesn't show anything wrong.
What can be causing this issue with shared servers?
Thanks in advance.
Edited by: Fabricio_Jorge on 27/03/2013 06:14

Hello,
Refer to the documentation is a great help.Please have a look at the below link:
http://docs.oracle.com/cd/B10501_01/server.920/a96533/features.htmLook at the part :
Performance of certain database features can improve when a shared server architecture is used, and performance of certain database features can degrade slightly when a shared server architecture is used. For example, a session can be prevented from migrating to another shared server while parallel execution is active.i know that this maynot be the case here but please read this document and apply it as it will help you understand what is going on.
BR
Mohamed ELAzab
http://mohamedelazab.blogspot.com

Similar Messages

  • Browser times out when trying to view my website - says the server is taking too long. And no, I don't have a firewall.

    I can't view my website at www.artisancandies.com, even though it's working and everyone else seems to see it. No, I don't have a firewall, and it's not because of my internet provider - I have AT&T at work, and Comcast at home. My husband can see the site on his laptop. I tried dumping my cache in both Firefox and Safari, but it didn't work. I looked at it through proxify.com, and can see it that way, so I know it works. This is so frustrating, because I used to only see it when I typed in artisancandies.com - it would never work for me if I typed in www.artisancandies.com. Now it doesn't work at all. This is the message I get in Firefox:
    "The connection has timed out. The server at www.artisancandies.com is taking too long to respond."
    Please help!!!
    Kristen Scott

    Linc, here's what I've got from what you asked me to do. I hope you don't mind, but it was simple enough to leave everything in, so you could see the progression:
    Kristen-Scotts-Computer:~ kristenscott$ kextstat -kl | awk ' !/apple/ { print $6 $7 } '
    Kristen-Scotts-Computer:~ kristenscott$ sudo launchctl list | sed 1d | awk ' !/0x|apple|com\.vix|edu\.|org\./ { print $3 } '
    WARNING: Improper use of the sudo command could lead to data loss
    or the deletion of important system files. Please double-check your
    typing when using sudo. Type "man sudo" for more information.
    To proceed, enter your password, or type Ctrl-C to abort.
    Password:
    com.microsoft.office.licensing.helper
    com.google.keystone.daemon
    com.adobe.versioncueCS3
    Kristen-Scotts-Computer:~ kristenscott$ launchctl list | sed 1d | awk ' !/0x|apple|edu\.|org\./ { print $3 } '
    com.google.keystone.root.agent
    com.adobe.ARM.202f4087f2bbde52e3ac2df389f53a4f123223c9cc56a8fd83a6f7ae
    Kristen-Scotts-Computer:~ kristenscott$ ls -1A {,/}Library/{Ad,Compon,Ex,Fram,In,La,Mail/Bu,P*P,Priv,Qu,Scripti,Sta}* 2> /dev/null
    /Library/Components:
    /Library/Extensions:
    /Library/Frameworks:
    Adobe AIR.framework
    NyxAudioAnalysis.framework
    PluginManager.framework
    iLifeFaceRecognition.framework
    iLifeKit.framework
    iLifePageLayout.framework
    iLifeSQLAccess.framework
    iLifeSlideshow.framework
    /Library/Input Methods:
    /Library/Internet Plug-Ins:
    AdobePDFViewer.plugin
    Disabled Plug-Ins
    Flash Player.plugin
    Flip4Mac WMV Plugin.plugin
    Flip4Mac WMV Plugin.webplugin
    Google Earth Web Plug-in.plugin
    JavaPlugin2_NPAPI.plugin
    JavaPluginCocoa.bundle
    Musicnotes.plugin
    NP-PPC-Dir-Shockwave
    Quartz Composer.webplugin
    QuickTime Plugin.plugin
    Scorch.plugin
    SharePointBrowserPlugin.plugin
    SharePointWebKitPlugin.webplugin
    flashplayer.xpt
    googletalkbrowserplugin.plugin
    iPhotoPhotocast.plugin
    npgtpo3dautoplugin.plugin
    nsIQTScriptablePlugin.xpt
    /Library/LaunchAgents:
    com.google.keystone.agent.plist
    /Library/LaunchDaemons:
    com.adobe.versioncueCS3.plist
    com.apple.third_party_32b_kext_logger.plist
    com.google.keystone.daemon.plist
    com.microsoft.office.licensing.helper.plist
    /Library/PreferencePanes:
    Flash Player.prefPane
    Flip4Mac WMV.prefPane
    VersionCue.prefPane
    VersionCueCS3.prefPane
    /Library/PrivilegedHelperTools:
    com.microsoft.office.licensing.helper
    /Library/QuickLook:
    GBQLGenerator.qlgenerator
    iWork.qlgenerator
    /Library/QuickTime:
    AppleIntermediateCodec.component
    AppleMPEG2Codec.component
    Flip4Mac WMV Export.component
    Flip4Mac WMV Import.component
    Google Camera Adapter 0.component
    Google Camera Adapter 1.component
    /Library/ScriptingAdditions:
    Adobe Unit Types
    Adobe Unit Types.osax
    /Library/StartupItems:
    AdobeVersionCue
    HP Trap Monitor
    Library/Address Book Plug-Ins:
    SkypeABDialer.bundle
    SkypeABSMS.bundle
    Library/Internet Plug-Ins:
    Move_Media_Player.plugin
    fbplugin_1_0_1.plugin
    Library/LaunchAgents:
    com.adobe.ARM.202f4087f2bbde52e3ac2df389f53a4f123223c9cc56a8fd83a6f7ae.plist
    com.apple.FolderActions.enabled.plist
    com.apple.FolderActions.folders.plist
    Library/PreferencePanes:
    A Better Finder Preferences.prefPane
    Kristen-Scotts-Computer:~ kristenscott$

  • What will happen if i leave the wifi area while downloading ios 7 software? the download is taking too long and i need to go somewhere

    ive been trying to download for hours now and its taking too long, i have places to go but i dont want to leave the wifi area if it will harm my iphone and the ios7 software isn't finished downloading...

    I think you can stop the download without any harm coming to your phone. But if it is actually installing and not just downloading, I would let it finish.

  • Connect by level query is taking too long time to run

    Hello,
    I have a query that returns quarters (YYYYQ) of a begin- and enddate within a specific id, that is built with a connect by level clause, but the query is running to long. I have used explain plan to see what the query is doing, but no silly things to see, just a full table scan, with low costs.
    This is the query:
    select to_char(add_months( cpj.crpj_start_date,3*(level - 1)),'YYYYQ') as sales_quarter
    , cpj.crpj_id as crpj_id
    from mv_gen_cra_projects cpj
    where cpj.crpj_start_date >= to_date('01/01/2009','mm/dd/yyyy')
    and cpj.crpj_start_date <= cpj.crpj_end_date
    and cpj.crpj_routing_type = 'A'
    and ( cpj.crpj_multi_artist_ind = 'N'
    or cpj.crpj_multi_artist_ind is null)
    connect by level <= 1 + ceil(months_between(cpj.crpj_end_date,cpj.crpj_start_date)/3);
    The result have to be like this:
    SALES_QUARTER CRPJ_ID
    20091 100
    20092 100
    20093 100
    20094 100
    20101 100
    20102 100
    Can anyone help me out with this?

    but no silly things to see, just a full table scan, with low costs.Well, maybe an index scan would be faster?
    However:
    You will need to provide us some more details, like:
    - database version (the result of: SQL> select * from v$version;)
    - post the explain plan output (put the tag before and after it, so indentation and formatting are maintained, see the [FAQ|http://forums.oracle.com/forums/help.jspa] for more explanation regarding tags )
    - what are your optimizer settings (the result of: SQL> show parameter optimizer)
    - if applicable: are your table statistics up to date?
    - mv_gen_cra_projects  is a materialized view perhaps?
    Edited by: hoek on Jan 26, 2010 10:50 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • E-MU USB 0404, what the hell is taking so long with Windows 7 drivers?

    Windows 7 beta was out ages ago, the RC has been out for some time.
    WTF is taking so long?
    Someone want to tell the developers I have a $200 USB audio device that I can't use with my operating system and to get off their lazy asses and put at least a beta out there.
    Ridiculous.

    Woah simmer down. Have you tried using the Windows Vista drivers? I was informed that the Vista drivers are working well in the final version of Windows 7.
    No they're not. They function but they're not working well. ASIO is OK, but try using Media Player for more than 5 minutes (Win 7 build 7100 x64, AMD Phenom x2/910, Asus MB) and you get timing glitches, sometimes the sample rate/bit depth gets crushed for 5 or 10 seconds. It's like listening to a dirty CD that keeps skipping slightly. Also, the sound just dies at reandom intervals, necessitating a switch in the windows control panel from 16 to 24 bit or back again to get it to 'wake up'.
    The Vista drivers are 18 months old. Although the Win 7 driver model is similar to Vista it's not the exact same, or other companies wouldn't be bothering to put out Win7 drivers. Other companies...whose hardware I am much more likely to buy instead of Emu/Creative next time (even though I have purchased multiple 1820s and 0404s for myself and clients over the last 5 years). Heck, even the Creative consumer cards have beta Windows drivers. Someone at Emu needs a kick in the pants and today it's you, I guess.
    'Problem? What problem?' is not support. It's the voice of failure.

  • I am using the database connectivity toolkit to retrieve data using a SQL query. The database has 1 million records, I am retrieving 4000 records from the database and the results are taking too long to get, is there any way of speeding it up?

    I am using the "fetch all" vi to do this, but it is retrieving one record at a time, (if you examine the block diagram) How can i retrieve all records in a faster more efficient manner?

    If this isn't faster than your previous method, then I think you found the wrong example. If you have the Database Connectivity Toolkit installed, then go to the LabVIEW Help menu and select "Find Examples". It defaults to searching for tasks, so open the "Communicating with External Applications" and "Databases" and open the Read All Data. The List Column names just gives the correct header to the resulting table and is a fast operation. That's not what you are supposed to be looking at ... it's the DBTools Select All Data subVI that is the important one. If you open it and look at its diagram, you'll see that it uses a completely different set of ADO methods and properties to retrieve all the data.

  • I cannot access aol. I get a message saying the website is taking too long to respond. How can this be fixed?

    The problem started yesterday. I am using the firefox browser.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I reset my ipod and the porcess is taking too long who do i fix this

    my ipod is jailbroken and i downloaded some thing called sbsetting and it did some thing that made the apps on my ipod to disapear i tried to fix it but no use so i reset it and it is still not done with the process please help                                       

    Jailbreaking voids the Apple warranty and also means that you will not get any support from Apple, including from this Apple forum. Jailbreaking can't be discussed in this Apple forum.
      Unauthorized modification of iOS has been a major source of instability, disruption of services, and other issues

  • Connect by taking too long

    Hello,
    I have a table "a" that has:
    left_id right_id type
    4 5 1
    4 6 1
    4 7 1
    5 9 2
    5 10 2
    5 11 2
    9 13 3
    13 14 4
    10 15 3
    QUERY:
    select left_id, right_id, type from
    a
    connect by left_id = prior right_id
    start with left_id = 4;
    Execution Plan
    Plan hash value: 2739023583
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 29 | 1131 | 18 (12)| 00:00:01 |
    |* 1 | CONNECT BY WITH FILTERING| | | | | |
    |* 2 | INDEX RANGE SCAN | a_PK | 5 | 65 | 3 (0)| 00:00:01 |
    | 3 | NESTED LOOPS | | 24 | 624 | 13 (0)| 00:00:01 |
    | 4 | CONNECT BY PUMP | | | | | |
    |* 5 | INDEX RANGE SCAN | a_PK | 5 | 65 | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - access("LEFT_ID"=PRIOR "RIGHT_ID")
    2 - access("LEFT_ID"=4)
    5 - access("LEFT_ID"="connect$_by$_pump$_002"."prior right_id ")
    Is there a way to optimize the query?
    The query is taking too long.
    -Thanks
    Karthik
    Edited by: user3934098 on Nov 14, 2010 1:50 AM

    Here is the detailed explaination:
    Version: oracle 10g R2
    Create table statement:
    CREATE TABLE A
    "LEFT_ID" NUMBER(9,0) NOT NULL ENABLE,
    "RIGHT_ID" NUMBER(9,0) NOT NULL ENABLE,
    "TYPE" NUMBER(9,0) NOT NULL ENABLE,
    CONSTRAINT "A_PK" PRIMARY KEY ("LEFT_ID", "RIGHT_ID", "TYPE") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "DATA" ENABLE,
    CONSTRAINT "A_FK1" FOREIGN KEY ("TYPE") REFERENCES "B" ("TYPE") ENABLE
    SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
    INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
    TABLESPACE "DATA" ;
    Insert statements:
    INSERT INTO A VALUES(4, 5, 1);
    INSERT INTO A VALUES(4, 6, 1);
    INSERT INTO A VALUES(4, 7, 1);
    INSERT INTO A VALUES(5, 9, 2);
    INSERT INTO A VALUES(5, 10, 2);
    INSERT INTO A VALUES(5, 11, 2);
    INSERT INTO A VALUES(9, 13, 3);
    INSERT INTO A VALUES(13, 14, 4);
    INSERT INTO A VALUES(10, 15, 3);
    INDEXES:
    CREATE UNIQUE INDEX "A_PK" ON "A" ("LEFT_ID", "RIGHT_ID", "TYPE") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "DATA" ;
    QUERY:
    select left_id, right_id, type from
    a
    connect by left_id = prior right_id
    start with left_id = 4;
    THE table has 951053 rows
    The explain plan is:"
    Execution Plan
    Plan hash value: 2739023583
    Id Operation Name Rows Bytes Cost (%CPU) Time
    0 SELECT STATEMENT 29 1131 18 (12) 00:00:01
    * 1 CONNECT BY WITH FILTERING
    * 2 INDEX RANGE SCAN a_PK 5 65 3 (0) 00:00:01
    3 NESTED LOOPS 24 624 13 (0) 00:00:01
    4 CONNECT BY PUMP
    * 5 INDEX RANGE SCAN a_PK 5 65 2 (0) 00:00:01
    Predicate Information (identified by operation id):
    1 - access("LEFT_ID"=PRIOR "RIGHT_ID")
    2 - access("LEFT_ID"=4)
    5 - access("LEFT_ID"="connect$_by$_pump$_002"."prior right_id ")
    Now is there a way to optimize the query? The query takes about a min to excute. This will be my inner query.
    " Is there any other information that you may need? Am I missing something here? "
    -Thanks
    Karthik
    Edited by: user3934098 on Nov 14, 2010 2:22 AM

  • Moving the 80 Million records from Conversion database to System Test database (Just for one transaction table) taking too long.

    Hello Friends,
    The background is I am working as conversion manager and we move the data from oracle to SQL Server using SSMA and then we will apply the conversion logic and then move the data to system test ,UAT and Production.
    Scenario:
    Moving the 80 Million records from Conversion database to System Test database (Just for one transaction table) taking too long. Both the databases are in the same server.
    Questions are…
    What is best option?
    IF we use the SSIS it’s very slow and taking 17 hours (some time it use to stuck and won’t allow us to do any process).
    I am using my own script (Stored procedure) and it’s taking only 1 hour 40 Min. I would like know is there any better process to speed up and why the SSIS is taking too long.
    When we move the data using SSIS do they commit inside after particular count? (or) is the Microsoft is committing all the records together after writing into Transaction Log
    Thanks
    Karthikeyan Jothi

    http://www.dfarber.com/computer-consulting-blog.aspx?filterby=Copy%20hundreds%20of%20millions%20records%20in%20ms%20sql
    Processing
    hundreds of millions records can be done in less than an hour.
    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

  • User logon taking too long

    Hi
    Windows XP clients are taking too long to login after connecting to the domain.
    i have the following setup
    Site A - WIndows 2008 R2 in WINdows 2003 Native Mode, 2 DC's , both GC, Subnet mapped to Site A
    Site B - WIndows 2008 R2 in WINdows 2003 Native Mode, 1 DC, GC, No subnet Map except the local subnet
    Site C - no servers, users are authneticating from "Site A"
    but when i am login from the XP machine, it is trying to login to the Site B DC which is not mapped to Site C, is there any specific way to address this issue,
    it is ok with windows 7
    DEPA

    Hi,
    In addition to the above troubleshooting suggestions, please also refer to the following links for more troubleshooting information:
    Troubleshooting the intermittent slow logon or slow startup
    http://blogs.technet.com/b/instan/archive/2008/04/17/troubleshooting-the-intermittent-slow-logon-or-slow-startup.aspx
    Troubleshooting Slow Logons
    http://support.citrix.com/article/CTX101705
    Regards,
    Arthur Li
    TechNet
    Subscriber Support
    If you are
    TechNet Subscription
    user and have any feedback on our support quality, please send your feedback
    here.
    Arthur Li
    TechNet Community Support

  • Elements 10 reinstall taking too long

    I've been trying to reinstall Elements as I've recently upgraded my laptop. The download says it's taking anywhere from 6 to 21 hours!! I've tried it three times on three seperate days on both Chrome and IE and it always ends with the message "the download was taking too long and was stopped by the network". When I try to restart it it restarts from scratch, making it imposssible to ever complete the download. How can I reinstall Elements? I'm downloading from Thailand, is there a special server I should be connecting to?

    What is your current Bandwidth?
    Try from Adobe.com, and use the "In-Cognito Window" (Ctrl+Shift+N) in Chrome, (When you go to www.adobe.com, Choose - UnitesStates English, if it asks you)
    Cheers
    LP

  • Query taking too long on Oracle9i

    Hi All
    I am running a query on our prod database (Oracle8i 8.1.7.4) and again running the same query on Test db (Oracle9i version 4). The query is taking too long(more then 10 min) in test db. Both the database are installed on the same machine IBM AIX V4 and table schema and data are same.
    Any help would be appreciated.
    Here are the results.
    FASTER ONE
    ORACLE 8i using Production
    Statistics
    864 recursive calls
    68 db block gets
    159855 consistent gets
    20297 physical reads
    0 redo size
    1310148 bytes sent via SQL*Net to client
    68552 bytes received via SQL*Net from client
    1036 SQL*Net roundtrips to/from client
    28 sorts (memory)
    1 sorts (disk)
    15525 rows processed
    SLOWER ONE
    ORACLE 9i using Test
    Statistics
    819 recursive calls
    80 db block gets
    22981568 consistent gets
    1361 physical reads
    0 redo size
    1194902 bytes sent via SQL*Net to client
    34193 bytes received via SQL*Net from client
    945 SQL*Net roundtrips to/from client
    0 sorts (memory)
    1 sorts (disk)
    14157 rows processed

    319404-
    To help us better understand the problem,
    1) Could you post your execution plan on the two different databases?
    2) Could you list indexes (if any, on these tables)?
    3) Are any of the objects in the 'from list' a view?
    If so, are you using a user defined function to create the view?
    4) Why are you using the table 'cal_instance_relationship' twice in the 'from ' clause'?
    5) Can't your query be the following?
    SELECT f.person_id, f.course_cd, cv.responsible_org_unit_cd cowner, f.fee_cal_type Sem, f.fee_ci_sequence_number seq_no,
    sua.unit_cd, uv.owner_org_unit_cd uowner, uv.supervised_contact_hours hours, 0 chg_rate, sum(f.transaction_amount) tot_fee,
    ' ' tally
    FROM unit_version uv,
    cal_instance_relationship cir1,
    chg_method_apportion cma,
    student_unit_attempt sua,
    course_version cv,
    fee_ass f
    WHERE f.fee_type = 'VET-MATFEE'
    AND f.logical_delete_dt IS NULL
    AND f.s_transaction_type IN ('ASSESSMENT', 'MANUAL ADJ')
    AND f.fee_ci_sequence_number > 400
    AND f.course_cd = cv.course_cd
    AND cv.version_number = (SELECT MAX(v.version_number) FROM course_version v
    WHERE v.course_cd = cv.course_cd)
    AND f.person_id = sua.person_id
    and f.course_cd = sua.course_cd
    AND f.fee_type = cma.fee_type
    AND f.fee_ci_sequence_number = cma.fee_ci_sequence_number
    AND cma.load_ci_sequence_number = cir1.sub_ci_sequence_number
    AND cir1.sup_cal_type = 'ACAD-YR'
    AND cir1.sub_cal_type = sua.cal_type
    AND cir1.sub_ci_sequence_number = sua.ci_sequence_number
    AND sua.unit_attempt_status NOT IN ('DUPLICATE','DISCONTIN')
    AND sua.unit_cd = uv.unit_cd
    AND sua.version_number = uv.version_number
    GROUP BY f.person_id, f.course_cd, cv.responsible_org_unit_cd , f.fee_cal_type, f.fee_ci_sequence_number,
    sua.unit_cd, uv.owner_org_unit_cd, uv.supervised_contact_hours;

  • Data Archive Script is taking too long to delete a large table

    Hi All,
    We have data archive scripts, these scripts move data for a date range to a different table. so the script has two parts first copy data from original table to archive table; and second delete copied rows from the original table. The first part is executing very fast but the deletion is taking too long i.e. around 2-3 hours. The customer analysed the delete query and are saying the script is not using index and is going into full table scan. but the predicate itself is the primary key, Please help... More info below
    CREATE TABLE "APP"."MON_TXNS"
       (    "ID_TXN" NUMBER(12,0) NOT NULL ENABLE,
        "BOL_IS_CANCELLED" VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL ENABLE,
        "ID_PAYER" NUMBER(12,0),
        "ID_PAYER_PI" NUMBER(12,0),
        "ID_PAYEE" NUMBER(12,0),
        "ID_PAYEE_PI" NUMBER(12,0),
        "ID_CURRENCY" CHAR(3 BYTE) NOT NULL ENABLE,
        "STR_TEXT" VARCHAR2(60 CHAR),
        "DAT_MERCHANT_TIMESTAMP" DATE,
        "STR_MERCHANT_ORDER_ID" VARCHAR2(30 BYTE),
        "DAT_EXPIRATION" DATE,
        "DAT_CREATION" DATE,
        "STR_USER_CREATION" VARCHAR2(30 CHAR),
        "DAT_LAST_UPDATE" DATE,
        "STR_USER_LAST_UPDATE" VARCHAR2(30 CHAR),
        "STR_OTP" CHAR(6 BYTE),
        "ID_AUTH_METHOD_PAYER" NUMBER(1,0),
        "AMNT_AMOUNT" NUMBER(23,0) DEFAULT 0,
        "BOL_IS_AUTOCAPTURE" VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL ENABLE,
        "ID_USE_CASE" NUMBER(4,0) NOT NULL ENABLE,
        "ID_AUTH_METHOD_PAYEE" NUMBER(2,0),
         CONSTRAINT "CKC_BOL_IS_CANCELLED_MON_TXNS" CHECK (BOL_IS_CANCELLED in ('Y','N')) ENABLE,
         CONSTRAINT "PK_MON_TXNS" PRIMARY KEY ("ID_TXN")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "LARGE_INDEX"  ENABLE,
         CONSTRAINT "FK_MON_TXNS_CURRENCIES" FOREIGN KEY ("ID_CURRENCY")
          REFERENCES "APP"."CURRENCIES" ("ID_CURRENCY") ENABLE,
         CONSTRAINT "FK_MON_TXNS_TO_PAYER" FOREIGN KEY ("ID_PAYER")
          REFERENCES "APP"."CUSTOMERS" ("ID_CUSTOMER") ENABLE,
         CONSTRAINT "FK_MON_TXNS_TO_PAYEE" FOREIGN KEY ("ID_PAYEE")
          REFERENCES "APP"."CUSTOMERS" ("ID_CUSTOMER") ENABLE,
         CONSTRAINT "FK_MON_TXNS_REFERENCE_TXNS" FOREIGN KEY ("ID_TXN")
          REFERENCES "APP"."TXNS" ("ID_TXN") ENABLE,
         CONSTRAINT "FK_MON_TXNS_TO_PI_PAYER" FOREIGN KEY ("ID_PAYER_PI")
          REFERENCES "APP"."PIS" ("ID_PI") ENABLE,
         CONSTRAINT "FK_MON_TXNS_TO_PI_PAYEE" FOREIGN KEY ("ID_PAYEE_PI")
          REFERENCES "APP"."PIS" ("ID_PI") ENABLE,
         CONSTRAINT "FK_MON_TXNS_TO_AUTHMETHOD" FOREIGN KEY ("ID_AUTH_METHOD_PAYER")
          REFERENCES "APP"."AUTHENTICATION_METHODS" ("ID_AUTHENTICATION_METHOD") ENABLE,
         CONSTRAINT "FK_MON_TXNS_USE_CASE_ID" FOREIGN KEY ("ID_USE_CASE")
          REFERENCES "APP"."USE_CASES" ("ID_USE_CASE") ENABLE,
         CONSTRAINT "FK_MON_TXN_AUTH_PAYEE" FOREIGN KEY ("ID_AUTH_METHOD_PAYEE")
          REFERENCES "APP"."AUTHENTICATION_METHODS" ("ID_AUTHENTICATION_METHOD") ENABLE
      CREATE INDEX "APP"."IDX_MON_TXNS" ON "APP"."MON_TXNS" ("ID_PAYER")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "LARGE_INDEX" ;
      CREATE INDEX "APP"."IDX_PAYEE_MON_TXNS" ON "APP"."MON_TXNS" ("ID_PAYEE")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "LARGE_DATA" ;
      CREATE INDEX "APP"."IDX_PYE_PI_MON_TXNS" ON "APP"."MON_TXNS" ("ID_PAYEE_PI")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "LARGE_DATA" ;
      CREATE INDEX "APP"."IDX_PYR_PI_MON_TXNS" ON "APP"."MON_TXNS" ("ID_PAYER_PI")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "LARGE_DATA" ;
      CREATE INDEX "APP"."IDX_USE_CASE_MON_TXNS" ON "APP"."MON_TXNS" ("ID_USE_CASE")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "LARGE_DATA" ;
      CREATE UNIQUE INDEX "APP"."PK_MON_TXNS" ON "APP"."MON_TXNS" ("ID_TXN")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "LARGE_INDEX" ;
    Data is first moved to table in schema3.OTW. and then we are deleting all the rows in otw from original table. below is the explain plan for delete
    SQL> explain plan for
      2  delete from schema1.mon_txns where id_txn in (select id_txn from schema3.OTW);
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 2798378986
    | Id  | Operation              | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | DELETE STATEMENT       |            |  2520 |   233K|    87   (2)| 00:00:02 |
    |   1 |  DELETE                | MON_TXNS   |       |       |            |          |
    |*  2 |   HASH JOIN RIGHT SEMI |            |  2520 |   233K|    87   (2)| 00:00:02 |
    |   3 |    INDEX FAST FULL SCAN| OTW_ID_TXN |  2520 | 15120 |     3   (0)| 00:00:01 |
    |   4 |    TABLE ACCESS FULL   | MON_TXNS   | 14260 |  1239K|    83   (0)| 00:00:02 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
    Please help,
    thanks,
    Banka Ravi

    'Best practice' is just what Oracle is already doing as you have already been told: DELETE FROM myTable WHERE myDate between myStart and Myend.
    Your use case is why many orgs elect to use partitioning and use that DATE column as the partition key. Then it is VERY FAST and VERY EASY to truncate or drop partitions that contain old data when you no longer need them.
    The other solution used is to quit waiting so long to delete data and then you don't have to delete large amounts at the same time. So instead of deleting data once a month delete it once a week or even every night. Then the number of rows being deleted will be much smaller and, if the stats are kept current, Oracle may decide to use the index.

  • HT5191 (Windows 7/64bit) iTunes Taking too long to Backup.

    Hi guys/gurus/"i" masters,
    Got a MAJOR issue with itunes. I don't know why this happens on windows but this is one issue i can't solve.
    I'm on an iPhone 4s running ios 5.0.1. I want to backup all my stuff before I bring to the latest firmware (5.1.1)
    I've had to force close the program many times as the backup was taking too long, and it didn't even move a bit (backup bar).
    Can anyone please help me to resolve this issue.
    Appreciate the help very much.
    Regards,
    TJB!

    Start by making sure you have the latest version of iTunes.
    If that doesn't do it, you may be seeing something like what is described in this Apple article -> Apple software on Windows: May see performance issues and blank iTunes Store
    If it's what you're seeing, you can try resetting Winsock as a temporary fix or folllow along with the article.
    1. To do so, please do the following in an administrator user:
    Windows Vista and Windows 7: Right click All Programs and choose Accessories > Command Prompt. Choose to open as an administrator.
    Windows XP: Click Start > Run and type in cmd.
    2. Enter the following command: 
    netsh winsock reset
    3. Restart the computer and test the issue.
    Note:  If the issue returns, third-party software may be reinserting the LSP.

Maybe you are looking for

  • Need Help with Portal security

    Hi All, I'm using the Oracle Portal builder to post some links (Dsicoverer reports links) on a portal. Is there any way where only a certain group of people have access to those reports on the portal? Please need help. Thanks

  • Razer DeathAdder right click, scroll wheel disabled

    I bought a Razer DeathAdder Black Edition around a week ago. It comes with Mac drivers which I installed, however I installed ControllerMate and SteerMouse as well, in order to remap buttons and fix the acceleration and polling issues with high-res m

  • Attributes for the XI field , when it is posting data to a CLOB field in DB

    Hi all.. In my scenario XI is posting data to a database using StoredProcedure, in which one of the fields is of CLOB type  and is declared as IN parameter. Now what are the attributes to be used in xi for this field. 1) is it only isInput 2) or both

  • Best practice GeoRaster and MapViewer?

    Hi, I want to see rasterfiles with using Oracle GeoRaster and MapViewer. I've bineary rasterfiles and aerial photographs(24 BIT). Until now I put the data with following parameters into the database: -     Oracle_inverleaving_type: BSQ -     Oracle_r

  • Spotlight search crashes finder

    Greetings, I have searched the discussions for this, but found nothing: Certainly the answer is probably simple, but it is escaping me... When I do a Spotlight search of an AFP volume on a Window 2003 server, and the search contains the exact word as