title: What happens when you use page compression on a primary key in SQL Server?
body: <p>Given that the primary key index is how the table is physically laid out, what effect if any is there by putting a WITH DATA_COMPRESSION on it?</p>
  
  <pre><code>CREATE TABLE [Search].[Property]
      (
       [PropertyId] [BIGINT]
          NOT NULL
          CONSTRAINT PK_Property PRIMARY KEY WITH (DATA_COMPRESSION = PAGE),
       [Parcel] [GEOMETRY] NULL
                           CHECK ([Parcel] IS NULL
                                  OR ([Parcel].STSrid = 3857
                                      AND [Parcel].STIsValid() = 1
                                     )),
       [StreetNumber] [VARCHAR](20) NULL,
       [StreetDir] [VARCHAR](2) NULL,
       [StreetName] [VARCHAR](50) NULL,
       [StreetType] [VARCHAR](4) NULL,
       [StreetPostDir] [VARCHAR](2) NULL
      )
      WITH (
           DATA_COMPRESSION = PAGE); 
  
  GO
  </code></pre>