Register
|
Login
Home
Add Question
Add Article
Categories
Latest Articles
Tags
Contact Us
Search:
Search questions and share your knowledge with the world here on Questionpoint.
Home
>
SQL Server Clustering Interview Questions
>
What is indexing in sql with exact description
:: Categories ::
SQL Server 2000(410)
SQL Server 2005(387)
SQL Server 2008(73)
SQL Server Analysis Services (SSAS)(4)
Backup and Recovery(90)
Stored Procedures(877)
SQL Server Clustering(20)
Common Language Runtime (CLR)(0)
Common Table Expressions (CTE)(0)
Data Management(25)
Data Transformation Services (DTS)(18)
SQL Server Administration(56)
SQL Server Configurations(63)
Database Design(106)
Data Mining(11)
Data Warehousing(12)
SQL Server Mirroring(4)
SQL Server Triggers(60)
SQL Server Disaster Recovery(0)
SQL Server Indexing(89)
Service Packs and Patches(27)
SQL Server Performance Tuning(65)
SQL Server Query Optimization(1)
SQL Server Security(71)
SQL Server Integration Services(13)
SQL Server Management Studio(106)
Microsoft Service Broker(0)
Community Service Broker(0)
Microsoft Transact-SQL(77)
ADO.NET Entity Framework(0)
Microsoft Integration Services(0)
SQL Server Reporting Services (SSRS)(38)
SQL Server Data Services (SSDS)(26)
SQL Server 2005 Driver for PHP(12)
SQL Server Certifications(58)
SQL Server Jobs(119)
SQL Server Gadgets(0)
Miscellaneous(0)
Sql Server Views(80)
Replication(10)
Interview Question in SQL Server Clustering
Interview Question :: What is indexing in sql with exact description
clustering,non clustering
Answers to "What is indexing in sql with exact description"
RE: What is indexing in sql with exact description?
what? i dont know what u mean.
Vote for this answer ::
RE: What is indexing in sql with exact description?
i can't get you friend. indexing in the sense...... i am presently learning SQL. I have'nt come across this
Vote for this answer ::
RE: What is indexing in sql with exact description?
Index improve the query performace. Assume you are frequently querying from a table called employee. So they primary key will be the employeeId that means your most of the query from this table have the where clause with the employee_id so if you create the index on this employee_id means the query will be in lightning speed. All these are considered as performance tunning if the data in a table is very huge. Below i give the definition for the Index
Index are created in an existing table to locate rows more quickly and efficiently. It is possible to create an index on one or more columns of a table, and each index is given a name. The users cannot see the indexes, they are just used to speed up queries.
Note: Updating a table containing indexes takes more time than updating a table without, this is because the indexes also need an update. So, it is a good idea to create indexes only on columns that are often used for a search.
A Unique Index
Creates a unique index on a table. A unique index means that two rows cannot have the same index value.
CREATE UNIQUE INDEX index_name
ON table_name (column_name)
The "column_name" specifies the column you want indexed.
A Simple Index
Creates a simple index on a table. When the UNIQUE keyword is omitted, duplicate values are allowed.
CREATE INDEX index_name
ON table_name (column_name)
The "column_name" specifies the column you want indexed.
Example
This example creates a simple index, named "PersonIndex", on the LastName field of the Person table:
CREATE INDEX PersonIndex
ON Person (LastName)
If you want to index the values in a column in descending order, you can add the reserved word DESC after the column name:
CREATE INDEX PersonIndex
ON Person (LastName DESC)
If you want to index more than one column you can list the column names within the parentheses, separated by commas:
CREATE INDEX PersonIndex
ON Person (LastName, FirstName)
Vote for this answer ::
RE: What is indexing in sql with exact description?
Indexing means that your table maintains a data structure (like a b-tree) which maps values in the rows back to the addresses of the row. This speeds select speed, but costs a bit on update / insert.
A simple example is the primary key -- if you ask for a row by primary key it's really really fast, because the database knows right where to look for the row.
Indexes let keys which aren't primary (or even unique) act this way. It should take the search time from linear (O(N)) to at least log N, if not log 0 if the value is unique and it can maintain a hash instead of a btree.
This is totally recommended if you've got a database which isn't updated / inserted a lot, but you do queries on that particular key a lot. It will speed things up on a big table tremendously.
Vote for this answer ::
Notify me whenever an answer is posted for this question
Update Alert Setting
Loading ...
Top Tags
sql server log(1)
sql server insert(1)
sql server download(1)
sql server date(1)
sql server backup(1)
sql server stored procedure(1)
sql server service(1)
sql server reporting(1)
sql server net(1)
microsoft sql server 2005(1)
sql server studio(1)
sql server services(1)
sql server query(1)
sql server management(1)
sql server express(1)
ms sql server(1)
sql server database(1)
microsoft sql server(1)
sql server 2000(1)
sql server 2005(1)