File Scan
Process of file scan
This method is based on the condition of filtering where a file is traversed, and the data is fetched. This level is the lowest of all and has two methods; linear search and binary methods. The linear search involves the reading of every record from the start of the file until the search record is found(Rupley, 2008). Every record is checked for filter condition each at a time. Fetching of records is done by linear search irrespective of filter condition, sorting, and index. If ts is the time taken seek, and tT is the transversal time for a single block, and B stands for the number of blocks to be transferred, then the cost of this procedure is given by; tS+(B*tT). This cost on the basis of the non-key attribute. If the search is based on the value of the key, the average cost is given by tS+(B*tT)/2.
Binary search is used when the search is based on sorted records based on key-value, and the condition is equal. It is an unsuitable method for range operations. If block records are stored on a continuous basis, the cost of the query to fetch the query is estimated as log(B)*(ts+tT). The reason being that to reach a successful level, every record has to be transversed in a tree up to a child node.
References
Rupley Jr, M. L. (2008). Introduction to query processing and optimization. Indiana University at South Bend.