Query running slow after upgrading

Hi,
We have one query that is running very slow in the 10.2.0.4 database after upgrading from 9.2.0.8 HP-UX B11.31. In 9.2.0.8 database it used to take 5 mins. But in the new 10.2.0.4 database it takes around 36 mins.The query is given below.
SELECT a.transaction_date,
                a.ORD_PROD_BE_ID,
                a.SLS_POSTD_DT_BE_ID,
                 a.net_trd_amt,
                a.trd_actl_un_qty,
                t.FISC_MO_CD, 
                t.FY_CD
FROM fact_net_trd_sls a,
            dim_tm_mv t,
            dim_prod b,
            (SELECT DISTINCT kit_prod_cd FROM kal_kit_bom) c
WHERE b.be_id = a.ORD_PROD_BE_ID
AND b.end_date >SYSDATE
AND t.be_id = a.SLS_POSTD_DT_BE_ID
AND t.end_date > SYSDATE
AND c.kit_prod_cd (+)= b.base_prod_cd
AND t.FY_CD IN (SELECT DISTINCT FY_CD FROM DIM_tm_MV T WHERe T.DAY_STRT_PRD_OF_TM=TRUNC(SYSDATE))
and nvl2(c.kit_prod_cd,'K','FG') = 'FG'
ORDER BY  a.ORD_PROD_BE_ID,a.TRANSACTION_DATE;The plan in 9i is below,
PLAN_TABLE_OUTPUT
| Id  | Operation                           |  Name                  | Rows  | Bytes |TempSpc| Cost  |
|   0 | SELECT STATEMENT                    |                        |  2861K|  1585M|       |   170K|
|   1 |  VIEW                               |                        |  2861K|  1585M|       |   170K|
|   2 |   SORT UNIQUE                       |                        |  2861K|   654M|  1397M|   170K|
|*  3 |    FILTER                           |                        |       |       |       |       |
|*  4 |     HASH JOIN OUTER                 |                        |       |       |       |       |
|*  5 |      HASH JOIN                      |                        |  1998K|   445M|  4056K| 63419 |
|*  6 |       TABLE ACCESS BY INDEX ROWID   | DIM_PROD               | 53189 |  3428K|       |   283 |
|   7 |        BITMAP CONVERSION TO ROWIDS  |                        |       |       |       |       |
|   8 |         BITMAP INDEX FULL SCAN      | XN3_DIM_PROD           |       |       |       |       |
|   9 |       TABLE ACCESS BY INDEX ROWID   | FACT_NET_TRD_SLS       |  4081 |   203K|       |   118 |
|  10 |        NESTED LOOPS                 |                        |  1998K|   320M|       | 57607 |
|* 11 |         HASH JOIN SEMI              |                        |   490 | 57330 |       |   208 |
|* 12 |          TABLE ACCESS FULL          | DIM_TM_MV              | 15180 |  1260K|       |   195 |
|  13 |          TABLE ACCESS BY INDEX ROWID| DIM_TM_MV              |     1 |    32 |       |     1 |
|* 14 |           INDEX RANGE SCAN          | XN4_DIM_TM_MV          |     1 |       |       |     1 |
|* 15 |         INDEX RANGE SCAN            | FACT_NET_TRD_SLS_IDX3  |  4081 |       |       |    54 |
|  16 |      TABLE ACCESS FULL              | KAL_KIT_BOM            | 14175 | 85050 |       |    24 |
Predicate Information (identified by operation id):
   3 - filter(NVL2("KAL_KIT_BOM"."KIT_PROD_CD",'K','FG')='FG')
   4 - access("B"."BASE_PROD_CD"=("KAL_KIT_BOM"."KIT_PROD_CD"(+)))
   5 - access("B"."BE_ID"="A"."ORD_PROD_BE_ID")
   6 - filter("B"."END_DATE">SYSDATE@!)
  11 - access("SYS_ALIAS_0000"."FY_CD"="T"."FY_CD")
  12 - filter("SYS_ALIAS_0000"."END_DATE">SYSDATE@!)
  14 - access("T"."DAY_STRT_PRD_OF_TM"=TRUNC(SYSDATE@!))
  15 - access("SYS_ALIAS_0000"."BE_ID"="A"."SLS_POSTD_DT_BE_ID")
Note: cpu costing is off
36 rows selected.The plan in 10g is below.
Operation           Object Name     Rows     Bytes     Cost       Object Node      In/Out  PStart    PStop
SELECT STATEMENT Optimizer Mode=ALL_ROWS                             34                           1382                                                       
  VIEW                   34           19 K        1382                                                       
    SORT UNIQUE                               34           7 K          1382                                                       
      FILTER                                                                                                                             
        HASH JOIN OUTER                   34           7 K          1375                                                       
          MAT_VIEW ACCESS BY INDEX ROWID           WHSUSR.DIM_TM_MV 1              81           1                                                              
            NESTED LOOPS                      24           5 K          1350                                                       
              NESTED LOOPS                    740         105 K     1336                                                       
                MERGE JOIN CARTESIAN                              1              95           1332                                                       
                  TABLE ACCESS BY INDEX ROWID              WHSUSR.DIM_PROD      52 K        3 M        279                                                         
                    BITMAP CONVERSION TO ROWIDS                                                                                                                      
                      BITMAP INDEX FULL SCAN     WHSUSR.XN3_DIM_PROD                                                                                                           
                  BUFFER SORT                   1              30           9223372036 G                                                   
                    SORT UNIQUE                               1              30           1                                                              
                      MAT_VIEW ACCESS BY INDEX ROWID               WHSUSR.DIM_TM_MV 1              30           1                                                                           
                        INDEX RANGE SCAN               WHSUSR.XN4_DIM_TM_MV      1                              1                                                              
                TABLE ACCESS BY INDEX ROWID                TRANSDATA.FACT_NET_TRD_SLS             740         36 K        4                                                                    
                  INDEX RANGE SCAN     TRANSDATA.FACT_NET_TRD_SLS_IDX2 2 K                         1                                                              
              INDEX RANGE SCAN         WHSUSR.XN1_DIM_TM_MV      1                              1                                                              
          TABLE ACCESS FULL               EDW_DBA.KAL_KIT_BOM            14 K        83 K        24                                                            We have checked that the statistics are uptodate. Please help with suggestions.
Thanks in advane.

Most likely, the index stats are not up-to-date, please double check.
h5. In 9i, FACT_NET_TRD_SLS_IDX3 is used to scan the fact.
Time dimension is used to filter out most records in fact table first, then join to Product dimension.
h5. In 10g, FACT_NET_TRD_SLS_IDX2 is used to scan the fact.
Time dimension "MERGE JOIN CARTESIAN" to Product dimension first to form a data set, and then use it to filter the fact table.
If the stats for FACT_NET_TRD_SLS_IDX2 let ORACLE believe that much less records will remain/survive after the join, 10g will use it.
It seems to me that cartesian join Time x Product is going to generate a much bigger data set than estimated, then the nested loop after that will take a long time to iterate through.
Why don't you partition your fact table BY RANGE(SLS_POSTD_DT_BE_ID) to make it simpler?

Similar Messages

  • My macbook is running slow after upgrading to yosemite

    Other's have posted similar experiences by when I ran etrecheck I didn't get a bunch of fails and yet my computer is extremely sluggish since moving from snow leopard to Yosemite.  So much so, that I'm considering going back.  Programs load slowly and switching between programs has a delayed response. Reminds me of the PC I had before I bought my macbook in 2008.
    Any ideas on what might be causing the slow down?
    Problem description:
    Mac is running slow after upgrading to Yosemite.
    EtreCheck version: 2.1.1 (104)
    Report generated December 10, 2014 at 10:51:13 AM PST
    Hardware Information: ℹ️
      MacBook (13-inch, Aluminum, Late 2008) (Verified)
      MacBook - model: MacBook5,1
      1 2 GHz Intel Core 2 Duo CPU: 2-core
      4 GB RAM Upgradeable
      BANK 0/DIMM0
      2 GB DDR3 1067 MHz ok
      BANK 0/DIMM1
      2 GB DDR3 1067 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      NVIDIA GeForce 9400M - VRAM: 256 MB
      Color LCD 1280 x 800
      Cinema Display 1680 x 1050
    System Software: ℹ️
      OS X 10.10.1 (14B25) - Uptime: 1:33:11
    Disk Information: ℹ️
      ST9500420AS disk0 : (500.11 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      Macintosh HD (disk0s2) / : 499.25 GB (196.94 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      HL-DT-ST DVDRW  GS21N 
    USB Information: ℹ️
      Microsoft Microsoft® 2.4GHz Transceiver V1.0
      Apple Inc. Built-in iSight
      Apple Inc. BRCM2046 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple, Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /Library/StartupItems/Parallels
      [not loaded] com.parallels.kext.Pvsvnic (3.0) [Support]
      /System/Library/Extensions
      [not loaded] com.parallels.kext.ConnectUSB (3.0.0) [Support]
      [not loaded] com.parallels.kext.Pvsnet (3.0) [Support]
      [not loaded] com.parallels.kext.hypervisor (3.0) [Support]
      [not loaded] com.parallels.kext.vmmain (3.0) [Support]
    Startup Items: ℹ️
      HP IO: Path: /Library/StartupItems/HP IO
      Parallels: Path: /Library/StartupItems/Parallels
      ParallelsTransporter: Path: /Library/StartupItems/ParallelsTransporter
      Startup items are obsolete in OS X Yosemite
    Launch Agents: ℹ️
      [not loaded] com.adobe.AAM.Updater-1.0.plist [Support]
      [running] com.adobe.AdobeCreativeCloud.plist [Support]
      [loaded] com.carbonite.launchd.carbonitealerts.plist [Support]
      [running] com.carbonite.launchd.carbonitestatus.plist [Support]
      [loaded] com.google.keystone.agent.plist [Support]
      [loaded] com.hp.help.tocgenerator.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [running] com.carbonite.launchd.carbonitedaemon.plist [Support]
      [loaded] com.google.keystone.daemon.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.AAM.Updater-1.0.plist [Support]
      [loaded] com.adobe.ARM.[...].plist [Support]
      [loaded] com.adobe.ARM.[...].plist [Support]
    User Login Items: ℹ️
      Citations Application (/Applications/Papers.app/Contents/SharedSupport/Citations.app)
      iTunesHelper UNKNOWNHidden (missing value)
      Time Out Application (/Users/[redacted]/.Trash/Time Out.app)
      AdobeResourceSynchronizer Application (/Applications/Adobe Acrobat 8 Professional/Adobe Acrobat Professional.app/Contents/Support/AdobeResourceSynchronizer.app)
      iTunesHelper UNKNOWN (missing value)
      Caffeine Application (/Applications/Caffeine .app)
      Microsoft AU Daemon Application (/Applications/Microsoft AutoUpdate.app/Contents/MacOS/Microsoft AU Daemon.app)
      Garmin ANT Agent Application (/Applications/Garmin ANT Agent.app)
      Google Drive Application (/Applications/Google Drive.app)
      Stickies Application (/Applications/Stickies.app)
      Dropbox Application (/Applications/Dropbox.app)
      Box Sync Application (/Applications/Box Sync.app)
      EvernoteHelper Application (/Applications/Evernote.app/Contents/Library/LoginItems/EvernoteHelper.app)
      XPSLauncher Application (/Applications/Xerox/PrintingScout/XPSLauncher.app)
    Internet Plug-ins: ℹ️
      o1dbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      AmazonMP3DownloaderPlugin1017287: Version: AmazonMP3DownloaderPlugin 1.0.17 [Support]
      Google Earth Web Plug-in: Version: 5.1 [Support]
      Default Browser: Version: 600 - SDK 10.10
      Flip4Mac WMV Plugin: Version: 2.2.1.11  [Support]
      OfficeLiveBrowserPlugin: Version: 12.3.6 [Support]
      AdobeAAMDetect: Version: AdobeAAMDetect 2.0.0.0 - SDK 10.7 [Support]
      AdobePDFViewerNPAPI: Version: 11.0.09 - SDK 10.6 [Support]
      FlashPlayer-10.6: Version: 15.0.0.246 - SDK 10.6 [Support]
      Silverlight: Version: 5.1.30514.0 - SDK 10.6 [Support]
      Flash Player: Version: 15.0.0.246 - SDK 10.6 Mismatch! Adobe recommends 16.0.0.235
      AmazonMP3DownloaderPlugin: Version: AmazonMP3DownloaderPlugin 1.0.17 [Support]
      googletalkbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      iPhotoPhotocast: Version: 7.0
      AdobePDFViewer: Version: 11.0.09 - SDK 10.6 [Support]
      GarminGpsControl: Version: 4.0.4.0 Release - SDK 10.6 [Support]
      QuickTime Plugin: Version: 7.7.3
      wkDimdimControl: Version: 1.01
      DirectorShockwave: Version: 11.6.6r636 [Support]
    User internet Plug-ins: ℹ️
      BrowserPlus_2.9.8: Version: 2.9.8 [Support]
      fbplugin_1_0_3: Version: Unknown [Support]
      Move_Media_Player: Version: npmnqmp 071505000006 [Support]
    Safari Extensions: ℹ️
      Extensions: No such file or directory
    3rd Party Preference Panes: ℹ️
      BrowserPlus  [Support]
      Carbonite  [Support]
      Flash Player  [Support]
      Flip4Mac WMV  [Support]
    Time Machine: ℹ️
      Skip System Files: NO
      Auto backup: YES
      Volumes being backed up:
      Macintosh HD: Disk size: 499.25 GB Disk used: 302.31 GB
      Destinations:
      Lottia [Local]
      Total size: 1.00 TB
      Total number of backups: 65
      Oldest backup: 2010-12-28 19:41:55 +0000
      Last backup: 2014-12-03 21:58:08 +0000
      Size of backup disk: Adequate
      Backup size 1.00 TB > (Disk used 302.31 GB X 3)
    Top Processes by CPU: ℹ️
          70% iPhoto
          20% TOCGenerator
          18% WindowServer
          9% Time Out Break
          6% CarboniteDaemon
    Top Processes by Memory: ℹ️
      463 MB iPhoto
      137 MB Mail
      116 MB Google Chrome
      106 MB WindowServer
      99 MB iTunes
    Virtual Memory Information: ℹ️
      114 MB Free RAM
      1.39 GB Active RAM
      1.21 GB Inactive RAM
      857 MB Wired RAM
      6.24 GB Page-ins
      34 MB Page-outs
    Diagnostics Information: ℹ️
      Dec 10, 2014, 09:18:41 AM Self test - passed
      Dec 9, 2014, 03:44:57 PM fontd_2014-12-09-154457_Postelsia.crash
      Dec 9, 2014, 12:12:52 PM CarboniteDaemon_2014-12-09-121252_Postelsia.cpu_resource.diag [Details]
      Dec 8, 2014, 10:27:45 AM CarboniteDaemon_2014-12-08-102745_Postelsia.cpu_resource.diag [Details]
      Dec 7, 2014, 01:04:27 PM CarboniteDaemon_2014-12-07-130427_Postelsia.cpu_resource.diag [Details]

    Also resetting SMC could solve the problem.
    Intel-based Macs: Resetting the System Management Controller (SMC) - Apple Support
    Upgrading RAM till 8GB could also help the system performance.

  • I have an early 2008 macbook pro that is running slow after upgrading to lion. Is there anything I can do? this is what I have,Processor  2.4 GHz Intel Core 2 Duo, Memory  2 GB 667 MHz DDR2 SDRAM.

    I have an early 2008 macbook pro that is running slow after upgrading to lion. Is there anything I can do? this is what I have,Processor  2.4 GHz Intel Core 2 Duo, Memory  2 GB 667 MHz DDR2 SDRAM.

    First, back up all data immediately, as your boot drive may be failing.
    Launch the usual set of applications you use when you notice the problem.
    Step 1
    Launch the Activity Monitor application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Activity Monitor in the page that opens.
    Select the CPU tab of the Activity Monitor window.
    Select All Processes from the menu in the toolbar, if not already selected.
    Click the heading of the % CPU column in the process table to sort the entries by CPU usage. You may have to click it twice to get the highest value at the top. What is it, and what is the process? Also post the values for % User, % System, and % Idle at the bottom of the window.
    Select the System Memory tab. What values are shown in the bottom part of the window for Page outs and Swap used?
    Next, select the Disk Activity tab. What approximate values are shown for Reads in/sec and Writes out/sec?
    Step 2
    You must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way as above. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left.
    Post the 50 or so most recent messages in the log — the text, please, not a screenshot.
    Important: Some personal information, such as your name, may appear in the log. Edit it out before posting.

  • My macbook pro run slowed after upgrade to Yosemite, please help!

    Why my mac slowed after I upgrade to Yosemite, Please help!

    You might want to update your profile. Helps people trying to help you.
    Activity Monitor - Mavericks  also Yosemite
    Activity Monitor in Mavericks has significant changes
    Performance Guide
    Why is my computer slow
    Why your Mac runs slower than it should
    Slow Mac After Mavericks
    Things you can do to resolve slowdowns  see post by Kappy
    Try running this program and then copy and paste the output in a reply. The program was created by Etresoft, a frequent contributor.  Please use copy and paste as screen shots can be hard to read.
    Etrecheck – System Information

  • SQL query is slow after upgrading from SQL 2008 to SQL 2008 R2

    Hello
    We were using SQL 2008 Standard, but after upgrading to R2, following query is much slower (takes 5 seconds instead of less than 1 second), how is this possible?
    Regards, Hennie
    SELECT
     P.BSN,
     P.Persnr,
     P.Roepnaam,
     P.Tussenvoegsels,
     P.Achternaam,
     P.Geslacht,
     COALESCE (P.Achternaam + ', ' + P.Roepnaam + ' ' + P.Tussenvoegsels, P.Achternaam + ', ' + P.Roepnaam, P.Achternaam) AS naamvolledig,
     P.Telmobiel,
     P.Telvast,
     P.Postcode,
     G.groep,
     COALESCE (RM.nieuweDag, GR.Dag) AS dag,
     COALESCE (RM.nieuweDatum, GR.datum) AS datum,
     DATEPART(ww, COALESCE (RM.nieuweDatum, GR.datum)) AS weeknummer,
     DATEPART(yyyy, COALESCE (RM.nieuweDatum, GR.datum)) AS jaar,
     CONVERT(VARCHAR(8),
      CASE WHEN GR.ID_lokaties = 3 THEN COALESCE (RM.nieuweBegintijd,
       CASE WHEN GR.Tijdspan = 2 THEN R.begintijd2 ELSE R.begintijd END)
      ELSE COALESCE (RM.nieuweBegintijd, GR.begintijd) END, 108) AS begintijdberekend,
     CONVERT(VARCHAR(8),
      CASE WHEN GR.ID_lokaties = 3 THEN COALESCE (RM.nieuweEindtijd,
       CASE WHEN GR.Tijdspan = 2 THEN R.eindtijd2 ELSE R.eindtijd END)
      ELSE COALESCE (RM.nieuweEindtijd, GR.eindtijd) END, 108) AS eindtijdberekend,
     CASE WHEN GR.ID_lokaties = 3 THEN
       CONVERT(NCHAR(5), COALESCE (RM.nieuweBegintijd,CASE WHEN GR.Tijdspan = 2 THEN R.begintijd2 ELSE R.begintijd END), 108) + '-' +
       CONVERT(NCHAR(5), COALESCE (RM.nieuweEindtijd, CASE WHEN GR.Tijdspan = 2 THEN R.eindtijd2 ELSE R.eindtijd END), 108)
      ELSE CONVERT(NCHAR(5),COALESCE (RM.nieuweBegintijd, GR.begintijd), 108) + '-' + CONVERT(NCHAR(5), COALESCE (RM.nieuweEindtijd, GR.eindtijd), 108)
      END AS Tijdspanne,
     CASE
      WHEN GR.ID_lokaties = 3 AND R.id_relaties = 9 THEN 'Werk Intern'
      WHEN GR.ID_lokaties = 3 THEN R.relatienaam
      ELSE L.lokatie END AS Lokatieberekend,
     R.relatienaam AS relatie,
     L.IntExt,
     RA.Omschrijving AS roosteractiviteit,
     A.instroomdatum,
     A.uitstroomdatum,
     TT.trajecttype,
     W.Naamvolledig AS Werkcoach,
     A.ID_groepen,
     T.ID_personen,
     A.ID_werkcoaches,
     CASE
      WHEN GR.ID_lokaties = 3 AND R.id_relaties = 9 THEN 20
      WHEN GR.ID_lokaties = 3 THEN R.id_relaties
      ELSE L.ID_relaties END AS ID_lokatieberekend,
     A.ID_relaties AS ID_relatie,
     R.nummer2 AS capaciteit,
     GR.ID_groepsroosters,
     CAST(CASE WHEN foto IS NOT NULL THEN 'Ja' ELSE NULL END AS char(2)) AS Foto,
     W.Email,
     W.TelefoonMobiel,
     W.TelefoonVast
    FROM
     dbo.personen AS P INNER JOIN
     dbo.trajecten AS T ON T.ID_personen = P.ID_personen INNER JOIN
     dbo.trajecttype AS TT ON T.ID_trajecttype = TT.ID_trajecttype INNER JOIN
     dbo.trajectactiviteiten AS A ON A.ID_trajecten = T.ID_trajecten INNER JOIN
     dbo.groepsroosters AS GR ON GR.ID_groepen = A.ID_groepen LEFT OUTER JOIN
     dbo.roosteractiviteit AS RA ON GR.ID_roosteractiviteit = RA.ID_roosteractiviteit INNER JOIN
     dbo.lokaties AS L ON GR.ID_lokaties = L.ID_lokaties INNER JOIN
     dbo.werkcoaches AS W ON A.ID_werkcoaches = W.ID_werkcoaches INNER JOIN
     dbo.groepen AS G ON A.ID_groepen = G.ID_groepen LEFT OUTER JOIN
     dbo.relaties AS R ON A.ID_relaties = R.ID_relaties LEFT OUTER JOIN
     dbo.roostermutaties AS RM ON P.ID_personen = RM.ID_personen AND GR.ID_groepsroosters = RM.ID_groepsroosters AND RM.aanwezig IS NULL
    WHERE
     (COALESCE (RM.nieuweDatum, GR.datum) BETWEEN GETDATE() - 1 AND GETDATE() + 13)
     AND (COALESCE (DATEDIFF(day, COALESCE (RM.nieuweDatum, GR.datum), A.uitstroomdatum), 0) >= 0)
     AND (DATEDIFF(day, A.instroomdatum, COALESCE (RM.nieuweDatum, GR.datum)) >= 0)
     AND ((SELECT COUNT(*) AS Expr1
      FROM dbo.roostermutaties AS RM2
      WHERE (P.ID_personen = ID_personen)
      AND (GR.ID_groepsroosters = ID_groepsroosters)
      AND (CONVERT(VARCHAR(8), begintijdafwezig, 108) = CONVERT(VARCHAR(8),
      CASE WHEN GR.ID_lokaties = 3 THEN COALESCE (RM.nieuweBegintijd,
      CASE WHEN GR.Tijdspan = 2 THEN R.begintijd2 ELSE R.begintijd END)
      ELSE COALESCE (RM.nieuweBegintijd, GR.begintijd) END, 108)) AND
      (CONVERT(VARCHAR(8), eindtijdafwezig, 108) = CONVERT(VARCHAR(8), CASE WHEN GR.ID_lokaties = 3 THEN COALESCE (RM.nieuweEindtijd,
      CASE WHEN GR.Tijdspan = 2 THEN R.eindtijd2 ELSE R.eindtijd END) ELSE COALESCE (RM.nieuweEindtijd, GR.eindtijd) END, 108))) = 0)

    We were using SQL 2008 Standard, but after upgrading to R2, following query is much slower (takes 5 seconds instead of less than 1 second), how is this possible?
    It is not uncommon to experience performance problems following an upgrade when there are issues with original query.  Non-sargable expressions like Olaf called out are often the culprit, as well as lack of useful indexes and statistics. 
    The optimizer cannot glean accurate row count estimates or use indexes efficiently so the resultant plan may not be optimal for the task at hand.  It is only by happenstance that old plan performed better; it could just as well be the other way around,
    but again only by chance since the optimizer is guessing.
    You might also try using EXISTS instead of SELECT COUNT(*)...= 0:
    AND EXISTS(SELECT *
    FROM dbo.roostermutaties AS RM2
    WHERE P.ID_personen = ID_personen
    AND GR.ID_groepsroosters = ID_groepsroosters
    AND CONVERT(VARCHAR(8), begintijdafwezig, 108) = CONVERT(VARCHAR(8),
    CASE WHEN GR.ID_lokaties = 3 THEN COALESCE (RM.nieuweBegintijd,
    CASE WHEN GR.Tijdspan = 2 THEN R.begintijd2 ELSE R.begintijd END)
    ELSE COALESCE (RM.nieuweBegintijd, GR.begintijd) END, 108)
    AND CONVERT(VARCHAR(8), eindtijdafwezig, 108) = CONVERT(VARCHAR(8), CASE WHEN GR.ID_lokaties = 3 THEN COALESCE (RM.nieuweEindtijd,
    CASE WHEN GR.Tijdspan = 2 THEN R.eindtijd2 ELSE R.eindtijd END) ELSE COALESCE (RM.nieuweEindtijd, GR.eindtijd) END, 108))
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Query running slow after 1000 rows in oracle

    Hi.
    I have one query which is fetching miln of rows.. the query runs very fast till 1000 to 1500 records after that it run very slow. Can you please help ,what could be the reason?
    Thanks

    831269 wrote:
    I have one query which is fetching miln of rows.. Why are you fetching that many rows? What is your client code going to do with a million rows? And why do you expect this to be fast? A million rows worth of I/O has to be done by Oracle (that will likely be mostly from disk and not buffer cache). That million rows has to be copied from the Oracle's SGA to client memory. If your client is PL/SQL code, that will be copied into the PGA. If your client is external, then that copy has to happen across platform boundaries and the network too.
    Then your code churns away on processing a million rows... doing what exactly? That "+what+" will need to be done once per row, for a million times. If it takes 10ms per row, that means almost 3h of client processing time.
    Fetching that many rows..? Often a design and coding mistake. Always an exception to the rule. Will never be "fast".
    And scalability and performance need to be addressed by re-examining the requirements, optimising the design that necessitates fetching that many rows, and using techniques such as parallel processing and thread safe code design.

  • Yosemite Running Slow after Upgrade? Try these TIPS!

    It seems that lots of people are encountering issues of slowness or sluggishness or lagginess after upgrading to Yosemite. I have been following a variety of different threads here on Apple Discussions, on Google discussions and elsewhere. There seems to be some common items that have caused slow downs and some fixes that seem to work.
    Briefly, FileVault 2 encryption/decryption process seems to cause issues while it's running. Also resetting SMC and zapping PRAM seems to help.
    To make it easier for others, I posted a list of 13+ items that you can try if your Mac is slowing down after the upgrade to Yosemite. If any of these items helped, please be sure to leave a comment on the post and share it with others.
    Here is the article, hope it helps!
    http://www.hightechdad.com/2014/10/23/13-tips-optimize-mac-yosemite-installation /
    -HighTechDad

    It seems that lots of people are encountering issues of slowness or sluggishness or lagginess after upgrading to Yosemite. I have been following a variety of different threads here on Apple Discussions, on Google discussions and elsewhere. There seems to be some common items that have caused slow downs and some fixes that seem to work.
    Briefly, FileVault 2 encryption/decryption process seems to cause issues while it's running. Also resetting SMC and zapping PRAM seems to help.
    To make it easier for others, I posted a list of 13+ items that you can try if your Mac is slowing down after the upgrade to Yosemite. If any of these items helped, please be sure to leave a comment on the post and share it with others.
    Here is the article, hope it helps!
    http://www.hightechdad.com/2014/10/23/13-tips-optimize-mac-yosemite-installation /
    -HighTechDad

  • Macbook Pro runs slow after upgrade

    I have just upgraded to Mountain Lion 10.8.3 (from 10.6.8) on my 2011 i7 Macbook Pro.
    My computer now runs slower than ever. Boot up takes forever. Shut down takes for ever. I get constant beach ball.
    I am shocked at how horrible this OS is and though there are some "nifty" features, it runs so poorly It's hard to enjoy them.
    So my question is, is this a common issue with Mountain Lion or is it a coincidence and perhaps something is wrong with my computer?
    Thanks!

    First, back up all data immediately, as your boot drive might be failing.
    There are a few other possible causes of generalized slow performance that you can rule out easily.
    Reset the System Management Controller.
    If you have many image or video files on the Desktop with preview icons, move them to another folder.
    If applicable, uncheck all boxes in the iCloud preference pane.
    Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
    Check your keychains in Keychain Access for excessively duplicated items.
    Otherwise, take the steps below when you notice the slowdown.
    Step 1
    Launch the Activity Monitor application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Activity Monitor in the icon grid.
    Select the CPU tab of the Activity Monitor window.
    Select All Processes from the menu in the toolbar, if not already selected.
    Click the heading of the % CPU column in the process table to sort the entries by CPU usage. You may have to click it twice to get the highest value at the top. What is it, and what is the process? Also post the values for % User, % System, and % Idle at the bottom of the window.
    Select the System Memory tab. What values are shown in the bottom part of the window for Page outs and Swap used?
    Next, select the Disk Activity tab. Post the approximate values shown for Reads in/sec and Writes out/sec (not Reads in and Writes out.)
    Step 2
    If you have more than one user account, you must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long.

  • Why is my computer running slower after upgrading to Maverick?

    So my computer seems to be running slower, doing anything at all after I installed the newest OS, Maverick.  Anyone have an idea as to why that might be?  What can I do to make it better?
    Thanks,
    Snoopynorthw
    Nevermind, I found this other discussion below.  Thanks.

    Activity Monitor - Mavericks  also Yosemite
    Activity Monitor in Mavericks has significant changes
    Performance Guide
    Why is my computer slow
    Why your Mac runs slower than it should
    Slow Mac After Mavericks
    Things you can do to resolve slowdowns  see post by Kappy
    Try running this program and then copy and paste the output in a reply. The program was created by Etresoft, a frequent contributor.  Please use copy and paste as screen shots can be hard to read.
    Etrecheck – System Information
    Unless you've added RAM since you bought the computer, you could probably increase the performance by adding RAM. The 2 places I’ve seen recommended most to buy reliable RAM are below. I have purchased RAM several times from Other World Computing and have always been very satisfied with the product and service. They have on-line instructions on how to replace the RAM. OWC has also tested RAM above what Apple states is the maximum. I now have 6GB installed on a machine supposedly limited to 4 GB.
    Crucial
    Other World Computing

  • TS2570 System runs slow after upgrading 2010 macbook to Mavericks. How do i speed it up again? Defrag? if so how.

    Downloaded Mavericks to my fast running 2010 Macbook a couple of days ago and since this the whole system is running slow.
    How can i speed it up again please?

    Fixing a Mavericks Installation Problem
    How to manage a failed OS X Mavericks installation | MacFixIt - CNET Reviews.
    Try these in order:
    1. a. Resetting your Mac's PRAM and NVRAM
        b. Intel-based Macs: Resetting the System Management Controller (SMC)
    2. Restart the computer in Safe Mode, then restart again, normally. If this doesn't help, then:
         Boot to the Recovery HD: Restart the computer and after the chime press and hold down the
         COMMAND and R keys until the Utilities menu screen appears. Alternatively, restart the computer and
         after the chime press and hold down the OPTION key until the boot manager screen appears.
         Select the Recovery HD and click on the downward pointing arrow button.
    3. Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the Utilities menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    4. Reinstall Lion/Mountain Lion, Mavericks: Reboot from the Recovery HD. Select Reinstall Lion/Mountain Lion, Mavericks from the Utilities menu, and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • Mac is running slow after upgrading to maverick

    My macbook pro is running very slow since I upgraded to 10.9

    Here's my suggestion:
    Fixing a Mavericks Installation Problem
    How to manage a failed OS X Mavericks installation | MacFixIt - CNET Reviews.
    1. Intel-based Macs: Resetting the System Management Controller (SMC).
    2. Repair the Hard Drive and Permissions - Lion/Mountain Lion/Mavericks
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu. Select Restart from the Apple menu.
    3. Re-download and reinstall Mavericks.
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion/Mavericks: Select Reinstall Lion/Mountain Lion/Mavericks and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • Web discoverer report run slow after upgrade to AS10.1.2.48.18

    We just upgraded our application server to 10.1.2.48.18, our web Discoverer report were running extremly slow on tables that contain large amount of data. We have good speed with those report in the past. The backgroud database was the same as well as the web server.Using desktop version of Discoverer were fine with normal speed.
    Does any one know why? How to speed it up?
    Thanks!

    A few things to check:
    Are all machines using the same version of SQL*Net?
    Are the reports in different EULs (if so, are the EULs at different versions)?
    Do all reports work in Disco Plus or Disco Desktop?
    What types of reports are failing (cross tabs, tabular, both)?
    For the reports that are failing, how many rows are you expecting?

  • Mac Pro runs slow after upgrading to mavericks?

    I can't figure it out..
    Been a mac user sinc Macintosh then mac plus.
    First time i have no explanation.
    I upgraded my 2010 Dual Quad Mac Pro 96gb ram, ran so very very fast with Sonnet 4 port eSATA and MOTU PCIE 424 card.
    Ever since i upgraded it is so SLLLLOOOWWW!!. I have tired re-installing, contacted all the hardware vendors and software vendors, got all the updates.
    I cant figure out why it is running like a 20 year old computer?. I get the wheel, Finder hangs allot, will not relaunch. I take out ALL THE THIRD PARTY CARDS, and boot, still runs like a turtle. Adobe creative suite slow, Aperature takes hrs to update library. Tried creating a new library. Still slow. Avid Media composer, Final Cut Pro X is so slow at rendering i can drive to Santa Cruz from Santa Barbara to MAvericks surf spot go surfing and come home to find out it is 95% done. Also copying large 20 gig folders from one internal to another takes hrs. used to take minuts.
    I need help! It is so unpleasent using my mac pro now, , miserable user experience. I dread booting as it takes 5 min to go. I have dual monitors. Apple NVIDA card. could it be CUDA?  no updates availble. I removed all the third party cards, and nothing happens. Removed all usb, FW, etc pluged in usb mouse from Apple Factory.
    What ever happend there must be a patch or fix? all of my friends with Macs all having same slow issue. Please offer some fixes.
    1. Is there a way to __Un-install Mavericks? and return my computer back to previous OS? without ruining or formating HD?
    It seems like the only solution. I would Purchase a new MAc Pro, but none of my studio takes thunderbolt, and it is so exspensive i am cornerd. I would be so happy if i could just remove Mavericks, instead of taping aspirine all over my Macs. Please Apple send an update that fixes this. Just google it 100,00's of users? we all love Apple, we need you to help us help you! anyone? please help.
    Please help!!
    Kiind Regards
    B

    1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve your problem.
    2. If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    3. Below are instructions to run a UNIX shell script, a type of program. All it does is to gather information about the state of your computer. That information goes nowhere unless you choose to share it on this page. However, you should be cautious about running any kind of program (not just a shell script) at the request of a stranger on a public message board. If you have doubts, search this site for other discussions in which this procedure has been followed without any report of ill effects. If you can't satisfy yourself that the instructions are safe, don't follow them.
    Here's a summary of what you need to do: Copy a line of text from this web page into the window of another application. Wait for the script to run. It usually takes a couple of minutes. Then paste the results, which will have been copied automatically, back into a reply on this page. The sequence is: copy, paste, wait, paste again. Details follow.
    4. You may have started the computer in "safe" mode. Preferably, these steps should be taken in “normal” mode. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual. If you can only test in safe mode, do that.
    5. If you have more than one user, and the one affected by the problem is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply.
    6. The script is a single long line, all of which must be selected. You can accomplish this easily by triple-clicking  anywhere in the line. The whole line will highlight, though you may not see all of it in your browser, and you can then copy it. If you try to select the line by dragging across the part you can see, you won't get all of it.
    Triple-click anywhere in the line of text below on this page to select it:
    PATH=/usr/bin:/bin:/usr/sbin:/sbin; clear; Fb='%s\n\t(%s)\n'; Fm='\n%s:\n\n%s\n'; Fr='\nRAM details:\n%s\n'; Fs='\n%s: %s\n'; Fu='user %s%%, system %s%%'; PB="/usr/libexec/PlistBuddy -c Print"; A () { [[ a -eq 0 ]]; }; M () { find -L "$d" -type f | while read f; do file -b "$f" | egrep -q XML\|exec && echo $f; done; }; Pc () { o=`grep -v '^ *#' "$2"`; Pm "$1"; }; Pm () { [[ "$o" ]] && o=`sed '/^ *$/d; s/^ */   /' <<< "$o"` && printf "$Fm" "$1" "$o"; }; Pp () { o=`$PB "$2" | awk -F'= ' \/$3'/{print $2}'`; Pm "$1"; }; Ps () { o=`echo $o`; [[ ! "$o" =~ ^0?$ ]] && printf "$Fs" "$1" "$o"; }; R () { o=; [[ r -eq 0 ]]; }; SP () { system_profiler SP${1}DataType; }; id | grep -qw '80(admin)'; a=$?; A && sudo true; r=$?; t=`date +%s`; clear; { A || echo $'No admin access\n'; A && ! R && echo $'No root access\n'; SP Software | sed '8!d;s/^ *//'; o=`SP Hardware | awk '/Mem/{print $2}'`; o=$((o<4?o:0)); Ps "Total RAM (GB)"; o=`SP Memory | sed '1,5d; /[my].*:/d'`; [[ "$o" =~ s:\ [^O]|x([^08]||0[^2]8[^0]) ]] && printf "$Fr" "$o"; o=`SP Diagnostics | sed '5,6!d'`; [[ "$o" =~ Pass ]] || Pm "POST"; o=`SP USB | sed -n '1d; /:$/{s/ *:$//;x;s/\n//p;}; /V.*[(]/{s/^[^(]*/ /;H;}; /Apple/{s/.//g;h;}'`; Pm "USB"; o=`pmset -g therm | sed 's/^.*C/C/'`; [[ "$o" =~ No\ th|pms ]] && o=; Pm "Thermal conditions"; o=`pmset -g sysload | grep -v :`; [[ "$o" =~ =\ [^GO] ]] || o=; Pm "System load advisory"; o=`nvram boot-args | awk '{$1=""; print}'`; Ps "boot-args"; d=(/ ""); D=(System User); for i in 0 1; do o=`cd ${d[$i]}L*/L*/Dia* && ls | awk -F_ '!/ag$/{$NF=a[split($NF,a,".")]; print}' | tail`; Pm "${D[$i]} diagnostics"; done; o=`syslog -F bsd -k Sender kernel -k Message CReq 'GPU |hfs: Ru|I/O e|n Cause: -|NVDA\(|pagin|SATA W|ssert|timed? ?o' | tail -n25 | awk '/:/{$4=""; $5=""};1'`; Pm "Kernel messages"; o=`df -m / | awk 'NR==2 {print $4}'`; o=$((o<5120?o:0)); Ps "Free space (MiB)"; o=$(($(vm_stat | awk '/eo/{sub("\\.",""); print $2}')/256)); o=$((o>=1024?o:0)); Ps "Pageouts (MiB)"; s=( `sar -u 1 10 | sed '$!d'` ); [[ s[4] -lt 85 ]] && o=`printf "$Fu" ${s[1]} ${s[3]}` || o=; Ps "Total CPU usage" && { s=(`ps acrx -o comm,ruid,%cpu | sed '2!d'`); o=${s[2]}%; Ps "CPU usage by process \"$s\" with UID ${s[1]}"; }; s=(`top -R -l1 -n1 -o prt -stats command,uid,prt | sed '$!d'`); s[2]=${s[2]%[+-]}; o=$((s[2]>=25000?s[2]:0)); Ps "Mach ports used by process \"$s\" with UID ${s[1]}"; o=`kextstat -kl | grep -v com\\.apple | cut -c53- | cut -d\< -f1`; Pm "Loaded extrinsic kernel extensions"; R && o=`sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|calendarse|cups|dove|isc|ntp|post[fg]|x)/{print $3}'`; Pm "Extrinsic system jobs"; o=`launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)|\.[0-9]+$/{print $3}'`; Pm "Extrinsic agents"; o=`for d in {/,}L*/Lau*; do M; done | grep -v com\.apple\.CSConfig | while read f; do ID=$($PB\ :Label "$f") || ID="No job label"; printf "$Fb" "$f" "$ID"; done`; Pm "launchd items"; o=`for d in /{S*/,}L*/Star*; do M; done`; Pm "Startup items"; o=`find -L /S*/L*/E* {/,}L*/{A*d,Compon,Ex,In,Keyb,Mail/B,P*P,Qu*T,Scripti,Servi,Spo}* -type d -name Contents -prune | while read d; do ID=$($PB\ :CFBundleIdentifier "$d/Info.plist") || ID="No bundle ID"; [[ "$ID" =~ ^com\.apple\.[^x]|Accusys|ArcMSR|ATTO|HDPro|HighPoint|driver\.stex|hp-fax|\.hpio|JMicron|microsoft\.MDI|print|SoftRAID ]] || printf "$Fb" "${d%/Contents}" "$ID"; done`; Pm "Extrinsic loadable bundles"; o=`find -L /u*/{,*/}lib -type f | while read f; do file -b "$f" | grep -qw shared && ! codesign -v "$f" && echo $f; done`; Pm "Unsigned shared libraries"; o=`launchctl getenv DYLD_INSERT_LIBRARIES`; Pm "Inserted libraries"; o=`find -L {,/u*/lo*}/e*/periodic -type f -mtime -10d`; Pm "Modified periodic scripts"; o=`scutil --proxy | grep Prox`; Pm "Proxies"; o=`scutil --dns | awk '/r\[0\] /{if ($NF !~ /^1(0|72\.(1[6-9]|2[0-9]|3[0-1])|92\.168)\./) print $NF; exit}'`; Ps "DNS"; R && o=`sudo profiles -P | grep : | wc -l`; Ps "Profiles"; f=auto_master; [[ `md5 -q /etc/$f` =~ ^b166 ]] || Pc $f /etc/$f; for f in fstab sysctl.conf crontab launchd.conf; do Pc $f /etc/$f; done; Pc "hosts" <(grep -v 'host *$' /etc/hosts); Pc "User launchd" ~/.launchd*; R && Pc "Root crontab" <(sudo crontab -l); Pc "User crontab" <(crontab -l); R && o=`sudo defaults read com.apple.loginwindow LoginHook`; Pm "Login hook"; Pp "Global login items" /L*/P*/loginw* Path; Pp "User login items" L*/P*/*loginit* Name; Pp "Safari extensions" L*/Saf*/*/E*.plist Bundle | sed 's/\..*$//;s/-[1-9]$//'; o=`find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \) | wc -l`; Ps "Restricted user files"; cd; o=`SP Fonts | egrep "Valid: N|Duplicate: Y" | wc -l`; Ps "Font problems"; o=`find L*/{Con,Pref}* -type f ! -size 0 -name *.plist | while read f; do plutil -s "$f" >&- || echo $f; done`; Pm "Bad plists"; d=(Desktop L*/Keyc*); n=(20 7); for i in 0 1; do o=`find "${d[$i]}" -type f -maxdepth 1 | wc -l`; o=$((o<=n[$i]?0:o)); Ps "${d[$i]##*/} file count"; done; o=$((`date +%s`-t)); Ps "Elapsed time (s)"; } 2>/dev/null | pbcopy; exit 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    7. Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign ($) or a percent sign (%). If you get the percent sign, enter
    exec sh
    in the window and press return. You should then get a new line ending in a dollar sign.
    Click anywhere in the Terminal window and paste (command-V). The text you pasted should vanish immediately. If it doesn't, press the return key.
    If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. In most cases, the difference is not important. If you don't know your password, or if you prefer not to enter it, just press return three times at the password prompt.
    If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that takes administrator privileges.
    The test may take up to a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, there will be nothing in the Terminal window and no indication of progress. Wait for the line "[Process completed]" to appear. If you don't see it within half an hour or so, the test probably won't complete in a reasonable time. In that case, close the Terminal window and report your results. No harm will be done.
    8. When the test is complete, quit Terminal. The results will have been copied to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.
    If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.
    When you post the results, you might see the message, "You have included content in your post that is not permitted." It means that the forum software has misidentified something in the post as a violation of the rules. If it happens, please post the test results on Pastebin, then post a link here to the page you created.
    Note: This is a public forum, and others may give you advice based on the results of the test. They speak only for themselves, and I don't necessarily agree with them.
    Copyright © 2014 Linc Davis. As the sole author of this work, I reserve all rights to it except as provided in the Terms of Use of Apple Support Communities ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

  • Query runs slower after INSERT

    Hi All,
    We have a java swing application that uses JDBC to interact with an Oracle database.
    The user can display a list of data from one database table, then click a button which will insert a row into a different table using data from the highlighted row in the displayed list.
    As long as the user does not click the "insert" button, [s]he can open and close the window displaying the list as many times as [s]he wants, and it runs very fast.
    However, after the user clicks on the "insert" button, the query suddenly runs extremely slowly.
    Also note that this behaviour only occurs on one particular database server:
    Oracle9i Enterprise Edition Release 9.2.0.4.0
    Sun-Fire-V210 with SunOS 5.9
    The behaviour does not happen on other machines.
    (None of the other machines have the same combination of database server and platform.)
    Note that all the clients use the same JDK and JDBC driver.
    Any suggestions on where we should look in order to discover the cause of this behaviour?
    Thanks,
    Avi.

    Kamal,
    In the trace file produced, the rowid pseudo-row has been added to my SQL query. Here is an excerpt:
    (Note that the ALTER SESSION command was done via JDBC from our application.)
    The following statements encountered a error during parse:
    select rowid, FDU.DESK_USAGE_ROW_ID
    from FLIGHTS F, FLIGHT_DESK_USAGE FDU
    where ...
    Error encountered: ORA-00918Error message for code ORA-00918 is "column ambiguously defined".
    Since "rowid" is a pseudo column and since there are two tables involved in the query, obviously the unqualified "rowid" is ambiguous.
    Naturally, I didn't put "rowid" in my original SELECT statment.
    Is this added by JDBC, or by the Oracle optimizer, or what?
    Thanks,
    Avi.

  • Why is my iMac running slow after upgrading to Mavericks

    I have an iMac27 that up until I upgraded to Mavericks ran quite fast.  Now applications take much longer to open.  When the computer comes out of sleep mode it takes from 30 seconds to a minute to open.  All I have is a very dim grey screen and the only thing I can see is the mouse cursor.  I have checked Memory and disk space and nothing seems to be wrong using the activity monitor.  CPU 50 - 70% idle, Memory Physical 4.GB 3.97 GB used 7.07 Virtual, Memory pressure in the green, App Memory 1.47 GB, File cache 272.2 MB, Wired memory 620.5 MB, Compressed 1.63 GB.  Disk space 999.35GB capacity, 441.85 available.  When I did install Mavericks it did come back with a disk error.  Then it loaded fine.  I ran the disk utility and it found and repaired the problem.  Running it successive times since have shown no issues.
    Thanks

    (A) Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.
    (B) Reset all settings
    Settings>General>Reset>Reset all settings
    Note: Data will not be affected but settings will be reset.

Maybe you are looking for