Database Management System: Unit IV: Implementation Techniques

Measure of Query Cost

Implementation Techniques - Database Management System

There are multiple possible evaluation plans for a query, and it is important to be able to compare the alternatives in terms of their estimated cost and choose the best plan.

Measure of Query Cost

AU: Dec.-19, Marks 3

• There are multiple possible evaluation plans for a query, and it is important to be able to compare the alternatives in terms of their estimated cost and choose the best plan.

• There are many factors that contribute to query cost are -

  • Disk access

  • CPU time to execute the query

  • Cost of communication in distributed and parallel database system.

• The cost of access data from disk is an important cost. Normally disk access is relatively slow as compared to in-memory operations. Moreover, the CPU speed is much faster than the disk speed. Hence the time spent in disk is relatively dominant factor in query execution.

• Computing CPU access time is comparatively harder, hence we will not consider the CPU time to execute the query.

• Similarly the cost of communication does not matter for simple large databases ero present in the centralized database system.

• Typically disk access is the predominant cost and is also relatively easy to estimate, taking into account :

  • Number of seeks × average-seek-cost

  • Number of blocks read × average-block-read-cost

  • Number of blocks written × average-block-write-cost

• Cost to write a block is greater than cost to read a block because data is read back after being written to ensure that the write was successful.

• We use number of block transfers from disk and number of disk seeks to estimate the Query cost.

• Let,

  • b be the number to blocks

  • S be the number of Seeks

  • tT is average time required to transfer a block of data, in seconds

  • tS is average block access time in seconds.

Then query cost can be computed using following formula b*tr+S*ts

Database Management System: Unit IV: Implementation Techniques : Tag: : Implementation Techniques - Database Management System - Measure of Query Cost


Database Management System: Unit IV: Implementation Techniques



Under Subject


Database Management System

CS3492 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation



Related Subjects


Environmental Sciences and Sustainability

GE3451 ESS 4th Semester | 2021 Regulation | 4th Semester EEE Dept 2021 Regulation


Theory of Computation

CS3452 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation


Artificial Intelligence and Machine Learning

CS3491 4th Semester CSE/ECE Dept | 2021 Regulation | 4th Semester CSE/ECE Dept 2021 Regulation


Database Management System

CS3492 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation


Algorithms

CS3401 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation


Introduction to Operating Systems

CS3451 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation