Database Fragmentation

The SQL Server Database Engine automatically modifies indexes whenever insert, update, or delete operations are made to the underlying data. Over time these modifications can cause the information in the index to become scattered in the database (fragmented). Fragmentation exists when indexes have pages in which the logical ordering, based on the key value, does... » read more

Index Rebuild vs Reorganize

The SQL Server Database Engine automatically modifies indexes whenever insert, update, or delete operations are made to the underlying data. Over time these modifications can cause the information in the index to become scattered in the database (fragmented). Fragmentation exists when indexes have pages in which the logical ordering, based on the key value, does... » read more

GETDATE() vs SYSDATETIME()

SYSDATETIME and SYSUTCDATETIME have more fractional seconds precision than GETDATE and GETUTCDATE.  Sources: https://docs.microsoft.com/en-us/sql/t-sql/functions/sysdatetime-transact-sql?view=sql-server-ver15

SQL Compare – Ignore Objects

SQL Compare Initial Setting Popup Window Crtl + E Options -> Ignore Ignore permissions Ignore system named constraint and index names Ignore SET QUOTED_IDENTIFIER and SET ANSI_NULLS statements Ignore users’ permissions and role memberships

Add Column with Collate

Sources: https://dba.stackexchange.com/questions/110911/latin1-general-bin-performance-impact-when-changing-the-database-default-collati

Setting Up Full Text Index

Make sure database is setup for full text index. 2. Create Catalog Database -> Storage -> Full Text Catalogs -> New Full-Text Catalog 3. Define Full-Text Index Database -> Table -> Full-Text Index -> Define Full-Text Index Note: Make sure the table has at least one unique index. 4. Populate Catalog Database -> Table ->... » read more

Populate Full Text Index

Sources: https://docs.microsoft.com/en-us/sql/relational-databases/search/create-and-manage-full-text-indexes?view=sql-server-ver15 https://docs.microsoft.com/en-us/sql/relational-databases/search/populate-full-text-indexes?view=sql-server-ver15 https://stackoverflow.com/questions/2727911/how-can-i-know-when-sql-full-text-index-population-is-finished

Create Indexes with Included Columns

By including nonkey columns, you can create nonclustered indexes that cover more queries. This is because the nonkey columns have the following benefits: They can be data types not allowed as index key columns. They are not considered by the Database Engine when calculating the number of index key columns or index key size. An... » read more