Note that there are some explanatory texts on larger screens.

plurals
  1. PODoes Sql Server Compress Database size on similar data
    primarykey
    data
    text
    <p>Just to find out my would be DB size on production environment, I just populated my tables with 1.5 million rows of nearly same data (Except Primary key). It currently shows 261 MB...</p> <p>Now, Whether I can rely on this, or since the Data is almost similar on all other columns the SQL server has compressed the size. ie. Will the size be different if the values in each rows are different...</p> <p>Further.. Does even columns will null values contribute to the size of the DB ?</p> <p>Thanks for your time...</p> <p>Edit : Here is my schema... And I have made some indexes too...</p> <pre><code> CREATE TABLE [dbo].[Trn_Tickets]( [ObjectID] [bigint] IDENTITY(1,1) NOT NULL, [TicketSeqNo] [bigint] NULL, [BookSeqNo] [bigint] NULL, [MatchID] [int] NULL, [TicketNumber] [varchar](20) NULL, [BarCodeNumber] [varchar](20) NULL, [GateNo] [varchar](5) NULL, [EntryFrom] [varchar](10) NULL, [MRP] [decimal](9, 2) NULL, [Commission] [decimal](9, 2) NULL, [Discount] [decimal](9, 2) NULL, [CashPrice] [decimal](9, 2) NULL, [CashReceived] [decimal](9, 2) NULL, [BalanceDue] [decimal](9, 2) NULL, [CollectibleFrom] [char](1) NULL, [PlaceOfIssue] [varchar](20) NULL, [DateOfIssue] [datetime] NULL, [PlaceOfSale] [varchar](20) NULL, [AgentID] [int] NULL, [BuyerID] [int] NULL, [SaleTypeID] [tinyint] NULL, [SaleDate] [smalldatetime] NULL, [ApprovedBy] [varchar](15) NULL, [ApprovedDate] [smalldatetime] NULL, [InvoiceStatus] [char](1) NULL, [InvoiceRefNo] [varchar](15) NULL, [InvoiceDate] [smalldatetime] NULL, [BookPosition] [char](2) NULL, [TicketStatus] [char](2) NULL, [RecordStatus] [char](1) NULL, [ClosingStatus] [char](2) NULL, [ClosingDate] [datetime] NULL, [UpdatedDate] [datetime] NULL, [UpdatedUser] [varchar](10) NULL, CONSTRAINT [PK_Trn_Tickets] PRIMARY KEY CLUSTERED ( [ObjectID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] </code></pre> <p>Hope this helps</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload