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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started