SQL CREATE INDEX
One of the most important thing to increase a high performance in a SQL Server database is
creating index to table . index is used to speed up the query process in the sql data
tables, used to find data quickly.(eg)i had an very big query of joining some 5 to 6 sql
tables.when i had little amount of data in those tables i finds the query processing was
good .later on data in those table data where increased day by day.finally i got an [TIME
OUT ERROR].default sql query processing time is 30 seconds.a query have to process with in
that time.we have option to increase processing time.my query took 57 seconds for
executing.then i created index for the necessary column.now i get my query output in 20
seconds.
The CREATE INDEX statement is used to create indexes in Sql database tables.index is used
in the database to retrive the data faster when search query rised it will serach the
table without reading the whole table.
An index can be created in a table when ever you need the data more quickly and
efficiently from that table.index cannot be used by the user but it will be helpfull when
search queries are rised.
Eg syntex for creating an index:
CREATE INDEX index_name
ON table_name (column_name)
Created Indexes can easily be deleted with the DROP statement.
SQL DROP INDEX
The DROP INDEX statement remove index from a database table.
Eg syntex for DROP an index:
DROP INDEX table_name.index_name
One of the most important thing to increase a high performance in a SQL Server database is
creating index to table . index is used to speed up the query process in the sql data
tables, used to find data quickly.(eg)i had an very big query of joining some 5 to 6 sql
tables.when i had little amount of data in those tables i finds the query processing was
good .later on data in those table data where increased day by day.finally i got an [TIME
OUT ERROR].default sql query processing time is 30 seconds.a query have to process with in
that time.we have option to increase processing time.my query took 57 seconds for
executing.then i created index for the necessary column.now i get my query output in 20
seconds.
The CREATE INDEX statement is used to create indexes in Sql database tables.index is used
in the database to retrive the data faster when search query rised it will serach the
table without reading the whole table.
An index can be created in a table when ever you need the data more quickly and
efficiently from that table.index cannot be used by the user but it will be helpfull when
search queries are rised.
Eg syntex for creating an index:
CREATE INDEX index_name
ON table_name (column_name)
Created Indexes can easily be deleted with the DROP statement.
SQL DROP INDEX
The DROP INDEX statement remove index from a database table.
Eg syntex for DROP an index:
DROP INDEX table_name.index_name
