SQL Server parse and compile time:
CPU time = 31 ms, elapsed time = 546 ms.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 0 ms.
(0 row(s) affected)
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'PERSON'. Scan count 0, logical reads 819522, physical reads 7774, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'ANTRAG'. Scan count 10, logical reads 410004, physical reads 12625, read-ahead reads 214, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'CATALOGS'. Scan count 1, logical reads 2, physical reads 2, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'KONTAKT'. Scan count 0, logical reads 2, physical reads 2, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Server Execution Times:
CPU time = 8141 ms, elapsed time = 207828 ms.
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time = 0 ms.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 0 ms.
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time = 0 ms.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 0 ms.
(0 row(s) affected)
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'PERSON'. Scan count 0, logical reads 819522, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'ANTRAG'. Scan count 10, logical reads 410004, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'CATALOGS'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'KONTAKT'. Scan count 0, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Server Execution Times:
CPU time = 2500 ms, elapsed time = 2500 ms.
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time = 0 ms.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 0 ms.
|
Kannst Du uns die Abfrage posten?
– Marvin Steppat 14.02.2011
|
|
EXEC sp_updatestats
|
Das sollte automatisch passieren es sei den jemand war so intelligent und hat dies ausgestellt.
– Floyd 14.02.2011
|
||
Jedenfalls nicht wissentlich, aber ich denke man muss das schon explizit abstellen und die SQLExpress installationen auf den NBs sind ganz normale installationen ohne irgendwelche großen Einstellungen
– chris.net 14.02.2011
|
||
Wenn Du uns die Abfrage schickst, sieht man vielleicht, warum so schlechte Schätzungen vom Optimizer produziert wurden. Vielleicht sind die where-Bedinungen für den nicht durchschaubar.
– Marvin Steppat 14.02.2011
|
||
Jo... Was verbirgt sich denn hinter der Prozedur "ACM.udf_Antragsvertraege(a.RecordID)"?
– Marvin Steppat 14.02.2011
|
||
Nichts, das Weglassen dieses Funktionsaufrufes führt zu keiner Veränderung im Abfrageverhalten oder anders gesagt, das ist nicht der Bösewicht ;)
– chris.net 14.02.2011
|
||
Marvin wird schon richtig liegen. Die Statistiken sollten das Problem sein. Das würde auch begründen warum der geschätzte Ausführungsplan nicht mal ansatzweise mit dem Ergebnis der IO Statistiken übereinstimmt.
– Floyd 14.02.2011
|
||
Nun ich werd Mittwoch wieder an zu mindest eines der Notebooks kommen, auf denen die Probleme aufgetreten sind, ich werde dann dort einmal das sp_updatestats ausführen.
– chris.net 14.02.2011
|
||
Wenn es Mittwoch immer noch nicht klappt, dann tweete ich diese Frage. Das Problem muss doch zu knacken sein ;-)
– Marvin Steppat 14.02.2011
|
||
Wenns Mittwoch immer noch nicht klappt, dann schick mir den Laptop .. du bekommst dann das Ergebnis und ich höker selbigen dann bei eBay (gegen eine Zahl von 500 € auch mit formatierter Festplatte). :P
– Floyd 14.02.2011
|
||
Hmm wird wohl nichts mit neuem Laptop, es geht inzwischen :) Das Problem ist wohl das durch die Merge Replikation die index stats durch einander kommen, sobald ich updatestats ausgeführt hatte waren die Abfragen wieder schön schnell. Jedoch muss ich updatestats nach jedem abgleich der daten mit der zentrale erneut ausführen, da jeder merge abgleich die index stats wieder leicht durcheinander zu bringen scheint.
Danke nochmal an alle für euere Hilfe ;) – chris.net 16.02.2011
|
|
1 |
Also am Ausführungsplan liegt es nicht wobei ich jetzt natürlich nicht die ToolTips sehe :D. Jedenfalls sieht der gut soweit aus. Bei 0.16M Datensätzen wirst du etwa 250-300 MB Arbeitsspeicher brauchen. Mach mal folgendes. Klick mal in dein Query-Fenster mit der Rechten Maustaste rein und stell unter "Query Options"->"Execution"->"Advanced" die Optionen "SET STATISTICS TIME" und "SET STATISTICS IO" an. Starte deine SQL-Server neu und führ das Query erneut aus. Jetzt erscheint im "Meldungs"-Fenster die Ausgabe wie lange er für welche Aktion gebraucht hat.
– Floyd 11.02.2011
|
|
1 |
Damit ist gemeint: Compile-Time, IO-Zugriff und benötigte Zeit, Execution-Time.
Zweite Frage. Tritt das Problem NUR beim nach einem Neustart des SQL-Servers auf bzw. wenn du ihn eine weile nicht benutzt hast (Stichwort Auslagerung). Wenn ich das richtig verstanden habe ist in der Konfiguration der Arbeitsspeicher und die Festplatte hier das Limitierende Kriterium. – Floyd 11.02.2011
|
|
1 |
Okey das Defragmentieren hat wirklich viel gebracht, danke dafür! Die Abfragezeit ist nun von 4min auf 2min runter, aber 2min sind immer noch zu lange, da der Timeout bereits nach 30sek im Programm auftritt.
Ich hab hier den Ausführungsplan als XML, jetzt ma ne blöde Frage: Wie schicke ich den dir hier? ;) – chris.net 11.02.2011
|
|
Sehr gut. Da ist das schon mal deutliche Verbesserung.
Lad ihn doch als Rar oder Zip Archiv bei http://www.file-upload.net/ hoch und poste hier den Link und das Archiv-Passwort. – Floyd 11.02.2011
|
||
Danke (hier fehlt noch eine kleine Datei Upload Funktion...)
http://www.file-upload.net/download-3205779/Execution-plan.rar.html PW: codekicker – chris.net 11.02.2011
|
||
Problem, das ist nur der "geschätze Ausführungsplan". Ich brauch aber den echte ;)
– Floyd 11.02.2011
|
||
Noch ne alterantiv kannst du auch den CommandTimeout in deinem Programm auf 2 Minuten setzten. Ich weiß leider nicht welche Programmiersprache du verwendest.
– Floyd 11.02.2011
|
||
ich nutze c#, aber das ist ja nicht was ich meinem benutzer antun kann, das der dann 2min warten muss. Ich kann die den 'echten' Ausführungsplan erst Montag geben, ich hab schon Feierabend ;) Aber vielen lieben Dank ersmtal bis hier hin, ich melde mich dann Montag
– chris.net 11.02.2011
|
Edit Floyd: In Hauptbeitrag verschoben da diese Information der Konkretisierung der Frage / des Problem nützlich sind.
|
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 0 ms.
SQL Server parse and compile time:
CPU time = 63 ms, elapsed time = 812 ms.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 0 ms.
(0 row(s) affected)
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'ANTRAG'. Scan count 1, logical reads 3, physical reads 3, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'PERSON'. Scan count 1, logical reads 6, physical reads 6, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'KONTAKT'. Scan count 0, logical reads 2, physical reads 2, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
(1 row(s) affected)
SQL Server Execution Times:
CPU time = 15 ms, elapsed time = 625 ms.
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time = 0 ms.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 0 ms.
|
Sehr gute Frage. Ich würde vermuten des die Index nicht falsch, sondern nur fragementiert waren (das hat nichts mit der Dateifragementierung zu tun). Richtig testen könnte man das nur wenn du das alte Notebook nochmal in die Finger bekommst und ein Index-Rebuild anwirfst.
– Floyd 14.02.2011
|