<< < 9 10 11 12 13 14 15 16 17 18 19 > >>   ∑:464  Sort:Rank

Difference Between Clustered and Non-Clustered Indexes in SQL Server
What Is the Difference Between Clustered and Non-Clustered Indexes in SQL Server? SQL Server 2005 supports two types of indexes: clustered index and non-clustered index. Here are the main differences between them: One table can only have only one clustered index. One table can only have many non-clu...
2016-11-13, 1427🔥, 0💬

Creating an Index for Multiple Columns in SQL Server
How To Create an Index for Multiple Columns in SQL Server? An index for multiple columns works similarly to a sorting process on multiple columns. If an index is defined for two columns, the index key is composed by values from those two columns. A multi-column index will be used to speed up the sea...
2016-11-13, 1408🔥, 0💬

CREATE CLUSTERED INDEX - Adding Clustered Indexes in SQL Server
How To Create a Clustered Index in SQL Server? If there is no primary key in a table, you can add one clustered index to that table with CREATE CLUSTERED INDEX statement. The tutorial exercise below shows you how to create a clustered index: USE FyiCenterData; GO -- Drop the old table, if needed DRO...
2016-11-13, 1405🔥, 0💬

UNIQUE Constraint Creating Default Index in SQL Server
Does the UNIQUE Constraint Create an Index in SQL Server? If you add the UNIQUE constraint on a column, SQL Server will automatically add a non-clustered index for that column. The tutorial exercise below shows you the index created as part of the UNIQUE column, "id", of "fyi_links": USE FyiCenterDa...
2016-11-13, 1402🔥, 0💬

Adding a New Index to a Large Table in SQL Server
What Happens If You Add a New Index to Large Table in SQL Server? An index can be added when you create a new table. New rows will be indexed as they are inserted into the table. But you can also add a new index to an existing table with the same CREATE INDEX statement. The existing rows will be ind...
2016-11-13, 1390🔥, 0💬

Primary Key - Default Indexes of Tables in SQL Server
Is the PRIMARY KEY Column of a Table an Index in SQL Server? If you define a primary key on a table, an index for the primary key column will be created by default. The tutorial exercise below shows you the index created as part of the primary key column of "fyi_links": USE FyiCenterData; GO -- Drop...
2016-11-13, 1348🔥, 0💬

DROP_EXISTING - Recreating an Existing Index in SQL Server
How To Recreate an Existing Index in SQL Server? If you want to change the definition of an existing index, you can use the "DROP INDEX" statement to drop the index first. Then use the "CREATE INDEX" statement to create it again with the new definition. But you can also combine those two statements ...
2016-11-08, 2732🔥, 0💬

"ALTER INDEX ... REBUILD" - Defragmenting Indexes in SQL Server
How To Rebuild Indexes with ALTER INDEX ... REBUILD in SQL Server? When an index is defragmented to a large percentage, like &gt; 30%, you can use the "ALTER INDEX ... REBUILD" statement to rebuild the index. Here is a tutorial exercise on rebuilding indexes: USE FyiCenterData; GO UPDATE fyi_lin...
2016-11-08, 2081🔥, 0💬

What Causes Index Fragmentation in SQL Server
What Causes Index Fragmentation in SQL Server? Index fragmentation is usually caused by deleting of existing rows or updating existing values of the indexed column. Inserting new rows should not cause any index fragmentation. This tutorial exercise shows you how update statements of 50000 rows on th...
2016-11-08, 2001🔥, 0💬

"ALTER INDEX ... REORGANIZE" - Defragmenting Indexes in SQL Server
How To Defragment Indexes with ALTER INDEX ... REORGANIZE in SQL Server? When an index is defragmented to a small percentage, like &lt; 30%, you can use the "ALTER INDEX ... REORGANIZE" statement to defragment the index. Here is a tutorial exercise on defragmenting indexes: USE FyiCenterData; GO...
2016-11-08, 1918🔥, 0💬

What Is Index Fragmentation in SQL Server
What Is Index Fragmentation in SQL Server? Index fragmentation is a phenomena where index contents are no longer stored continuously in the storage. When index contents become scattered in the storage, fragmented, performance on index will degrade. If you want to see the fragmentation level of an in...
2016-11-08, 1525🔥, 0💬

CREATE INDEX - Impact on Other User Sessions in SQL Server
What Is the Impact on Other User Sessions When Creating Indexes in SQL Server? If you are creating a new index on a table with existing data, all existing rows will be indexed as part of the CREATE INDEX statement. If the table is large, the indexing process could take some time. The impact of this ...
2016-11-08, 1503🔥, 0💬

Understanding and Managing Views in SQL Server
Where to find answers to frequently asked questions on Understanding and Managing Views in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Understanding and Managing Views in SQL Server. Clear answers are provided with tutorial exercis...
2016-11-08, 1485🔥, 0💬

Defragmenting Table Indexes in SQL Server
How To Defragment Table Indexes in SQL Server? When a table index is fragmented to a certain percentage, you need to defragment the index to maintain its performance level. There are 3 ways to defragment: 1. "ALTER INDEX index_name ON table_name REORGANIZE" - Defragmenting the specified index perfor...
2016-11-08, 1366🔥, 0💬

What Are Views in SQL Server
What Are Views in SQL Server? A view is a database object that represents the data in one or more tables in the same structure as a separate table. Here are some basic rules about views: Tables store real data. Views do not store real data. Views must have underlying tables to provide data. Each vie...
2016-11-08, 1353🔥, 0💬

Rebuilding All Indexes on One Table in SQL Server
How To Rebuild All Indexes on a Single Table in SQL Server? If you have several indexes on a single table and want to rebuild all of them, you may use the "ALTER INDEX ALL ON table_name REBUILD" statement as shown in the tutorial exercise below: USE FyiCenterData; GO UPDATE fyi_links_indexed SET url...
2016-11-08, 1314🔥, 0💬

Generating CREATE VIEW Scripts on Existing Views in SQL Server
How To Generate CREATE VIEW Script on an Existing View in SQL Server? If you want to know how an existing view was created, you can use SQL Server Management Studio to automatically generate a "CREATE VIEW" script The following tutorial shows you how to do this: 1. Run SQL Server Management Studio a...
2016-11-05, 3039🔥, 0💬

CREATE VIEW - Creating a View on an Existing Table in SQL Server
How To Create a View on an Existing Table in SQL Server? If you want to a view on an existing table, you can use the CREATE VIEW statement in a simple syntax: CREATE VIEW view_name AS SELECT ... The tutorial exercise below shows you how to create a view to represent sub set of data stored in fyi_lin...
2016-11-05, 2432🔥, 0💬

Creating a View with Data from Multiple Tables in SQL Server
Can You Create a View with Data from Multiple Tables in SQL Server? Can You Create a View with Data from Multiple Tables? The answer is yes. A view can be created with a SELECT statement to join data from multiple tables. It is a common practice to normalize data into multiple tables. Then using a v...
2016-11-05, 2346🔥, 0💬

"sys.columns" - Getting a List of Columns in a View in SQL Server
How To Get a List of Columns in a View using "sys.columns" in SQL Server? If you have an existing view, but you don't remember what are the columns defined in the view, you can use the "sys.columns" system view to get a list of all columns of all views in the current database. In order to a list of ...
2016-11-05, 2155🔥, 0💬

"sp_columns" - Getting a List of Columns in a View in SQL Server
How To Get a List of Columns in a View using the "sp_columns" Stored Procedure in SQL Server? If you have an existing table, but you don't remember what are the columns defined in the view, you can use the "sp_columns" stored procedure to get a list of all columns of the specified view. The followin...
2016-11-05, 2110🔥, 0💬

sys.views - List of Existing Views in SQL Server
How To See Existing Views in SQL Server? If you want to know how many views you have created in a database, you use the system view called sys.views to get a list of views defined in the current database. The tutorial exercise shows you how many views in database FyiCenterData: USE FyiCenterData; GO...
2016-11-05, 2006🔥, 0💬

sys.sql_modules - Getting View Definitions Back in SQL Server
How To Get the Definition of a View Out of the SQL Server in SQL Server? If you want get the definition of an existing view back from the SQL Server, you can use the system view called sys.sql_modules, which stores definitions of views and procedures. The sys.sql_modules holds view definitions ident...
2016-11-05, 1996🔥, 0💬

"sp_help" - Getting a List of Columns in a View in SQL Server
How To Get a List of Columns in a View using the "sp_help" Stored Procedure in SQL Server? Another way to get a list of columns from a view is to use the "sp_help" stored procedure. "sp_help" returns more than just a list of columns. It returns: the view information, the column information, the iden...
2016-11-05, 1527🔥, 0💬

<< < 9 10 11 12 13 14 15 16 17 18 19 > >>   ∑:464  Sort:Rank