Skip to content

Commit a214267

Browse files
committed
Update important.md
1 parent 35d0350 commit a214267

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

important.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@ WHERE (DeptId, Salary) IN (SELECT DeptId, max(Salary) FROM Employee group by Dep
3030

3131
## Q. What are indexes in a Database?
3232

33-
An index is a database structure that you can use to improve the performance of database activity. A database table can have one or more indexes associated with it. An index is defined by a field expression that you specify when you create the index. Typically, the field expression is a single field name, like EMP_ID.
33+
Indexing is a way to optimize the performance of a database by minimizing the number of disk accesses required when a query is processed. It is a data structure technique which is used to quickly locate and access the data in a database.
34+
35+
Indexes are created using a few database columns
36+
37+
* The first column is the **Search key** that contains a copy of the primary key or candidate key of the table. These values are stored in sorted order so that the corresponding data can be accessed quickly.
38+
39+
* The second column is the **Data Reference** or **Pointer** which contains a set of pointers holding the address of the disk block where that particular key value can be found.
40+
3441

35-
An index is used to speed up the performance of queries by reducing the number of database pages that have to be visited:
3642

3743
|Sl.No|Query | Description |
3844
|-----|------------------------------------|---------------------------------------------------|
@@ -52,6 +58,8 @@ DROP INDEX index_name ON tbl_name;
5258
<b><a href="#table-of-contents">↥ back to top</a></b>
5359
</div>
5460

61+
## Q. What are the types of indexes in sql?
62+
5563
## Q. What is transactions in SQL?
5664

5765
```sql
@@ -276,4 +284,3 @@ A stored procedure is a set of SQL statements with an assigned name that can the
276284
</div>
277285

278286
## Q. What is the difference between Cluster and Non-Cluster Index?
279-
## Q. What are the types of indexes in sql?

0 commit comments

Comments
 (0)