Query Performance problem after upgrade from 8i to 10g

Following query takes longer time in 10g.
SELECT LIC_ID,FSCL_YR,KEY_NME,CRTE_TME_STMP,REMT_AMT,UNASGN_AMT,BAD_CK_IND,CSH_RCPT_PARTY_ID,csh_rcpt_id,REC_TYP,XENT_ID,CLNT_CDE,BTCH_CSH_STA,file_nbr,
lic_nbr,TAX_NBR,ASGN_AMT FROM (
SELECT /*+ FIRST_ROWS*/
     cpty.lic_id,
cpty.clnt_cde,
cpty.csh_rcpt_party_id,
cpty.csh_rcpt_id,
cpty.rec_typ,
cpty.xent_id,
cr.fscl_yr,
cbh.btch_csh_sta,
nam.key_nme,
lic.file_nbr,
lic.lic_nbr,
cr.crte_tme_stmp,
cr.remt_amt,
cr.unasgn_amt,
ee.tax_nbr,
cr.asgn_amt,
cr.bad_ck_ind
FROM lic lic
,csh_rcpt_party cpty
,name nam
,xent ee
,csh_rcpt cr
,csh_btch_hdr cbh
WHERE 1 = 1
AND ee.xent_id = nam.xent_id
AND cbh.btch_id = cr.btch_id
AND cr.csh_rcpt_id = cpty.csh_rcpt_id
AND ee.xent_id = cpty.xent_id
AND cpty.lic_id = lic.lic_id(+)
AND (cpty.clnt_cde IN ( SELECT clnt_cde
FROM clnt
               START WITH clnt_cde = '4006'
CONNECT BY PRIOR clnt_cde_prnt = clnt_cde)
OR cpty.clnt_cde IS NULL)
AND nam.cur_nme_ind = 'Y'
AND nam.ent_nme_typ = 'P' AND nam.key_nme LIKE 'WHITE%')
order by lic_id
Explain Plan in 8i
0 SELECT STATEMENT Optimizer=HINT: FIRST_ROWS (Cost=17 Card=1
Bytes=107)
1 0 FILTER
2 1 NESTED LOOPS (Cost=17 Card=1 Bytes=107)
3 2 NESTED LOOPS (Cost=15 Card=1 Bytes=101)
4 3 NESTED LOOPS (OUTER) (Cost=13 Card=1 Bytes=73)
5 4 NESTED LOOPS (Cost=11 Card=1 Bytes=60)
6 5 NESTED LOOPS (Cost=6 Card=1 Bytes=35)
7 6 INDEX (RANGE SCAN) OF 'NAME_WBSRCH1_I' (NON-UN
IQUE) (Cost=4 Card=1 Bytes=26)
8 6 TABLE ACCESS (BY INDEX ROWID) OF 'XENT' (Cost=
2 Card=4649627 Bytes=41846643)
9 8 INDEX (UNIQUE SCAN) OF 'EE_PK' (UNIQUE) (Cos
t=1 Card=4649627)
10 5 TABLE ACCESS (BY INDEX ROWID) OF 'CSH_RCPT_PARTY
' (Cost=5 Card=442076 Bytes=11051900)
11 10 INDEX (RANGE SCAN) OF 'CPTY_EE_FK_I' (NON-UNIQ
UE) (Cost=2 Card=442076)
12 4 TABLE ACCESS (BY INDEX ROWID) OF 'LIC' (Cost=2 Car
d=3254422 Bytes=42307486)
13 12 INDEX (UNIQUE SCAN) OF 'LIC_PK' (UNIQUE) (Cost=1
Card=3254422)
14 3 TABLE ACCESS (BY INDEX ROWID) OF 'CSH_RCPT' (Cost=2
Card=6811443 Bytes=190720404)
15 14 INDEX (UNIQUE SCAN) OF 'CR_PK' (UNIQUE) (Cost=1 Ca
rd=6811443)
16 2 TABLE ACCESS (BY INDEX ROWID) OF 'CSH_BTCH_HDR' (Cost=
2 Card=454314 Bytes=2725884)
17 16 INDEX (UNIQUE SCAN) OF 'CBH_PK' (UNIQUE) (Cost=1 Car
d=454314)
18 1 FILTER
19 18 CONNECT BY
20 19 INDEX (UNIQUE SCAN) OF 'CLNT_PK' (UNIQUE) (Cost=1 Ca
rd=1 Bytes=4)
21 19 TABLE ACCESS (BY USER ROWID) OF 'CLNT'
22 19 TABLE ACCESS (BY INDEX ROWID) OF 'CLNT' (Cost=2 Card
=1 Bytes=7)
23 22 INDEX (UNIQUE SCAN) OF 'CLNT_PK' (UNIQUE) (Cost=1
Card=1)
Explain Plan in 10g
0 SELECT STATEMENT Optimizer=HINT: FIRST_ROWS (Cost=19 Card=1
Bytes=112)
1 0 SORT (ORDER BY) (Cost=19 Card=1 Bytes=112)
2 1 FILTER
3 2 NESTED LOOPS (Cost=18 Card=1 Bytes=112)
4 3 NESTED LOOPS (Cost=16 Card=1 Bytes=106)
5 4 NESTED LOOPS (OUTER) (Cost=14 Card=1 Bytes=78)
6 5 NESTED LOOPS (Cost=12 Card=1 Bytes=65)
7 6 NESTED LOOPS (Cost=6 Card=1 Bytes=34)
8 7 INDEX (RANGE SCAN) OF 'NAME_WBSRCH1_I' (INDE
X) (Cost=4 Card=1 Bytes=25)
9 7 TABLE ACCESS (BY INDEX ROWID) OF 'XENT' (TAB
LE) (Cost=2 Card=1 Bytes=9)
10 9 INDEX (UNIQUE SCAN) OF 'EE_PK' (INDEX (UNI
QUE)) (Cost=1 Card=1)
11 6 TABLE ACCESS (BY INDEX ROWID) OF 'CSH_RCPT_PAR
TY' (TABLE) (Cost=6 Card=1 Bytes=31)
12 11 INDEX (RANGE SCAN) OF 'CPTY_EE_FK_I' (INDEX)
(Cost=2 Card=4)
13 5 TABLE ACCESS (BY INDEX ROWID) OF 'LIC' (TABLE) (
Cost=2 Card=1 Bytes=13)
14 13 INDEX (UNIQUE SCAN) OF 'LIC_PK' (INDEX (UNIQUE
)) (Cost=1 Card=1)
15 4 TABLE ACCESS (BY INDEX ROWID) OF 'CSH_RCPT' (TABLE
) (Cost=2 Card=1 Bytes=28)
16 15 INDEX (UNIQUE SCAN) OF 'CR_PK' (INDEX (UNIQUE))
(Cost=1 Card=1)
17 3 TABLE ACCESS (BY INDEX ROWID) OF 'CSH_BTCH_HDR' (TAB
LE) (Cost=2 Card=1 Bytes=6)
18 17 INDEX (UNIQUE SCAN) OF 'CBH_PK' (INDEX (UNIQUE)) (
Cost=1 Card=1)
19 2 FILTER
20 19 CONNECT BY (WITH FILTERING)
21 20 TABLE ACCESS (BY INDEX ROWID) OF 'CLNT' (TABLE) (C
ost=2 Card=1 Bytes=15)
22 21 INDEX (UNIQUE SCAN) OF 'CLNT_PK' (INDEX (UNIQUE)
) (Cost=1 Card=1)
23 20 NESTED LOOPS
24 23 BUFFER (SORT)
25 24 CONNECT BY PUMP
26 23 TABLE ACCESS (BY INDEX ROWID) OF 'CLNT' (TABLE)
(Cost=2 Card=1 Bytes=7)
27 26 INDEX (UNIQUE SCAN) OF 'CLNT_PK' (INDEX (UNIQU
E)) (Cost=1 Card=1)
28 20 TABLE ACCESS (FULL) OF 'CLNT' (TABLE) (Cost=5 Card
=541 Bytes=5951)
Explain plan looks different in steps 19 to 28. I am not sure why 10g have more steps

