Hei Vi tok en eksport av alle ikke-standard indekser og la tilbake så jeg tror ikke det er det, skal likevel ta en kikk på det scriptet. Utfordringen med bilagsregistrering har iallfall ikke med indekser å gjøre. Her er en SQL-logg som viser hvordan antall oppslag for å finne bilagsart øker for hver linje som limes inn: [2022.04.06 18:29:38:672] Start log at 06.04.2022 18:29 [2022.04.06 18:29:38:672] Visma Business version 16.10.1 [2022.04.06 18:29:39:922] Left mouse button: Move field pointer [2022.04.06 18:29:40:781] Execute the Paste command [2022.04.06 18:29:40:781] Paste clipboard row item 1 of 661 [2022.04.06 18:29:40:797] A: SELECT * FROM Mst WHERE PK = 12 /*778*/ [0.000] [2022.04.06 18:29:40:797] [Status message] Ugyldig valuteringsdato 28.02.2022. Sjekk sperredatoen og tabellene med regnskapsperioder og avgiftsterminer. [2022.04.06 18:29:40:797] [Status message] Bilagsart 89: Svinnføringer [2022.04.06 18:29:40:813] [Status message] Hovedbokskonto 4601: Svinn L15 - VL [2022.04.06 18:29:40:813] [Status message] Hovedbokskonto 1464: Aktivert svinn - BIL [2022.04.06 18:29:40:813] Execute the Voucher table's ExpandAutomaticEntries processing [2022.04.06 18:29:40:891] Process row item 1 of 1 (primary key 28652, 2) [2022.04.06 18:29:40:891] [Status message] Bilag 28652, 2 [2022.04.06 18:29:40:891] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:40:906] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:40:906] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:40:906] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:40:922] [Status message] *Produkt (R12) 18700: Diesel Farget [2022.04.06 18:29:40:922] [Status message] *Stasjon 10400053: YX Øberg (automat) [2022.04.06 18:29:40:922] B: SELECT * FROM R2 WHERE RNo = 40 AND NOT (ChPrc = 33516 AND LckSt = 3) AND NOT (ChPrc <> 33516 AND LckSt = 1) /*2317*/ [0.000] [2022.04.06 18:29:40:922] [Status message] *Øvelse 40: YX Truckkort [2022.04.06 18:29:40:938] Paste clipboard row item 2 of 661 [2022.04.06 18:29:40:938] A: SELECT * FROM Mst WHERE PK = 12 /*778*/ [0.000] [2022.04.06 18:29:40:953] [Status message] Ugyldig valuteringsdato 28.02.2022. Sjekk sperredatoen og tabellene med regnskapsperioder og avgiftsterminer. [2022.04.06 18:29:40:953] [Status message] Bilagsart 89: Svinnføringer [2022.04.06 18:29:40:953] [Status message] Hovedbokskonto 4601: Svinn L15 - VL [2022.04.06 18:29:40:953] [Status message] Hovedbokskonto 1464: Aktivert svinn - BIL [2022.04.06 18:29:40:953] Execute the Voucher table's ExpandAutomaticEntries processing [2022.04.06 18:29:40:985] Process row item 1 of 1 (primary key 28652, 3) [2022.04.06 18:29:40:985] [Status message] Bilag 28652, 3 [2022.04.06 18:29:40:985] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:40:985] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:000] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:000] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:016] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:016] [Status message] *Produkt (R12) 18700: Diesel Farget [2022.04.06 18:29:41:016] [Status message] *Stasjon 10400053: YX Øberg (automat) [2022.04.06 18:29:41:016] B: SELECT * FROM R2 WHERE RNo = 41 AND NOT (ChPrc = 33516 AND LckSt = 3) AND NOT (ChPrc <> 33516 AND LckSt = 1) /*2317*/ [0.000] [2022.04.06 18:29:41:031] [Status message] *Øvelse 41: YX Firmakort [2022.04.06 18:29:41:031] Paste clipboard row item 3 of 661 [2022.04.06 18:29:41:047] A: SELECT * FROM Mst WHERE PK = 12 /*778*/ [0.000] [2022.04.06 18:29:41:047] [Status message] Ugyldig valuteringsdato 28.02.2022. Sjekk sperredatoen og tabellene med regnskapsperioder og avgiftsterminer. [2022.04.06 18:29:41:047] [Status message] Bilagsart 89: Svinnføringer [2022.04.06 18:29:41:063] [Status message] Hovedbokskonto 4601: Svinn L15 - VL [2022.04.06 18:29:41:063] [Status message] Hovedbokskonto 1464: Aktivert svinn - BIL [2022.04.06 18:29:41:063] Execute the Voucher table's ExpandAutomaticEntries processing [2022.04.06 18:29:41:078] Process row item 1 of 1 (primary key 28652, 4) [2022.04.06 18:29:41:094] [Status message] Bilag 28652, 4 [2022.04.06 18:29:41:094] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:094] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:110] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:110] [Status message] *Produkt (R12) 18700: Diesel Farget [2022.04.06 18:29:41:110] B: SELECT * FROM R10 WHERE RNo = '10400054' AND NOT (ChPrc = 33516 AND LckSt = 3) AND NOT (ChPrc <> 33516 AND LckSt = 1) /*2317*/ [0.000] [2022.04.06 18:29:41:125] [Status message] *Stasjon 10400054: YX Solgård [2022.04.06 18:29:41:125] [Status message] *Øvelse 20: Betjent / Privat [2022.04.06 18:29:41:125] Paste clipboard row item 4 of 661 [2022.04.06 18:29:41:141] A: SELECT * FROM Mst WHERE PK = 12 /*778*/ [0.000] [2022.04.06 18:29:41:141] [Status message] Ugyldig valuteringsdato 28.02.2022. Sjekk sperredatoen og tabellene med regnskapsperioder og avgiftsterminer. [2022.04.06 18:29:41:141] [Status message] Bilagsart 89: Svinnføringer [2022.04.06 18:29:41:156] [Status message] Hovedbokskonto 4601: Svinn L15 - VL [2022.04.06 18:29:41:156] [Status message] Hovedbokskonto 1464: Aktivert svinn - BIL [2022.04.06 18:29:41:156] Execute the Voucher table's ExpandAutomaticEntries processing [2022.04.06 18:29:41:188] Process row item 1 of 1 (primary key 28652, 5) [2022.04.06 18:29:41:188] [Status message] Bilag 28652, 5 [2022.04.06 18:29:41:188] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:188] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:203] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:203] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:219] [Status message] *Produkt (R12) 18700: Diesel Farget [2022.04.06 18:29:41:219] [Status message] *Stasjon 10400054: YX Solgård [2022.04.06 18:29:41:219] [Status message] *Øvelse 41: YX Firmakort [2022.04.06 18:29:41:219] Paste clipboard row item 5 of 661 [2022.04.06 18:29:41:235] A: SELECT * FROM Mst WHERE PK = 12 /*778*/ [0.000] [2022.04.06 18:29:41:235] [Status message] Ugyldig valuteringsdato 28.02.2022. Sjekk sperredatoen og tabellene med regnskapsperioder og avgiftsterminer. [2022.04.06 18:29:41:250] [Status message] Bilagsart 89: Svinnføringer [2022.04.06 18:29:41:250] [Status message] Hovedbokskonto 4601: Svinn L15 - VL [2022.04.06 18:29:41:250] [Status message] Hovedbokskonto 1464: Aktivert svinn - BIL [2022.04.06 18:29:41:266] Execute the Voucher table's ExpandAutomaticEntries processing [2022.04.06 18:29:41:281] Process row item 1 of 1 (primary key 28652, 6) [2022.04.06 18:29:41:281] [Status message] Bilag 28652, 6 [2022.04.06 18:29:41:281] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:297] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:297] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:313] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:313] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:313] [Status message] *Produkt (R12) 18700: Diesel Farget [2022.04.06 18:29:41:328] B: SELECT * FROM R10 WHERE RNo = '10400058' AND NOT (ChPrc = 33516 AND LckSt = 3) AND NOT (ChPrc <> 33516 AND LckSt = 1) /*2317*/ [0.000] [2022.04.06 18:29:41:328] [Status message] *Stasjon 10400058: YX Borge [2022.04.06 18:29:41:328] [Status message] *Øvelse 20: Betjent / Privat [2022.04.06 18:29:41:328] Paste clipboard row item 6 of 661 [2022.04.06 18:29:41:344] A: SELECT * FROM Mst WHERE PK = 12 /*778*/ [0.000] [2022.04.06 18:29:41:360] [Status message] Ugyldig valuteringsdato 28.02.2022. Sjekk sperredatoen og tabellene med regnskapsperioder og avgiftsterminer. [2022.04.06 18:29:41:360] [Status message] Bilagsart 89: Svinnføringer [2022.04.06 18:29:41:360] [Status message] Hovedbokskonto 4601: Svinn L15 - VL [2022.04.06 18:29:41:360] [Status message] Hovedbokskonto 1464: Aktivert svinn - BIL [2022.04.06 18:29:41:375] Execute the Voucher table's ExpandAutomaticEntries processing [2022.04.06 18:29:41:391] Process row item 1 of 1 (primary key 28652, 7) [2022.04.06 18:29:41:391] [Status message] Bilag 28652, 7 [2022.04.06 18:29:41:406] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:406] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:422] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.001] [2022.04.06 18:29:41:422] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:438] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.006] [2022.04.06 18:29:41:438] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:455] [Status message] *Produkt (R12) 18700: Diesel Farget [2022.04.06 18:29:41:455] [Status message] *Stasjon 10400058: YX Borge [2022.04.06 18:29:41:455] [Status message] *Øvelse 41: YX Firmakort [2022.04.06 18:29:41:469] Paste clipboard row item 7 of 661 [2022.04.06 18:29:41:469] A: SELECT * FROM Mst WHERE PK = 12 /*778*/ [0.000] [2022.04.06 18:29:41:485] [Status message] Ugyldig valuteringsdato 28.02.2022. Sjekk sperredatoen og tabellene med regnskapsperioder og avgiftsterminer. [2022.04.06 18:29:41:485] [Status message] Bilagsart 89: Svinnføringer [2022.04.06 18:29:41:485] [Status message] Hovedbokskonto 4601: Svinn L15 - VL [2022.04.06 18:29:41:500] [Status message] Hovedbokskonto 1464: Aktivert svinn - BIL [2022.04.06 18:29:41:500] Execute the Voucher table's ExpandAutomaticEntries processing [2022.04.06 18:29:41:516] Process row item 1 of 1 (primary key 28652, 😎 [2022.04.06 18:29:41:532] [Status message] Bilag 28652, 8 [2022.04.06 18:29:41:532] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:532] A: SELECT * FROM Aut ORDER BY Srt ASC /*66*/ [0.000] [2022.04.06 18:29:41:547] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:547] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:563] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:563] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:578] A: SELECT * FROM VoTp WHERE VoTpNo = 89 /*3023*/ [0.000] [2022.04.06 18:29:41:578] [Status message] *Produkt (R12) 18700: Diesel Farget [2022.04.06 18:29:41:578] [Status message] *Stasjon 10400058: YX Borge [2022.04.06 18:29:41:594] [Status message] *Øvelse 40: YX Truckkort Hvis man da har et bilag på 1.000 linjer så blir det nesten en halv million unødvendige oppslag på SQL-serveren og VB behandler nok svarene også.
... View more