Sql server performance and field order

Does the order of creating fields in the table fulfill the effect of executing commands in the table? If so, can anyone discuss this?

For example, I created a table like this

create table Software(int id,alpha datetime,beta datetime,title nvarchar(100),stable datetime,description nvarchar(200) ) 

if i change it to

 create table Software(int id,alpha datetime,beta datetime,stable datetime,description nvarchar(200),title nvarchar(100) ) 

Is there a performance effect?

Is this clear?

+6
source share
3 answers

The order of the fields does not matter (if the fields always match, of course)

The structure on the disk will remain almost the same. Simply:

  • heading
  • fixed length columns
  • null bitmap
  • variable length columns

All you do above is swap some of the columns in the "fixed length" and "variable length" sections. However, to obtain them, the same processing is required, regardless of the order in which they are located.

See Paul Randall Article

+4
source

Not. This will not affect performance.

+3
source

Field operations can have very little impact on productivity and how often maintenance operations should be performed. In a great scheme of things, it would be much better to use your time for:

  • Build / Test Indices
  • Restructuring Requests
  • Partition Tables (Horizontal and Vertical)
  • Change filegroup architecture

This is not an exhaustive list.

You did not mention if you already configured any of these things and still need to squeeze the extra milliseconds from the process.

-2
source

Source: https://habr.com/ru/post/886995/


All Articles