Posts

Showing posts with the label BTREE_INSERT_FLOW_DISPATCHER

SQL Server, Using the OPTIMIZE FOR SEQUENTIAL KEY Clause to reduce the last page insert latch contention

Image
Welcome back guys! With today we conclude this series of post related to the last page insert contention issue speaking of a new feature introduced with SQL Server 2019. This new feature is called OPTIMIZE_FOR_SEQUENTIAL_KEY and it is intended to reduce the latch contention. It is actually a clause that you can specify when creating an index . First we will see how it works then we will do some tests Are you ready? Go! The OPTIMIZE_FOR_SEQUENTIAL_KEY feature   In order to use this feature you need to add the OPTIMIZE FOR SEQUENTIAL KEY = ON to the definition of the index: CREATE CLUSTERED INDEX [IDX_ARTICO_CLUSTERED_ID] ON [dbo].[ARTICO] ( [ID] ASC ) WITH ( PAD_INDEX = OFF , STATISTICS_NORECOMPUTE = OFF , SORT_IN_TEMPDB = OFF , DROP_EXISTING = OFF , ONLINE = OFF , ALLOW_ROW_LOCKS = ON , ALLOW_PAGE_LOCKS = ON , OPTIMIZE_FOR_SEQUENTIAL_KEY = ON ) ON [PRIMARY] Just remember to set the compatibility level to 15, which is the native SQL Server 2019 level. The magic behind the movie...

The last page insert latch contention issue e la clausola OPTIMIZE FOR SEQUENTIAL KEY di SQL Server 2019 RC1 (parte 3)

Image
Carissimi lettori, Eccoci nuovamente qui per un articolo particolamente intenso. Con oggi terminiamo questa serie di articoli legati alla problematica detta last page insert contention issue allacciandoci ad un altro arogmento che vi prometto sarà ugualmente se non più interessante. Come saprete già, è uscita da pochi giorni la versione Release Candidate 1 di SQL Server 2019 . E' stata anticipata da ben 8 Common Technology Preview (CTP) che ci hanno mostrato un assaggio delle nuove feature che la nuova versione ci porterà. Iniziamo quindi ad analizzare le novità che ci porterà SQL Server 2019. Una di esse è proprio dedicata alla riduzione del fenomeno che stiamo analizzando in questa ultima serie di articoli.   Questa nuova feature è detta OPTIMIZE FOR SEQUENTIAL KEY ed è in realtà una clausola che è possibile specificare durante la creazione di un indice .   Proviamola!   OPTIMIZE FOR SEQUENTIAL KEY Feature  Impost...