Hi
I have no experience in 8i. I do know 10g does costing different from 8i. So I think the other plan might got elliminated.
Normally when I see differences. I just collect statistics on the tables and the indexes and remove the hints. Hints are not good . This has helped me to solve few problems.
Thanks
CT

Similar Messages

  • Performance problem after upgrade from Web version to Basic version

    A couple days I ago I 'upgraded' my SQL Azure database from the Web service tier to Basic. Since doing that the performance on many of my queries as dropped noticeably. I've made no schema changes, and the amount of data in my database has changed very
    little since the upgrade. Has anyone had this same problem?
    Randy Minder

    Randy,
    See this blog about how to upgrade to the new tiers and some advice on finding the right fit.
    http://azure.microsoft.com/en-us/documentation/articles/sql-database-upgrade-new-service-tiers/
    Basic is not equivalent to Web in the new Editions tiers. While you do 'upgrade' to editions, granting you access to new features and the tiers themselves, you can now choose an experience which has less performance than you had previous in Web/Business.
    Try upgrading your server to a new tier based on the advice in the article above. If you read the article below:
    https://msdn.microsoft.com/en-us/library/azure/dn369873.aspx
    You can see that standard is actually targeting at many of the production use cases of Web, where Basic is targeting developers who were using Web, before, to test out their applications. Basic isn't intended for scenarios with multiple concurrent users.
    Hopefully that helped. If you have any other questions, feel free to reply.
    Regards,
    Chris

  • Spatial query performance problem after upgrade to 10G

    I am in the process of converting my database from a 9i box to a new 10G 64-bit box. But I have found a problem which is causing some reports to be slower on the new box. I have simplified the queries down to having the user_sdo_geom_metadata table joined to use the diminfo in the queries (I know that I am not using them in these queries, but I simplified for testing purposes...)
    If I run the following I get and look at the explain plan I get full table scans for both spatial tables and index lookups for the user_sdo_geom_metadata table queries and runs for about 14 seconds.
    SELECT ROWNUM
    from COUNTIES s,
    NOMINATIONS O,
    (select diminfo from user_sdo_geom_metadata where table_name='COUNTIES') S_DIM,
    (select diminfo from user_sdo_geom_metadata where table_name='NOMINATIONS') O_DIM
    where sdo_filter(S.GEOM,o.geom, 'querytype=WINDOW')='TRUE'
    and sdo_geom.within_distance(o.geom,0,S.GEOM,.5)='TRUE';
    If I just remove the two user_sdo_geom_metadata joins, I get spatial index usage on COUNTIES and the whole thing runs in less that a second.
    SELECT ROWNUM
    from COUNTIES s,
    NOMINATIONS O
    where sdo_filter(S.GEOM,o.geom, 'querytype=WINDOW')='TRUE'
    and sdo_geom.within_distance(o.geom,0,S.GEOM,.5)='TRUE';
    I have rebuilt the indexes, gathered stats, and tried hints to force the first query to use the spatial index. None of which made any change.
    Has anyone else seen this?
    Gerard Vidrine

    Hi Gerard,
    When the query window comes from a table Oracle always recommends:
    1) Use the /*+ ordered */ hint
    2) Put the table the quiery window comes from (geometry-2 in the query) first in the from clause
    However, your query is also written very strange. Do you know about SDO_WITHIN_DISTANCE? Or are you trying to do SDO_ANYINTERACT (since the distance is 0)?
    So I would write the query you have as:
    SELECT s.ROWNUM
    from NOMINATIONS O, COUNTIES s
    where sdo_relate(S.GEOM,o.geom, 'querytype=WINDOW mask=anyinteract')='TRUE';
    or in Oracle10g:
    SELECT s.ROWNUM
    from NOMINATIONS O, COUNTIES s
    where sdo_anyinteract(S.GEOM,o.geom)='TRUE';

  • Performance issue after Upgrade from 4.7 to ECC 6.0 with a select query

    Hi All,
    There is a Performance issue after Upgrade from 4.7 to ECC 6.0 with a select query in a report painter.
    This query is working fine when executed in 4.7 system where as it is running for more time in ECC6.0.
    Select query is on the table COSP.
    SELECT (FIELD_LIST)
            INTO CORRESPONDING FIELDS OF TABLE I_COSP PACKAGE SIZE 1000
            FROM  COSP CLIENT SPECIFIED
            WHERE GJAHR IN SELR_GJAHR
              AND KSTAR IN SELR_KSTAR
              AND LEDNR EQ '00'
              AND OBJNR IN SELR_OBJNR
              AND PERBL IN SELR_PERBL
              AND VERSN IN SELR_VERSN
              AND WRTTP IN SELR_WRTTP
              AND MANDT IN MANDTTAB
            GROUP BY (GROUP_LIST).
       LOOP AT I_COSP      .
         COSP                           = I_COSP      .
         PERFORM PCOSP       USING I_COSP-_COUNTER.
         CLEAR: $RWTAB, COSP                          .
         CLEAR CCR1S                         .
       ENDLOOP.
    ENDSELECT.
    I have checked with the table indexes, they were same as in 4.7 system.
    What can be the reson for the difference in execution time. How can this be reduced without adjusting the select query.
    Thanks in advance for the responses.
    Regards,
    Dedeepya.

    Hi,
    ohhhhh....... lots of problems in select query......this is not the way you should write it.
    Some generic comments:
    1. never use SELECT
                       endselect.
       SELECT
      into table
       for all entries in table
      where.
       use perform statment after this selection.
    2. Do not use into corresponding fields. use exact structure type.
    3. use proper sequence of fields in the where condition so that it helps table go according to indexes.
        e.g in your case
              sequence should be
    LEDNR
    OBJNR
    GJAHR
    WRTTP
    VERSN
    KSTAR
    HRKFT
    VRGNG
    VBUND
    PARGB
    BEKNZ
    TWAER
    PERBL
    sequence should be same as defined in table.
    Always keep select query as simple as possible and perform all other calculations etc. afterwords.
    I hope it helps.
    Regards,
    Pranaya

  • Sorting issue after upgrade from 9i to 10g

    Dear all,
    It is found that the sorting behavior is different after upgrade from 9i to 10g.
    In 9i, even if the SQL statement does not specify the ORDER BY clause, the sorting order is consistent for a particular SQL statement and most likely the sequence follows the searched key fields' order.
    After upgrade to 10g, the query output could vary as long as the SQL statement does not specify the ORDER BY clause.
    Is it due to the Reverse Docid Sorting issue? How can I troubleshoot this issue?
    Thanks for your help,
    M.T.

    903714 wrote:
    Dear all,
    It is found that the sorting behavior is different after upgrade from 9i to 10g.
    In 9i, even if the SQL statement does not specify the ORDER BY clause, the sorting order is consistent for a particular SQL statement and most likely the sequence follows the searched key fields' order.
    After upgrade to 10g, the query output could vary as long as the SQL statement does not specify the ORDER BY clause.
    Is it due to the Reverse Docid Sorting issue? How can I troubleshoot this issue?
    Thanks for your help,
    M.T. This is expected behavior in 10g. Oracle will not order the dataset for you unless and until you explicitly specify it.
    So without using order by clause in 10g, oracle doesn't guarantee that rows will be ordered.
    To go back to old behavior like 9i, you can set a workaround by
    alter session set "_newsort_enabled"=false;
    Also see MOS - Order Of Data Retrieval Differs after upgrading 9i To 10g [ID 456707.1]

  • Problems after upgrading from 10.2.3 to 10.2.8

    After upgrading from 10.2.3 to 10.2.8, itunes "unexpectedly quits" when I try to purchase a song, and safari "unexpectedly quits" when I visit certain websites. Before upgrading, no such problems.

    Hello rick,
    First of all, welcome to the Apple discussions.
    * How did you upgrade the OSX 10.2.3??
    * Did you use the combo update?
    * Did you run the dick repair permissions before an after
    Here is the Combo Update for OSX 10.x
    Combo Update
    An here is how you use the disc repair permissions
    About Disck Repair Permissions
    Applications Quits
    Let me know if so ...
    Discussions is a ongoing process. Hope to see you around anytime you need us, or can offer help to others.
    Dimaxum <]:~))

  • The optimizer changed after upgrade from 8i to 10g

    I have upgraded my Oracle database from 8i (8.1.7.3) to 10g (10.2.0.3). After upgraded, there's some SQLs are with performance issue that the response time is very slow. The SQL can run very fast (around 1 seconde) in the pre-upgrade environment. Also, after generating the execution plan, there's different from the original enivronment (8i) which the query using some full table scan instead of index scan originally used in 8i.
    The optimizer_mode of 8i is RULE and it's CHOOSE when upgraded.
    My questions are:
    1. Do I have any init.ora parameters setting in 10g environment which differ from 8i?
    2. What method of analyzing tables is appropriate to use in 10g? Will this affect the performance like my case?
    Thanks,
    Wai

    Please have a look to following threads:
    Re: Optimizer Statistics collection after upgrade from 8i to 10R2
    Re: DB upgrade from oracle 8.1.7 to oracle 10.2.0.2

  • Tag not being created after upgrade from 9i to 10g

    We're upgrading from 9i to 10g - about time - and we've hit some "unexpected behaviour".
    If I run
        SELECT  xmlelement("TestMsg",
                        XMLFOREST(m.tx_id   "MsgNum",
                                  m.tx_type "MsgTyp"
                                  ) MESSAGE -- this is the alias for the XMLFOREST item
                        ) ut_xml
        FROM (select 1 tx_id, 'test' tx_type from dual) mon my 9.2.0.4 database I get
    <TestMsg>
      <MESSAGE>
        <MsgNum>1</MsgNum>
        <MsgTyp>test</MsgTyp>
      </MESSAGE>
    </TestMsg>- an extra tag is created based on the alias of the XMLFOREST item.
    on my 10.2.0.4 database I get
    <TestMsg>
      <MsgNum>1</MsgNum>
      <MsgTyp>test</MsgTyp>
    </TestMsg>no MESSAGE tag.
    Some of the XML parsing we have is taking account of this MESSAGE tag and hence is now breaking.
    I guess my question is whether we've messed up the install of XMLDB or whether the 9i behaviour was incorrect and we should amend the parsing to the 10g behaviour.

    Behavior change...?
    SELECT  xmlelement("TestMsg",
                        xmlelement("MESSAGE",
                        XMLFOREST(m.tx_id   "MsgNum",
                                  m.tx_type "MsgTyp"
                        )) ut_xml
    FROM (select 1 tx_id, 'test' tx_type from dual) m
    will give output in 10.2.0.4.0 EE
    UT_XML
    <TestMsg>
       <MESSAGE>
          <MsgNum>1</MsgNum>
          <MsgTyp>test</MsgTyp>
       </MESSAGE>
    </TestMsg>Edited by: Marco Gralike on Mar 29, 2011 1:07 PM

  • 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

  • Search Service Application problems after upgrading from Foundation to Enterprise edition of SharePoint 2013

    Hi all. I have been searching for days for a solution to a problem I am having with SP2013 Enterprise edition.
    We recently upgraded from SP2013 Foundation to SP2013 Enterprise. After the upgrade, the search services are no longer working and we are receiving many application log entries indicating the following:
    Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (ea2019ef-bb9e-4efe-85ee-5d2307406f31).
    Reason: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Technical Support Details:
    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
       at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
       at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)
    as well as:
    Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (ea2019ef-bb9e-4efe-85ee-5d2307406f31).
    Reason: The object you are trying to create already exists. Try again using a different name.  
    Technical Support Details:
    System.Runtime.InteropServices.COMException (0x80040D02): The object you are trying to create already exists. Try again using a different name.  
       at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
       at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)
    I have tried to remove the search service application and recreate it, and even though the SharePoint Central Administration states that it was created successfully, I am still getting the same errors in the log. If I go to the Search Service Application
    Search Administration page, the "System Status" shows the following message:
    The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component '0359af35-0982-4ede-8838-b1d390e915bf' in search application 'Search Service Application' is in a good state and
    try again
    Additionally, under the "Search Application Topology" section, it states "Unable to retrieve topology component health states. This may be because the admin component is not up and running" which I assume is normal if the admin is not
    running.
    Does anyone know how I can resolve this problem? 
    Thanks!

    Hi Joaquin,
    According to your description, the error occurred when you re-created the Search Service Application.
    Based on the error message, I recommend to verify the things below:
       1. Check if the association between the Search Service Application proxy and the web application is configured.
    Please go to Central Administration > Application Management > Configured service application associations > Click Default to see if the Search Service application is checked.
       2. Change the app pool for the Search Service Application to SharePoint Web Services Default in the properties of the Search Service Application.
    Please go to Central Administration > Application Management > Manage service applications > Highlight the Search Service Application > Click Properties in the ribbon > Change
    the two app pool to SharePoint Web Services Default: App Pool For Search Admin Web Service and Application Pool for Search Query and Site Settings Web Service.
        3. Run PS command to check if the search admin timer job is enabled: Get-SPTimerJob
    job-application-server-admin-service | fl. If it is not enabled, use PS command to enabled it and then reset Internet Information Services: Enable-SPTimerJob job-application-server-admin-service.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Performance Problem After upgrade to oracle 10g

    Hi
    I have upgrade one of my datawarehouse database from oracle 9.2.0.8 to oracle 10.2.0.4 running on solaris 9
    After the upgrade jobs which were running in the database is taking hell lot of time.
    The jobs are accessing the views which is used to get the monthly report data from the database.
    what could be the solution and where to start from to get the RCA to resolve this performance issue
    Please let me know if you require any other information
    database is currently running in the automatic shared memory management mode ie SGA_MAX and SGA_TARGET parameters are defined for that

    There are a lot of differences between 10g and 9i in this regard, among these are:
    - There is a default job that gathers statistics every night which is not there in 9i. You might have totally different statistics as in 9i due to that job, depending on how and if at all you used to collect statistics in 9i
    - The 10g DBMS_STATS package collects histograms on some columns by default (parameter METHOD_OPT=>'FOR ALL COLUMNS SIZE AUTO' default in 10g whereas 'FOR ALL COLUMNS SIZE 1' in 9i) which can have a significant effect on the execution plans
    - The 10g optimizer has CPU costing enabled by default which can make significant changes to your execution plans due to different costing of table scans and order of predicate evaluation. In addition it uses NOWORKLOAD system statistics if system statistics have not been gathered explicitly
    - 10g checks the min and max values stored for columns in the data dictionary. If your predicates are way off compared to these values then 10g begins to adjust the calculated selectivity of the predicate which can again significantly affect your execution plans
    - 10g introduces the "Cost Based Query Transformation (CBQT)" feature which means that rather than applying heuristic transformation rules transformations are costed and potentially discarded whereas 9i applies transformations unconditionally whenever possible
    Check also the following note resp. white paper:
    http://optimizermagic.blogspot.com/2008/02/upgrading-from-oracle-database-9i-to.html
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Performance problems after Update from 7.6.00.37 to 7.6.03.15

    Hi,
    after the Update from 7.6.00.37 to 7.6.03.15 in our live system we noticed a lot of performance problems. We have tested the new version before on our test system, but there don't noticed effects like this.
    We have 2 identical systems (Opteron 64 bit, openSuse 10.2) with log shipping between them. We updated first the standby system, switched from online to standby (with copy of cold log) and started the new server as online system. After that we run a complete backup (runtime: 1 hour) for starting a new backup history and for activating autolog. Then
    With the update we changed USE_OPEN_DIRECT to YES, but the performance of the system was very slow afterwards. After the backup it remains at a high load average (> 10, previous system had about 2-4), with nearly 100% of CPU usage for the db kernel process.
    Next day we switched USE_OPEN_DIRECT back to NO. The system first runs better, but periodically rises up to a load average of 6 and slow down the performance of various applications (somebody says about 10 times slower). Here we also noticed a high usage (now 200-300%) of the db kernel process.
    Our questions are:
    1. Has something basically changed from 7.6.00.37 to 7.6.03.15, so that our various applications (JDBC, ODBC and Perl/SQLDBC partially on old linux systems with drivers from 7.5.00.23) don't reach same performance as before?
    2. Are there any other (new) parameters, which can help? Maybe reducing MAXCPU from 4 to 3 for reserving capacities for the system (there is only one maxdb instance running)?
    3. Is the a possibility to switch back to 7.6.00.37 (only for worst case)?
    I have made some first steps with x_cons, but don't see any anomalies on the first look.
    Regards,
    Thomas

    Thomas Schulz wrote:>
    > > > Next day we switched USE_OPEN_DIRECT back to NO. The system first runs better, but
    > >
    > > What is it about this parameter that lets you think it may be the cause for your problems?
    > After changing it back to NO, the system runs better (lower load average) than with YES (but much slower than with old version!)
    Hmm... that is really odd. When using USE_OPEN_DIRECT there is actually less work to do for he operating system.
    > > > Our questions are
    > > >
    > > > 1. Has something basically changed from 7.6.00.37 to 7.6.03.15, so that our various applications (JDBC, ODBC and Perl/SQLDBC partially on old linux systems with drivers from 7.5.00.23) don't reach same performance as before?
    > >
    > > Yes - of course. Changes are what Patches are all about!

    > Are there any known problems with updating from 7.6.00.37 to 7.6.03.15?
    Well of course there are bugs that have been found inbetween the release of both versions, but I am not aware of something like the performance killer.
    We will have to check this in detail here.
    > > > I have made some first steps with x_cons, but don't see any anomalies on the first look.
    > >
    > > Ok, looking into what the system does when it uses CPU is a first good step.
    > > But what would be "anomalies" to you?
    >
    > Good question! I don't really know.
    Well - then I guess 'looking at the system' won't bring you far...
    > > Do you use DBAnalyzer? If not -> activate it!
    > > Does it gives you any warnings?
    > > What about TIME_MEASUREMENT? Is it activated on the system? If not -> activate it!
    >
    > OK, that will be our next steps.
    Great - let's see the warnings you get.
    Let us also see the DB Parameters you set.
    > > What parameters have changed due  to the patch installations (check the parameter history file)?
    > >
    > > What queries take longer now? What is the execution plan of them?
    >
    > It seems to happen for all selects on tables with a lot of rows (>10.000, partially without indexes because automatically generated). With the old version we had no problems with missing indexes or the general performance. Unfortunatly it is very difficult to extract some sql statements out of the JBoss applications. But even simple queries (without any join) runs slower, when the load average rises over 4-5.
    Hmm... the question here is still, if the execution plans are good enough to meet your expectations.
    E.g. for tables that you access via the primary key it actually doesn't matter how many rows a table has (not for MaxDB at least).
    > > BTW: how exactly do the tests look like that you've done on the testsystem?
    > Usage over 6 weeks with our JDBC development environment (JBoss), backup and restore with various combinations of USE_OPEN_DIRECT and USE_OPEN_DIRECT_FOR_BACKUP.
    Sounds like the I/O is your most suspect aspect for overall system performance...
    > > Was the testsystem a 1:1 copy of the productive machine before the upgrade test?
    > No - smaller hardware (32 bit), only 20% of data of the live system, few db users and applications.
    >
    > > How did you test the system performance with multiple parallel users?
    > Only while permanent development with the 2-3 developers and some parallel tests of backup/restore. Unfortunately no tests with many users/applications.
    Ok - so this is next to no testing at all when it comes to performance.
    > An UPDATE STATISTICS over all db users seems to change nothing. At the moment the system remains markedly slow and we are searching for reasons and solutions. Another attempt will be the change of MAXCPU from 4 to 3.
    Why do you want to do that? Have you observed any threads that don't get a CPU because all 4 cores are used by the MaxDB kernel?
    regards,
    Lars

  • Perfomance problem after upgrade from 9.2.0.6 to 9.2.0.8

    Hi,
    we have upgrade our RDBMS from 9.2.0.6 to 9.2.0.8, all our batch jobs became slow (plus 3hours on normal execution time of our query).
    any suggestions.
    Regards.
    tt

    I bet you just upgraded without any modification on parameters and/or way of gathering statistics. :)
    I know it's very embrassing and frustrating that Oracle sometimes gets slow after just upgrade.
    But it's designed to be that. Not to get slower, but to get faster.
    Enhancement is the only purpose of upgrade, isn't it?
    But there is always a chance that you hit some negative side effects of that enhancement.
    For instance, optimizer gets equipped with new powerful query transformation algorithm.
    But in very rare cases, it causes some queries got slower.
    It has always been happening and l believe it will also happen with 11g. :(
    The unfortuante thing is that there can be amazingly many reasons why Oracle gets slower after upgrade.
    You need to search metalink for similiar issues and check statistics and execution plans as stated above.

  • Serious performance problems after updating from 10.5.6 to 10.5.7

    I've got a Macbook Pro C2D 15" (late 2006). After updating the system from 10.5.6 to 10.5.7 and quicktime to 7.6.2, I experience serious performance problems which I have never seen before:
    -From time to time, kernel_task has peaks in activity monitor (consumes a lot of CPU). In that moment, the mouse hangs for a short moment and audio playback is distorted/has drop outs.
    -Recording audio consumes a lot of CPU (independent of the audio application).
    -Video playback consumes a lot of CPU, regardless if I use VLC or the quicktime player.
    Any idea what could be done? Thanks in advance.

    After a few days of using CoolBook I report that my 1st generation MacBook Air is now reliable and never overheating, regardless of environment conditions.
    I must point out that I do believe that it really is something new in 10.5.7 that is causing this problem as my environmental conditions have not changed and even Summer in Dublin still sees temperatures no more than 72F/22C. I am now in Madrid, where the environment is quite different, and I am still having no problem with kernel_task spinning.
    I plan on reporting my problem to Apple anyway and being aggressive about the issue as MacLovinRanga did in this thread (http://discussions.apple.com/thread.jspa?messageID=9647353#9647353). Perhaps many/all of those of us having this problem will obtain new MacBook Airs.
    Joe Kiniry

  • 3D performance problems after upgrading memory

    I recently purchased an additional 2GB of memory to try and extend the life of my aging computer.  I installed the memory yesterday and Windows seems to recognize it (reporting now 3.3GB) but when I dropped into WoW (pretty much the only game I have) the 3D performance was down from the usual 60FPS @ 1600x1080 to a bleak 20 (at best) and the CPU utilization went to about 80% on both cores (with ~20% kernel usages).  Basically WoW was being software 3D rendered!!!
    I went through the usual reinstall drivers, reboot, etc... and couldn't find a fix.  I powered down, pulled out 2 of the memory sticks, booted up, and dropped into WoW - it ran at the full 60FPS and CPU utilization was very low (i.e. back to GPU Hardware 3D rendering).  I powered down again, swapped the 2 sticks for the other 2 sticks, booted up, and dropped into WoW - again it ran 100% fine.  So I powered down, put all four sticks in, booted back up, and when I dropped into WoW it was running in the software 3D rendering mode (20FPS at best and High CPU/Kernel usage).
    I've tried the /PAE option in boot.ini - no joy.  I've tried /MAXMEM = to 3300, 3072, 3000, and even 2048 - no joy in any of those cases.  Has anyone seen anything like this before?  Or have suggestions to fix (other than going to Win7-64)?
    All info in signature is up to date.
    Thanks in advance for any help!

    Quote
    Well his last post was a little over 6 hours ago so he was up pretty late.
    Looks like nothing one does in here goes completely unnoticed.   
    Anyway, I am done sleeping now.
    Quote
    his 2 Pfennig's worth.  I know, I know it's Euro's now.
    Yeah, and what used to be "Pfennige" is now also called "Cents" and here are mine:
    Quote
    I've tried the /PAE option in boot.ini - no joy.  I've tried /MAXMEM = to 3300, 3072, 3000, and even 2048 - no joy in any of those cases.  Has anyone seen anything like this before?  Or have suggestions to fix (other than going to Win7-64)?
    PAE or Physical Memory Extension will not do anything as Microsoft has castrated this feature to such an extend that it has nothing to do with memory addressing anymore when in comes to Windows XP:
    http://en.wikipedia.org/wiki/Physical_Address_Extension#Microsoft_Windows
    Quote
    Windows XP Service Pack 2 and later, by default, on processors with the no-execute (NX) or execute-disable (XD) feature, runs in PAE mode in order to allow NX. The NX (or XD) bit resides in bit 63 of the page table entry and, without PAE, page table entries only have 32 bits; therefore PAE mode is required if the NX feature is to be exploited. However, desktop versions of Windows (Windows XP, Windows Vista) limit physical address space to 4 GiB for driver compatibility reasons.
    The feature is already automatically enabled.  But since is original function (Address Extension) does no longer exist when it comes to the desktop versions of Windows XP, it won't really do anything you would ever notice.
    About the /MAXMEM Switch:  In Windows 32bit operating systems, every process is limited to 2GB of memory.  The point of the switch is to allow certain applications (or their run-time process) to occupy a higher amount of system memory than 2GB.  However, the culprit here is that only those applications are able to utilize this ability that have been programmed (or compiled) accordingly.  A special flag (large memory aware) has to be implemented.  Otherwise, these application will be restricted to 2GB even though the /MAXMEM Switch has been set to extend the 2GB limit to 3GB.  Most 32bit applications come without the "large memory aware" flag and that is why usually, settings the switch won't change anything.
    In any case, it is unlikely that /PAE (even if it would not be castrated) and /MAXMEM would have an impact on your actual issue because I doubt that it has much to do with either memory adressing or the memory limit of an indiviual Windows process.
    Quote
    the 3D performance was down from the usual 60FPS @ 1600x1080 to a bleak 20 (at best) and the CPU utilization went to about 80% on both cores (with ~20% kernel usages).
    There are a couple of hardware based explanations to consider here.  Let's start with the most obvious one:
    1. 975X Memory Controller
    The main reason that the system chooses to automatically set the Memory Speed to DDR2-667 even though DDR2-800 modules are installed, is that by design the memory controller of the Intel 975X Chipset does not natively support DDR2-800 modules, but
    >>Intel® 975X Express Chipset Datasheet - For the Intel® 82975X Memory Controller Hub (MCH)<< [Page 20]
    This means, that from the point of view of the memory controller, operating the memory @DDR2-800 actually means overclocking it (with all potential side effects).
    Basically, if your initial problem disappears as soon as you reduce the memory speed to DDR2-667, the design limitation of the memory controller may explain your findings.
    2. Different memory modules
    If I read your signature correctly, you are actually mixing two different kits/models of RAM (CM2X1024-6400C4DHX and  CM2X1024-6400C4).  This can work of course, but in practice it not necessarely does under all circumstances. 
    This list  (-> http://ramlist.i4memory.com/ddr2/) indicates that there are at least 14 different module types/revisions of Corsair DDR2-800 / CL4 modules that utilize a wide range of different memory chips (Elpida, ProMos, Micron, Infinion, Powerchip, Qimonda, Samsung, Infinion etc.).  Even though the superficial specifications for these chips appear to be pretty similar (DDR2-800 / CL5 / CL4), this does not necessarely mean that the modules will respond to the same operating conditions in the same way. There may be small difference in sub-timings/sub-latencies and/or the general responsiveness of the ICs which may affect the operating behaviour of the memory controller (which by the way also includes the PCI-Express interface which your video card is hooked up to).
    And again:  If running the system @DDR2-667 solves your issue, the possible explanation is that higher clock speeds may amplify (or trigger) potential performance problems that could have to do with the use of non-identical memory modules.
    Furthermore: It is also possible that the memory controller's design limitations and the potential compatibility problems that may be attributed to mixing different modules types may reinforce each other in terms of reduced system performance.
    3. The BIOS may have an impact as well
    There has been known issue with the use of certain video cards in conjunction with 4GB of system memory on this mainboard:
    https://forum-en.msi.com/index.php?topic=107301.0
    https://forum-en.msi.com/index.php?topic=105955.0
    https://forum-en.msi.com/index.php?topic=99818.msg798951#msg798951
    What may have come out as graphics/display corruption in earlier BIOS Releases may come out as reduced system performance when using the latest BIOS Release.  Of course, this is hard to prove, but I thought I'd mention it anyway.  May I ask what amount of video memory your card has onboard?
    Fortunately, there is a BIOS version that you could consider to try in this matter.  It is not only the last BIOS Release that could be used in order to avoid the corruption issue, but it is (in my oppionion) the best BIOS Version that was ever released for the 975X Platinum PUE Mainboard:  W7246IMS.716 [v7.1b6].  I have been using this mainboard for almost two years and have tested almost every BIOS Release that ever came out and I always went back to v7.1b6 as "ground zero". 
    It will properly support your E6600 (so you don't have to worry about that) and as far as I remember, there are no known compatibility issues with other components.  So maybe, you want to give this a shot.
    The bottom line is that in a worst case scenario, the problem you describe could be caused by all of the above things at the same time.  You cannot really do anything about the 975X Chipset Specifications and the only way to rule out explanation #2 is to test modules that are actually identical (same model number, revision and memory chips).  A test of the 7.1b6 BIOS Release is something you should consider.  It may be the only way to test the BIOS Hypothesis.
    This post turned out to be longer than I intended, but then again, I am well-rested after a good sleep and the wake-up coffee is kicking in pretty good.

Maybe you are looking for

  • How to Get the Print of General Ledger with Opening balances

    Hi Friends. How can I get the print out of G.Ledger with all line item transactions and opening balances in a company code? Please explain. Regards. Srini

  • Crystal Report 10 to Xi 3.1 - Migration

    Hi All, Is there any document or white paper available for Migration of CR 10 to Xi 3.1. I am looking for detail step by step document for the migration. Requesting to send the same . Thanks in advance. Regards, Sid

  • How can I deactivate when Acrobat Pro XI wont load?

    I installed a purchased upgrade of Acrobat Pro XI on this computer but all I now get is a screen headed 'Sign in Required' inviting me to register my trial version but providing no links to do so. Much of Acrobat XI Pro did not work.properly but Adob

  • Daily performace report

    hi friends, i working  on daily plant performance report kindly can anybody tell me which table should i use. with regards

  • How do i save as png?

    i can't save as png in photoshop cs6?