Hi Friends,

A light blog for the weekend ! Many of you know that statistics get created automatically provided AUTO_CREATE_STATISTICS is turned on. But have you observed the names of these statistics object that get created automatically? They seem so weird? Names like _WA_Sys_00000003_1EF99443. Are they really weird?

What does 00000003 mean? What does 1EF99443 mean?

Let’s take a simple example:

Create a new table from an existing table.

If you run the following code, you will observe that there is no statistics for this new table.

Now, let us extract data from this table with a  filter.

And run the stats code again to observe that a new statistics object has been created on EmailAddres column:

1_SQL_Server_Statistics_object_name _WA_Sys_00000003_1EF99443_Let_us_decode

So what is the logic behind _WA_Sys_00000003_1FEDB87C?

Here it is:

00000003 is the column id of the column on which this statistics is based on. Let us verify with sys.columns.

2_SQL_Server_Statistics_object_name _WA_Sys_00000003_1EF99443_Let_us_decode

And 1FEDB87C is the hexadecimal value of the object id. The object id as you can see in the above image is 535672956. The hex of 535672956 is 1FEDB87C. You can verify that using any calculator :)

Sys stands for system, I guess.

So, what does WA stand for? :) Comments welcome…