![]() When data is being bulk-loaded into the relation. Heap is a good storage structure in the following situations: Heap files are one of the best organizations for bulk loading data into a table, as records are inserted at the end of the sequence there is no overhead of calculating what page the record should go on. This means that heap files have to be periodically reorganized by the Database Administrator ( DBA) to reclaim the unused space of deleted records. Consequently, performance progressively deteriorates as deletion occurs. The space with deleted records is not reused. To delete a record, the required page first has to be retrieved, the record marked as deleted, and the page written back to disk. ![]() ![]() This makes retrievals from heap files that have more than a few pages relatively slow, unless the retrieval involves a large proportion of the records in the file. A linear search involves reading pages from the file until the required is found. However, as a heap file has no particular ordering with respect to field values, a linear search must be performed to access a record. A new record is inserted in the last page of the file if there is insufficient space in the last page, a new page is added to the file. Records are placed in file in the same order as they are inserted. An unordered file, sometimes called a heap file, is the simplest type of file organization.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |