A SQL tuning issue-sql runs much slower in test than in production?

Hi Buddies,
I am working on a sql tuning issue. A sql runs much slower in test than in production.
I compared the two explain plans in test and production
seems in test, CBO refuses to use index SUBLEDGER_ENTRY_I2.
we rebuile it and re-gether that index statistcs. run, still slow..
I compared the init.ora parameters like hash_area_size, sort_area_size in test, they are same as production.
I wonder if any expert friend can show some light.
in production,
SQL> set autotrace traceonly
SQL> SELECT rpt_horizon_subledger_entry_vw.onst_offst_cd,
2 rpt_horizon_subledger_entry_vw.bkng_prd,
3 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
4 rpt_horizon_subledger_entry_vw.jrnl_id,
5 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
6 rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
7 rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
8 rpt_horizon_subledger_entry_vw.crprt_melob_cd AS corp_mlb_cd,
rpt_horizon_subledger_entry_vw.onst_offst_cd, SUM (amt) AS amount
9 10 FROM rpt_horizon_subledger_entry_vw
11 WHERE rpt_horizon_subledger_entry_vw.bkng_prd = '092008'
12 AND rpt_horizon_subledger_entry_vw.jrnl_id = 'RCS0002100'
13 AND rpt_horizon_subledger_entry_vw.systm_afflt_cd = 'SAFF01'
14 GROUP BY rpt_horizon_subledger_entry_vw.onst_offst_cd,
15 rpt_horizon_subledger_entry_vw.bkng_prd,
16 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
17 rpt_horizon_subledger_entry_vw.jrnl_id,
18 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
19 rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
20 rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
21 rpt_horizon_subledger_entry_vw.crprt_melob_cd,
22 rpt_horizon_subledger_entry_vw.onst_offst_cd;
491 rows selected.
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=130605 Card=218764 B
ytes=16407300)
1 0 SORT (GROUP BY) (Cost=130605 Card=218764 Bytes=16407300)
2 1 VIEW OF 'RPT_HORIZON_SUBLEDGER_ENTRY_VW' (Cost=129217 Ca
rd=218764 Bytes=16407300)
3 2 SORT (UNIQUE) (Cost=129217 Card=218764 Bytes=35877296)
4 3 UNION-ALL
5 4 HASH JOIN (Cost=61901 Card=109382 Bytes=17719884)
6 5 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_ACCNT'
(Cost=2 Card=111 Bytes=3774)
7 5 HASH JOIN (Cost=61897 Card=109382 Bytes=14000896
8 7 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACC
OUNT' (Cost=2 Card=57 Bytes=1881)
9 7 HASH JOIN (Cost=61893 Card=109382 Bytes=103912
90)
10 9 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cost=
34 Card=4282 Bytes=132742)
11 9 HASH JOIN (Cost=61833 Card=109390 Bytes=7000
960)
12 11 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGE
R_ENTRY' (Cost=42958 Card=82076 Bytes=3611344)
13 12 INDEX (RANGE SCAN) OF 'SUBLEDGER_ENTRY_I
2' (NON-UNIQUE) (Cost=1069 Card=328303)
14 11 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_
LINK' (Cost=14314 Card=9235474 Bytes=184709480)
15 4 HASH JOIN (Cost=61907 Card=109382 Bytes=18157412)
16 15 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_ACCNT'
(Cost=2 Card=111 Bytes=3774)
17 15 HASH JOIN (Cost=61903 Card=109382 Bytes=14438424
18 17 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACC
OUNT' (Cost=2 Card=57 Bytes=1881)
19 17 HASH JOIN (Cost=61899 Card=109382 Bytes=108288
18)
20 19 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cost=
34 Card=4282 Bytes=132742)
21 19 HASH JOIN (Cost=61838 Card=109390 Bytes=7438
520)
22 21 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGE
R_ENTRY' (Cost=42958 Card=82076 Bytes=3939648)
23 22 INDEX (RANGE SCAN) OF 'SUBLEDGER_ENTRY_I
2' (NON-UNIQUE) (Cost=1069 Card=328303)
24 21 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_
LINK' (Cost=14314 Card=9235474 Bytes=184709480)
Statistics
25 recursive calls
18 db block gets
343266 consistent gets
370353 physical reads
0 redo size
15051 bytes sent via SQL*Net to client
1007 bytes received via SQL*Net from client
34 SQL*Net roundtrips to/from client
1 sorts (memory)
1 sorts (disk)
491 rows processed
in test
SQL> set autotrace traceonly
SQL> SELECT rpt_horizon_subledger_entry_vw.onst_offst_cd,
2 rpt_horizon_subledger_entry_vw.bkng_prd,
3 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
4 rpt_horizon_subledger_entry_vw.jrnl_id,
5 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
6 7 rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
8 rpt_horizon_subledger_entry_vw.crprt_melob_cd AS corp_mlb_cd,
9 rpt_horizon_subledger_entry_vw.onst_offst_cd, SUM (amt) AS amount
10 FROM rpt_horizon_subledger_entry_vw
11 WHERE rpt_horizon_subledger_entry_vw.bkng_prd = '092008'
12 AND rpt_horizon_subledger_entry_vw.jrnl_id = 'RCS0002100'
AND rpt_horizon_subledger_entry_vw.systm_afflt_cd = 'SAFF01'
13 14 GROUP BY rpt_horizon_subledger_entry_vw.onst_offst_cd,
15 rpt_horizon_subledger_entry_vw.bkng_prd,
16 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
17 rpt_horizon_subledger_entry_vw.jrnl_id,
18 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
rpt_horizon_subledger_entry_vw.crprt_melob_cd,
rpt_horizon_subledger_entry_vw.onst_offst_cd; 19 20 21 22
no rows selected
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=92944 Card=708 Bytes
=53100)
1 0 SORT (GROUP BY) (Cost=92944 Card=708 Bytes=53100)
2 1 VIEW OF 'RPT_HORIZON_SUBLEDGER_ENTRY_VW' (Cost=92937 Car
d=708 Bytes=53100)
3 2 SORT (UNIQUE) (Cost=92937 Card=708 Bytes=124962)
4 3 UNION-ALL
5 4 HASH JOIN (Cost=46456 Card=354 Bytes=60180)
6 5 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACCOU
NT' (Cost=2 Card=57 Bytes=1881)
7 5 NESTED LOOPS (Cost=46453 Card=354 Bytes=48498)
8 7 HASH JOIN (Cost=11065 Card=17694 Bytes=1362438
9 8 HASH JOIN (Cost=27 Card=87 Bytes=5133)
10 9 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cos
t=24 Card=87 Bytes=2175)
11 9 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_
ACCNT' (Cost=2 Card=111 Bytes=3774)
12 8 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_LI
NK' (Cost=11037 Card=142561 Bytes=2566098)
13 7 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGER_EN
TRY' (Cost=2 Card=1 Bytes=60)
14 13 INDEX (UNIQUE SCAN) OF 'SUBLEDGER_ENTRY_PK'
(UNIQUE) (Cost=1 Card=1)
15 4 HASH JOIN (Cost=46456 Card=354 Bytes=64782)
16 15 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACCOU
NT' (Cost=2 Card=57 Bytes=1881)
17 15 NESTED LOOPS (Cost=46453 Card=354 Bytes=53100)
18 17 HASH JOIN (Cost=11065 Card=17694 Bytes=1362438
19 18 HASH JOIN (Cost=27 Card=87 Bytes=5133)
20 19 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cos
t=24 Card=87 Bytes=2175)
21 19 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_
ACCNT' (Cost=2 Card=111 Bytes=3774)
22 18 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_LI
NK' (Cost=11037 Card=142561 Bytes=2566098)
23 17 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGER_EN
TRY' (Cost=2 Card=1 Bytes=73)
24 23 INDEX (UNIQUE SCAN) OF 'SUBLEDGER_ENTRY_PK'
(UNIQUE) (Cost=1 Card=1)
Statistics
1134 recursive calls
0 db block gets
38903505 consistent gets
598254 physical reads
60 redo size
901 bytes sent via SQL*Net to client
461 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
34 sorts (memory)
0 sorts (disk)
0 rows processed
Thanks a lot in advance
Jerry

Hi
Basically there are two kinds of tables
- fact
- lookup
The number of records in a lookup table is usually small.
The number of records in a fact table is usually huge.
However, in test systems the number of records in a fact table is often also small.
This results in different execution plans.
I notice again you don't post version and platform info, and you didn't make sure your explain is properly idented
Please read the FAQ to make sure it is properly idented.
Also using the word 'buddies' is as far as I am concerned nearing disrespect and rudeness.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • My iPad2 runs much slower in iOS8 than iOS7

    I have an iPad 2 that ran perfectly under iOS7, but when I upgraded to iOS8 it runs much slower and is barely usable.  I have a 16GB model with about 5GB available storage.  Do I just need to get a new iPad or is there some way to keep my current iPad running with a reasonable response time under iOS8?

    See this cool mp3 xml player with visualization, playlist and
    skins. Fully customisable. Vector.
    http://flashden.net/item/mp3-xml-strongplayerstrong-with-visualization-and-skins-vectorise d/11851

  • SQL 2012 DBCC CHECKDB Run Very Slow

    Does anyone experience this? SQL 2012 DBCC CHECKDB runs very slow on one of the server. I monitored the server and it seems DBCC CHECKDB does not hit the disk hard enough.
    It can read 100 mb per second on of my slower server, but on this particular server, it only read 1 mb per second. I saw parallel processes, but it just not read disk hard enough. I am curious what causes this? There is no user using the server when I run
    DBCC command. The full database restore took 3 hours, but DBCC CHECKDB took more than 11 hours.  Thanks for any input.
    Lijun

    Hi,
    Have you made the change of 'cost threshold for parallelism'? The default value of this is 5. Increasing the cost threshold for parallelism would cause most of the queries including CHECKDB to not execute parallel and hence will tend to
    take time to complete. This could be one of the issue contributing to the CHECKDB slow run.
    Also, please check if the antivirus is checking SQL Database files:
    http://support.microsoft.com/kb/309422
    Here is a good article on CHECKDB time taken to complete.
    http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/01/24/how-long-will-checkdb-take-to-run.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Since I downloaded Mavericks, my Mac seems to be running much slower. Anyone else have similar issues?

    Since I downloaded Mavericks, my Mac seems to be running much slower. Anyone else have similar issues?

    http://support.apple.com/kb/PH13895

  • Parameterized queries running much slower than ones with hardcoded values

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

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

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

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

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

  • I have always heard that Macs are less likely to get infected with a virus.  My computer has been running much slower since I installed Maverick.  Just not sure what the problem might be.  Is there a way for me to run a diagnosis?

    I have always heard that Macs are less likely to get infected with a virus.  My computer has been running much slower since I installed Maverick.  Just not sure what the problem might be.  Is there a way for me to run a diagnosis?

    Some have found relief just by reinstalling, but it is more than likely incompatible third-party applications that slow it down.
    You will have to investigate to see what it is.
    Open Activity Monitor and see if anything is using a lot of CPU% or Memory. If they are, check to see if there is an update for them.
    Another place to look is the Console. See if anything is logging repeating messages with throttling and/or respawn in the All Messages list.
    Sometimes it is not that easy to root out the problems, but if you have anything that purported to clean, protect, optimize, maintain, or flush your system, then that is likely the cause.

  • Permissions needed for Applying SQL Tuning Sets/SQL Plans 11g?

    What permission are needed for a user to apply/activate sql tuning sets (sql plans) in 11g? The user can capture and move the the sql tuning sets from a 10g database to an 11g database but is getting "ORA-01031: insufficient privileges" when trying to activate/apply the sqlplans in 11g.
    The user has:
    ADMINISTER SQL MANAGEMENT OBJECT and ADMINISTER SQL TUNING SET and EXECUTE on SYS.DBMS_SPM
    The user is an administrator for our Data Warehouse team but they do not have sysdba priviliges.
    Do you also know of a good white paper that covers the step by step instructions and permissions needed for aquiring and applying/activating sqlplans?
    If more information is needed in order to respond please advise.
    Thank you

    What permission are needed for a user to apply/activate sql tuning sets (sql plans) in 11g? The user can capture and move the the sql tuning sets from a 10g database to an 11g database but is getting "ORA-01031: insufficient privileges" when trying to activate/apply the sqlplans in 11g.
    The user has:
    ADMINISTER SQL MANAGEMENT OBJECT and ADMINISTER SQL TUNING SET and EXECUTE on SYS.DBMS_SPM
    The user is an administrator for our Data Warehouse team but they do not have sysdba priviliges.
    Do you also know of a good white paper that covers the step by step instructions and permissions needed for aquiring and applying/activating sqlplans?
    If more information is needed in order to respond please advise.
    Thank you

  • In CS6, JavaScript Running MUCH Slower than ActionScript

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

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

  • I play a lot of games.  I noticed my computer running much slower what can I do

    I play a lot of games.  I noticed my computer running much slower.  Is there something I can do to fix probkem

    Things You Can Do To Resolve Slow Downs
    If your computer seems to be running slower here are some things you can do:
    Start with visits to:     OS X Maintenance - MacAttorney;
                                      The X Lab: The X-FAQs;
                                      The Safe Mac » Mac Performance Guide;
                                      The Safe Mac » The myth of the dirty Mac;
                                      Mac maintenance Quick Assist.
    Boot into Safe Mode then repair your hard drive and permissions:
    Repair the Hard Drive and Permissions Pre-Lion
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. 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 installer.
    Repair the Hard Drive - 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 Utilites 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 disk icon and click on the arrow button below.
    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. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    Restart your computer normally and see if this has helped any. Next do some maintenance:
    For situations Disk Utility cannot handle the best third-party utility is Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible.
    Note: Alsoft ships DW on a bootable DVD that will startup Macs running Snow Leopard or earlier. It cannot start Macs that came with Lion or later pre-installed, however, DW will work on those models.
    Suggestions for OS X Maintenance
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger.  These utilities have limited or no functionality with Snow Leopard or later and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive.
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection I recommend using VirusBarrier Express 1.1.6 or Dr.Web Light both from the App Store. They're both free, and since they're from the App Store, they won't destabilize the system. (Thank you to Thomas Reed for these recommendations.)
    Troubleshooting Applications
    I recommend downloading a utility such as TinkerTool System, OnyX, Mavericks Cache Cleaner, or Cocktail that you can use for removing old log files and archives, clearing caches, etc. Corrupted cache, log, or temporary files can cause application or OS X crashes as well as kernel panics.
    If you have Snow Leopard or Leopard, then for similar repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. Applejack does not work with Lion and later.
    Basic Backup
    For some people Time Machine will be more than adequate. Time Machine is part of OS X. There are two components:
    1. A Time Machine preferences panel as part of System Preferences;
    2. A Time Machine application located in the Applications folder. It is
        used to manage backups and to restore backups. Time Machine
        requires a backup drive that is at least twice the capacity of the
        drive being backed up.
    Alternatively, get an external drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
      1. Carbon Copy Cloner
      2. Get Backup
      3. Deja Vu
      4. SuperDuper!
      5. Synk Pro
      6. Tri-Backup
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files. For help with using Time Machine visit Pondini's Time Machine FAQ for help with all things Time Machine.
    Referenced software can be found at MacUpdate.
    Additional Hints
    Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.
    Add more RAM. If your computer has less than 2 GBs of RAM and you are using OS X Leopard or later, then you can do with more RAM. Snow Leopard and Lion work much better with 4 GBs of RAM than their system minimums. The more concurrent applications you tend to use the more RAM you should have.
    Always maintain at least 15 GBs or 10% of your hard drive's capacity as free space, whichever is greater. OS X is frequently accessing your hard drive, so providing adequate free space will keep things from slowing down.
    Check for applications that may be hogging the CPU:
    Pre-Mavericks
    Open Activity Monitor in the Utilities folder.  Select All Processes from the Processes dropdown menu.  Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Mavericks and later
    Open Activity Monitor in the Utilities folder.  Select All Processes from the View menu.  Click on the CPU tab in the toolbar. Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Often this problem occurs because of a corrupted cache or preferences file or an attempt to write to a corrupted log file.

  • Firefox runs much slower with the new download of version 3.6.8

    I downloaded Firefox 3.6.8 on Sat. 7/30. Now it seems to be running much slower and some websites take forever to download some pages. What can I do to get it running like it was before the download? I have windows 7 os
    == URL of affected sites ==
    http://

    Same here but im running windows xp pro

  • Is the Core i7 processor comparable, much slower, or faster than the 2.8 Ghz core 2 duo from 2009?

    I am looking to get a new MacBook Air, but when looking at the prices I am seeing the MacBook Pro 13" for the same price and a lot more guts (RAM and Processor).  I am ok with spending the amount of money on the air if it means I get a computer that is like my iPad, which i love (flash based, snappy), but don't want it to be super slow.
    I am coming off of a 17" 2.8Ghz MacBook Pro from 2009.  I was happy with the speed and power of that machine.  The most taxing thing I did was make a complilation of family movies in iMovie and burned them with iDVD once in the 2 years of ownership. 
    I mostly browse the internet and compose written documents, and keynote presentations.
    I know my questions may seem stupid, but I don't know how significant the changes between i7 and Core 2 Duo are, so I ask the question:
    I am wondering if the processing power in the core i7 will be somewhat comparable, much slower, or faster than the 2.8 Ghz Core 2 Duo I had in my 2009 computer?
    Thanks for any help!!

    Hi brosephb,
    Like you I went through a similar comparison process. I bought the MacBook air 13" and up specced the processor and memory. I don't do anything taxing enough or frequently enough to NEED the extra power of the MacBook pro.
    I am overjoyed at my air. It's gorgeous, the way it wakes instantly, it's speed and it's portableness is so endearing that I just don't use my iPad anymore. I read numerous reviews on it and the overwhelming opinion was it's addictive ease of use because of it's slim, light and rapid waking. At work I can hold the air with one hand, open it rapidly at will. It's just great but it's made my iPad redundant (for me anyway).
    I see the new airs are even faster and I'm tempted to consider selling my 6 month old air and getting the new one, but, it runs a dream so I am happy to just be envious of the new one.
    In short, unless you need the power (for your work) go for the air. I'm looking at a new iMac to use as a home work station. For the price of a new air I can get an iMac that will swallow any task for a good few years to come. And my air will suffice as my mobile companion. However, that's just me spoiling myself as, at the moment, I have no teal need for another mac. I may get the cinema display for any long winded tasks, as the screen size will help with multiple tasking.
    A bit of a ramble, hope this is useful.

  • To run a piece of PL/SQL code,  in TT  is much slower than   in ORACLE.

    A piece of PL/SQL code , about 1500 lines, package is named rtmon_event, function in it is named rtmon_SHOLD_CUS_RPT;
    the PL/SQL code is run in ORACLE.
    Now I want to get fast speed, I think of TT.
    I rewrite the PL/SQL code by grammer in TT.
    But the speed in TT is much slower than the speed in ORACLE.
    In ORACLE, to run the PL/SQL code, it need 80 seconds; but In TT, to run the PL/SQL code, it need 183 seconds;
    How can I resolve the problem?
    Btw: there are some joins of 2 tables, or 3 tables in rtmon_event.rtmon_SHOLD_CUS_RPT, and some complex DML in it.
    The run method is :
    declare
    a number;
    begin
    a := rtmon_event.rtmon_SHOLD_CUS_RPT ;
    end;
    Thanks a lot.

    The easiest way to view a plan is to use ttIsql and issue the command:
    explain SQL-statement;
    For example:
    explain select a.ol1, b.col2 from taba a, tab b where a.key = b.key;
    See the documentation that 'hitgon' pointed you to to help you interpret the plans.
    Chris

  • SQL tuning issue

    Hi, I would like some help tuning the following query:
    SELECT distinct
    cs.study,
    de.STUDY_SITE Site,
    iv.last_name INV,
    de.PATIENT ,
    pv.visit_number Visit,
    -- REPLACE(asm.assessor_name, ',', '|') assessor_name,
    de.DISCREPANCY_REV_STATUS_CODE Status,
    FROM
    RXC.discrepancy_management de, -- a view driven by table rxc.discrepancy_enties
    RXC.procedures pd,
    clinical_studies cs,
    ocl_investigators iv,
    rxa_des.clinical_planned_events pv,
    dcis dc
    -- s999$stable.asmasm asm -- a view, pls see comments below
    WHERE
    cs.study='999'
    and de.PROCEDURE_ID=pd.PROCEDURE_ID
    and de.clinical_study_id=cs.clinical_study_id
    and iv.investigator_id=de.investigator_id
    and de.clin_plan_eve_id=pv.clin_plan_eve_id
    and pv.clin_study_id=cs.clinical_study_id
    and cs.clinical_study_id=dc.clinical_study_id
    and de.patient not like '99%'
    and de.dci_id= dc.dci_id
    and de.discrepancy_status_code not in ('OBSOLETE')
    and de.discrepancy_rev_status_code in ('INV REVIEW','INV PENDING')
    --and de.patient = asm.pt(+)
    --and de.clin_plan_eve_name = asm.cpevent(+)
    --and asm.assessor_name(+) is not null
    and nvl(asm.subsetsn, 99) in (12,15,99)  this might not work
    The above query takes 16 seconds to run but when I add in the view "s999$stable.asmasm asm" execution time drops
    to about 25 mins. Looking at the related explain plans the difference is an index lookup on RXC.DISCREPANCY_ENTRIES (the driving
    table used in view RXC.discrepancy_management) is dropped and replaced by a full table scan resulting in a large increase in the cost.
    I've tried using the following hints without any success...
    /*+ NO_MERGE(s9999$stable.asmasm) INDEX(DISCREPANCY_MANAGEMENT.DISCREPANCY_ENTRIES DISCREPANCY_ENT_CS_IDX */
    Any help on the cause and fix for this issue would be much appreciated.

    When your query takes too long ...
    HOW TO: Post a SQL statement tuning request - template posting

  • CS6 JavaScript Running Much Slower than ActionScript

    Dear All,
    In advance of the next version of InDesign CC, which will only support HTML5 and JavaScript, I converted all of my Extension's business logic from ActionScript to JavaScript - about 20,000 lines of code.
    I am using CS6 to run my Extension, and I call my JavaScript methods from within legacy Flex/ActionScript event-handler code using this methodology:
    [Embed(source="MyJSModule1.jsx", mimeType= "application/octet-stream" )]
    private static var _myJSModule1:Class;
    [Embed(source="MyJSModule2.jsx", mimeType= "application/octet-stream" )]
    private static var _myJSModule2:Class;
    _interface = HostObject.getRoot(HostObject.extensions[0]);
    public static function Initialize()
    _interface.eval(new _myJSModule1.toString());
    _interface.eval(new _myJSModule2.toString());
    _interface.myJSMethod();
    I have found that my InDesign Extension runs about 5 times slower in JavaScript than it did in ActionScript.
    Posts I read on the web seemed to indicate that JS would only be about 30% slower.
    Would the upcoming V8-based and Node.js-supporting environment be any faster?
    I really, really need help with this.
    TIA,
    mlavie

    Hmm,
    at that project/code size you get at plenty points where things matter that would be irrelevant in smaller scripts. A few years ago I extended and re-architectured a similar project, by thorough optimizations we got an speed increase of roughly tenfold, of course partially eaten up by new features.
    For the beginning: rather than issuing 80 evals, for deployment I'd compile such an enormous pile of sources into a single file. For debugging, #include is much more fun.
    As you mention argument passing of large xml, that's one area where ExtendScript can seriously slow down. Besides you'll probably find a size limit of about 64k for the underlying XML. We used InDesign document XML for working data, while smaller configuration data was parsed into js objects as soon as possible. I wrote a JSX abstraction layer that would work on either kind of XML.
    Next problem - number of prototype slots. It definitely makes a difference if you have too much, I partitioned objects into cross-linked clusters, similar to the plugin object model (boss classes), the whole enchilada supported by an underlying framework that generated JSX collections etc. by a few declarations, roughly the equivalent to templates in other languages.
    At least you're using prototypes - one really big issue with ExtendScript is the explosion of object allocations when you apply the typical closure-based JavaScript style from web programming. Eliminating them was a very big effort in our rewrite, but also gave a pretty good improvement. At least ExtendScript can produce allocation statistics, use them. Also use them to find and eliminate circular link object leaks etc. A while ago I wrote a diff utility that extends $.summary(), InDesign Server also has some goodies.
    Have you noticed ESTK's profiler? Unfortunately it just gave up at our code size, probably it will also for yours. Instead I used an own profiler with several additions, e.g. I could apply the profiler selectively to some modules while already optimized modules were skipped. It really helps to know your candidates when management pressures for "quick wins" ... Where is most absolute computation time burnt, or what methods are invoked a couple 10000 times too often for your gut feeling. Again, eliminate dead code and thus reduce prototype/object slot count. When your central class has 100s properties and matching get/set methods, eliminating them one by one produces measurable improvements.
    Of course I also tracked down some offending statements where the same value was assigned over and over again causing severe text recomposition while nothing was actually changed ... You can only find such problems with exact measurements.
    Other areas of fun: under the hood (at C++ level) every temporary text expression is backed by an enormous aggregation "suite", there are many things you can do wrong there. For example these things just pile up and are rarely purged, therefor it has become common wisdom to do an occasional save() for lengthy scripts.
    Again at the XML side: if you do severe document XML (we did), there are some circumstances where text attributes will get lost/ignored. There are ways to speed up expressions underlying references to document XML, and so forth. To know when to rebuild the XML expressions or when they can be reused is a science for itself. Same goes for other objects, as you already mention getElements(). Sometimes it helps, sometimes it is just a waste of execution time.
    As you mention the advantage of SSDs: How frequently do you dump those jsx sources into ExtendScript? If you currently use the "main" session (is that possible for HTML extensions at all?), utilize persistent sessions instead - when you have eliminated your object leaks.
    There are plenty more optimizations, I probably should write a book - to be sold in about 5 copies. Unfortunately the strongest advice in its preface would be to not use ExtendScript/JavaScript at all for large scale projects, because they turn into a maintenance nightmare where other languages catch errors on compile time. Dependent on client preference I'd probably turn to Java or do the whole thing in C++, at increasing code size development speed will be roughly on par.

Maybe you are looking for

  • Viewing rented content across multiple ATV

    I have multiple ATV if I rent on one can I watch the rented content on any of the ATV or only the one I originally rented the content on? Thanks for the info. On a side note I noticed with my Denon AVR I had to change my ATV Digital Dolby setting to

  • Faulty calculation

    I'm using PB kernel (see below) in an AIR / Flex application to speed up some calculations. The data I supply is a Vector.<Number> of floating point precision pixels. Every pixel is stored as three consecutive Numbers respectively for R,G,B channels,

  • How to copy pdf files from computer to ipad

    how to copy pdf files from computer to ipad

  • Windows 7 default libraries are hidden

    Hi I have accidentally hidden the deafualt libraries in Windows 7.  I foolishly updated all folders in my users/<name> folder and all subfolders to 'Hidden'.  I then reversed this by unchecking the 'Hidden' option.  However, my default libraries are

  • Creating a Poll Pod

    Hi, I want to create a custom pod which will enable owners to create questions (with answer options for others to choose from ofcourse), and others to submit their votes. I went through the SharedModel sample to see how can I work with shared model.