Question: Consider a table with 4 columns and 100,00 rows. The columns are an integer, variable length string, an integer, and an integer - in that

Consider a table with 4 columns and 100,00 rows. The columns are an integer, variable length string, an integer, and an integer - in that order (all integer are 8 bytes). The average string length is 20 bytes. We assume that the values in columns 0,1 and 3 are uniformed distributed between [0, 1024), and that cache lines are 64 bytes. For each question answer assuming the average case.

We will use the following query.

Query 1: SELECT SUM(col0) + SUM(col2) FROM table

a) Suppose the table is stored in memory as row store (without padding). How many cache lines must be accessed to compute query 1?

b) Suppose the table is stored in memory as a column store (without compression). How many cache lines must be accessed to compute query 1?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!