![]() ![]() If a heap-organized table has no indexes, then the database must perform a full table scan to find a value. Indexes are one of many means of reducing disk I/O. When an index exists on one or more columns of a table, the database can in some cases retrieve a small set of randomly distributed rows from the table. Given a data value that has been indexed, the index points directly to the location of the rows containing that value. The absence or presence of an index does not require a change in the wording of any SQL statement.Īn index is a fast access path to a single row of data. This section contains the following topics: Similarly, the manager could create separate indexes for employee last names, department IDs, and so on. To speed access, the manager could create an index that sequentially lists every employee ID with its folder location: ID 100: Box 3, position 1 (bottom) To locate a folder, the manager looks at every folder in box 1 from bottom to top, and then moves from box to box until the folder is found. The folder for employee Whalen (ID 200) is 10 folders up from the bottom of box 1, whereas the folder for King (ID 100) is at the bottom of box 3. Folders containing employee information are inserted randomly in the boxes. However, access of previously indexed data can be slower.įor an analogy, suppose an HR manager has a shelf of cardboard boxes. If you drop an index, then applications still work. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |