db-Berater GmbH
  • Home
  • Services
  • Workshops 
  • Referenzen
  • Blog
  • Download
  • Kontakt
Seite wählen

Zusammenhang zwischen dynamischem SQL und veralteten Statistiken

von Uwe Ricken | Jan. 31, 2016 | 300, Indexierung, Optimierung, Tipps und Tricks

In einem aktuellen Projekt bin ich auf eine Technik gestoßen, die – LEIDER – noch viel zu häufig von Programmierern im Umfeld von Microsoft SQL Server angewendet wird; Konkatenation von Texten zu vollständigen SQL-Befehlen und deren Ausführung mittels EXEC(). Dieser...

Auswirkung von vollständig qualifizierten Objekten auf den Plancache von SQL Server

von Uwe Ricken | Aug. 2, 2015 | 300, DB Engine, Indexierung, Optimierung, SQL Blog, Tipps und Tricks

Bei der täglichen Arbeit mit Microsoft SQL Server in mittelständischen und großen Unternehmen kommt es immer wieder mal vor, dass Programmcodes in die Testsysteme und Produktionssysteme implementiert werden mussten. Beim durchgeführten Code Review stößt man immer...

GUID vs INT/IDENTITY als Clustered Key

von Uwe Ricken | Apr. 4, 2015 | 300, DB Engine, Indexierung, Optimierung, SQL Blog, Tipps und Tricks

Immer wieder hört oder liest man, dass ein Clustered Index möglichst fortlaufend/aufsteigend organisiert sein soll. Am besten sei immer ein Clustered Index mit möglichst kleinen Datentypen (z. B. INT); außerdem sollte ein Clustered Index nach Möglichkeit nicht aus...

Clustered Key – variable oder feste Länge

von Uwe Ricken | Jan. 9, 2015 | 300, Indexierung, Optimierung, Tipps und Tricks

In LinkedIn wurde eine interessante Frage diskutiert, die in ihrem Ursprung zwar nicht unmittelbar mit dem Titel dieses Artikels zusammenhängt, mich aber auf Grund der abgebildeten Datenstruktur zu der Fragestellung dieses Artikels anregte. Dieser Artikel beschreibt,...

Kombinierte Indexe richtig definieren

von Uwe Ricken | Dez. 28, 2014 | 300, Indexierung, Optimierung, SQL Blog

Ganz aktuell habe ich bei einem Kunden ein Problem in einer Abfrage entdeckt, die trotz “korrektem” Index nicht optimal ausgeführt wird. Das Problem war relativ schnell gefunden; die Reihenfolge der Attribute im Index waren nicht korrekt implementiert. Der Artikel...

Eine wohl überlegte Datenstruktur entscheidet

von Uwe Ricken | Nov. 10, 2012 | 300, DB Engine, Indexierung, Optimierung, SQL Blog

Mit dem nachfolgenden Artikel möchte ich aus dem „Daily Business“ berichten, in dem ich gebeten wurde, die Performance von Abfragen zu optimieren. Als Beispiel soll die folgende Datenstruktur (inklusive Indexes) verwendet werden. Zur Optimierung habe ich...
Nächste Einträge »

db SQL Blog

  • Forced Parameterization and its Impact on Interleaved Execution
    SQL Server plan cache showing four entries under Forced Parameterization: one compiled plan for the MSTVF demo.get_c_custkey_list_by_nation (objtype = Proc, usecounts = 2), two separate Adhoc entries for the original queries containing the literals 'AUSTRIA' and 'PORTUGAL' (usecounts = 1 each), and one Prepared plan for the automatically parameterized query (usecounts = 2).
  • Why I Don’t Use Query Hints Before Understanding What the Optimizer Is Doing
    Extended Events session capturing the lifecycle of Interleaved Execution for a Multi-Statement Table-Valued Function (MSTVF). The trace starts with a recompilation event (recompilation_for_interleaved_exec), followed by statement execution events. Three interleaved_exec_status events document the progression through the Interleaved Execution framework: status 0 indicates eligibility detection, status 1 indicates that SQL Server executes the MSTVF during optimization to obtain actual cardinality information, and status 2 indicates that optimization resumes using the observed row count. The event sequence confirms that SQL Server pauses optimization, executes the MSTVF, and recompiles the query using the actual cardinality returned by the function.
  • Table Variable Deferred Compilation Disabled! So Why Does SQL Server Still Recompile?
  • Interleaved Execution: The Cure for MSTVFs That Never Cured Parameter Sniffing
    Extended Events output showing the compilation, execution, and recompilation phases of SQL Server Interleaved Execution for a Multi-Statement Table-Valued Function
  • MSTVFs: Better Estimates, Same Fundamental Problem
    Execution plan demonstrating Interleaved Execution for a Multi-Statement TVF with accurate cardinality estimation of 3,776 rows.
  • Update Statistics from Replicated Database
    Infrastructure of automated stats update from a subscriber to a publisher
  • SQL Server Forced Parameterization: When It Improves Performance and When It Doesn’t
  • Nonfoldable User Defined Functions
  • CTE vs temp table performance in SQL Server. Hidden costs and real workload impact!
  • Partition a big table with zero downtime
    Data Flow Between Application, Orders View, and Backend Tables
  • WHERE 1 = 1 – good practice?
  • Table Hint UPDLOCK and LOCK ESCALATION
  • Auto Update Statistics and Trivial Execution Plans
    Execution process of trivial plans with simple parameterization
  • When „Auto Update Statistics“ will not update your statistics
  • Is SWITCH PARTITION a bad idea?
  • Datenschutzerklärung
  • Impressum
  • Sitemap
  • Download
  • RSS

db Berater GmbH | | Büchenweg 4 | 64390 Erzhausen | Phone: +49 (0) 6150 5082955 | E-Mail: info@db-berater.de Amtgericht Darmstadt: HRB86305 |    Umsetzung