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 Рустам Муса-Ахунов [email protected]
[firebird-support] <[email protected]>:
> 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?0KDRg9GB0YLQsNC8INCc0YPRgdCwLdCQ0YXRg9C90L7Qsg==?=
> <[email protected]>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> 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
>
>
>
>