Subject Re: [firebird-support] Performance problem - input wanted
Author Svein Erling Tysvær
Not answering your question, just curious whether

          Insert into VareFrvStr_Detail ( VarePlu_ID, Farve_Navn, Laengde_Navn, Stoerrelse_Navn, V509Index, MinBeholdning, Genbestilling, NormalStkAntal, Valuta_Navn, 
                                          Provision, MomsSats, VejetKostPrisStk, SalgsPrisStk, EngrosPris, EnhedsNogle, OprettelsesDato, LeverID, VareGrpID, Afdeling_ID) 
          SELECT :PVarePlu_ID, :PFarve_Navn, :PLaengde_Navn, :PStoerrelse_Navn, :PV509Index, :PMinBeholdning, :PGenbestilling, :PNormalStkAntal, spe.STDVALUTA, 
                 :PProvision, spe.STDMOMS, :PVejetKostPrisStk, :PSalgsPrisStk, :PEngrosPris, :PEnhedsNogle, :POprettelsesDato, :PLeverID, :PVareGrpID, A.AFDELINGSNUMMER
          FROM AFDELING A
          INNER JOIN STAMDATA_PRG_EXT spe ON spe.AFDELING_ID = A.AFDELINGSNUMMER
          WHERE A.AFDELINGSNUMMER <> :PAFDELING_ID
            and not exists (select v509Index from VAREFRVSTR_DETAIL vd
                            where VarePlu_ID = :PVarePlu_ID and 
                                  Afdeling_ID = A.AFDELINGSNUMMER and
                                  Farve_Navn = :PFarve_Navn and
                                  Stoerrelse_Navn = :PStoerrelse_Navn and 
                                  Laengde_Navn = :PLaengde_Navn)

is identical and takes the same time. You may have to cast the parameters to appropriate type.

The select part of this insert may also help in discovering whether or not the same plan is used on the old and new server.

Set

2017-11-17 13:27 GMT+01:00 Рустам Муса-Ахунов rustam-m@... [firebird-support] <firebird-support@yahoogroups.com>:
Try to determine slowest query:

- "SELECT ...  FROM  AFDELING A  INNER JOIN STAMDATA_PRG_EXT ..."
or
- "select v509Index from VAREFRVSTR_DETAIL ..."
or
- "Insert into VareFrvStr_Detail ..."


Problem can be with indexes - check whether all indexes exists in new DB (after restore).
Also check your INSERT triggers on VAREFRVSTR_DETAIL (if any).


------------------------------ ------
Posted by: =?UTF-8?b? 0KDRg9GB0YLQsNC8INCc0YPRgdCwLd CQ0YXRg9C90L7Qsg==?=
        <rustam-m@...>
------------------------------ ------

++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++ ++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/ resources/documents/

++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++ ++++++
------------------------------ ------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    firebird-support-digest@ yahoogroups.com
    firebird-support-fullfeatured@ yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    firebird-support-unsubscribe@ yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/ us/yahoo/utos/terms/