Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

 

 

Speed up the database: Clustered Index

 

Databases are significantly accelerated when indexes to tables are properly built in and extended.

The fastest are clusted indexes, i.e. indexes in which several table fields are combined as primary key

 

Create a clustered index

 

When you create the new table or in Design View

Select both fields and then activate the [PrimaryKey ]

 

The automatically generated clustered index can be found under SQL Object Explorer->database->table->table->indexes

It is important that the field positions are completely listed as a key or index in combination.

this greatly speeds up all queries that are based on it

 

 

CREATE TABLE [dbo].[tblProdDates](

      [IDProd] [int] NOT NULL,

      [DateProd] [date] NOT NULL,

 

 CONSTRAINT [PK_tblProdDates] PRIMARY KEY CLUSTERED

(

      [IDProd] ASC,

      [DateProd] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]

)

ON [PRIMARY]

GO

 

 

 

Index-> keine Null Werte

Die Dateneingabe ist wie bei jeder Tabelle, mit der Ausnahme,

dass Null-Werte im Index nicht erlaubt sind


 

Mobile

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de