title: How to find number of block transfers and seek operations required for a query
body: <p>I have a query that does selection and comparison. With the given number of tuples, disk blocks, and the index types (such as primary B+ tree index on a key), how can I calculate the number of block transfers and seek operations required to complete the query ? Let say,</p>
  
  <pre><code>select cid
  from payment
  where eid = 1200 and amount &gt; 30
  </code></pre>
  
  <p>, where we know values of eid are uniformly distributed between 1 and 100, and values for amount are uniformly distributed between 1 and 50. There are 1000000 tuples contained in 15000 disk blocks.</p>
  
  <p>Specifically, the given cases are:</p>
  
  <p>No index, primary B+ tree index on eid, primary B+ tree index on amount, secondary B+ tree index on eid, secondary B+ tree index on amount.</p>
  
  <p>eid is a primary key in employee, cid is a primary key in customer, cid and eid creates a candidate key for payment. amount is a attribute of payment.</p>