SQL Script to find the missing indexes
Performance tuning in SQL is important exercise and index creation is an important part of it. Below script will help in finding the...
2015-01-25
16,259 reads
Performance tuning in SQL is important exercise and index creation is an important part of it. Below script will help in finding the...
2015-01-25
16,259 reads
In relational database, we store data in tabular form where data is divided into columns. Each column has a name...
2015-01-25
861 reads
Convert () function in SQL Server to convert an expression from one data type to another data type
Syntax for CONVERT function
CONVERT ( data_type [ ( length ) ] , expression...
2015-01-24
1,879 reads
One of the important task of any DBA is to find out all the jobs which are failed yesterday. Below...
2015-01-20
2,470 reads
Sometimes we need to find out how many stored procedures contains a given text. Below SQL query can be used...
2015-01-20
676 reads
Below is the SQL query which can be used to find out the tables which are created or modified on...
2015-01-20
660 reads
Sometimes we need to find out the size of the database on a server. Below SQL Scripts can be used...
2015-01-20
609 reads
Below query can be used to see the growth size of database files.
DECLARE @filename NVARCHAR(1000);
DECLARE @bc INT;
DECLARE @ec INT;
DECLARE @bfn...
2015-01-09
1,548 reads
Sometimes we need to check which tables of our database is highly populated. Below is the T-SQL Script which we...
2015-01-09
1,406 reads
Sometimes we needs to find out the last executed commands on the database server.
Below is the SQL script share by...
2015-01-08
1,970 reads
By Steve Jones
Thanks to everyone that attended my sessions at VS Live San Diego yesterday. It...
By Steve Jones
I was creating a question on sp_readerrorlog and realized that this procedure is different...
By SQLPals
Why sys.fn_dblog Is Undocumented And Why It's Still There Why sys.fn_dblog...
Comments posted to this topic are about the item Implementing Type 4 Slowly Changing...
Comments posted to this topic are about the item The Disabled Index
Comments posted to this topic are about the item Server-Level Table sizes
I run this code on SQL Server 2022.
CREATE TABLE Drink
(
drinkid INT NOT NULL
CONSTRAINT DrinkPK PRIMARY KEY CLUSTERED,
drinkname VARCHAR(20),
rating NUMERIC(2, 1)
)
GO
INSERT INTO Drink
(
drinkid,
drinkname,
rating
)
VALUES
(1, 'Margarita', 4.5),
(2, 'Mojito', 4.3),
(3, 'Old Fashioned', 4.7),
(4, 'Martini', 4.4),
(5, 'Cosmopolitan', 4.2)
GO
ALTER INDEX drinkpk ON dbo.drink DISABLE
GO
SELECT * FROM dbo.Drink
GO
What is the result? See possible answers