Podcast
Questions and Answers
What reads data in blocks?
What reads data in blocks?
- Only file systems
- Only Registers
- All storage media (correct)
- Only Hard disks
Most storage media is fast in randomly accessing a block, but slow at reading consecutive blocks.
Most storage media is fast in randomly accessing a block, but slow at reading consecutive blocks.
False (B)
What is the typical block size for NTFS filesystems?
What is the typical block size for NTFS filesystems?
- 8 KiB
- 64 MB
- Between 4 KiB and several MiB
- 4 KiB (correct)
What is main concern when fitting database records into blocks?
What is main concern when fitting database records into blocks?
What does a secondary index provide in a database system?
What does a secondary index provide in a database system?
Sequential searching of rows is required when using an index.
Sequential searching of rows is required when using an index.
Which of the following is a common type of index?
Which of the following is a common type of index?
What is the role of Primary Index?
What is the role of Primary Index?
What is the purpose of query optimization in a database management system (DBMS)?
What is the purpose of query optimization in a database management system (DBMS)?
Query optimization always guarantees the absolute best execution plan.
Query optimization always guarantees the absolute best execution plan.
Which of the following is a key consideration when optimizing queries?
Which of the following is a key consideration when optimizing queries?
What is main goal of 'Optimizing' Queries?
What is main goal of 'Optimizing' Queries?
A general Cost-Based Algorithm does which of these steps?
A general Cost-Based Algorithm does which of these steps?
A Heuristic-Based algorithm is generally more complex than Cost-Based
A Heuristic-Based algorithm is generally more complex than Cost-Based
Which is NOT a con of Cost-Based aproach?
Which is NOT a con of Cost-Based aproach?
What should you do, If you can replace a cartesian product with a join?
What should you do, If you can replace a cartesian product with a join?
What does 'cheapest' mean in cost-based optimization
What does 'cheapest' mean in cost-based optimization
Can we Limit the search space while not guaranteeing the cheapest solution?
Can we Limit the search space while not guaranteeing the cheapest solution?
What do we need for Cost-Based?
What do we need for Cost-Based?
For Cost-Based aproach, what should you enumerate?
For Cost-Based aproach, what should you enumerate?
Always consider the time needed for evaluating the query together vs. the time needed for ______ it
Always consider the time needed for evaluating the query together vs. the time needed for ______ it
Once the Query is Parsed then what happends?
Once the Query is Parsed then what happends?
Cost Model is not part of General Cost-Based Algorithm
Cost Model is not part of General Cost-Based Algorithm
What is used to represent unoptimized relational
What is used to represent unoptimized relational
Annotated Operator Tree is [blank] towards the execution plan
Annotated Operator Tree is [blank] towards the execution plan
What should the Query Optimization do?
What should the Query Optimization do?
Query optimization determines the 'worst' order of the relational algebra operators
Query optimization determines the 'worst' order of the relational algebra operators
What is the predominant factor for Cost Metrics
What is the predominant factor for Cost Metrics
Disk accesses are measured by Number of block reads * [blank]
Disk accesses are measured by Number of block reads * [blank]
What should you remember about In-Memory-Databases...?
What should you remember about In-Memory-Databases...?
Goodhart's law is a law that says : When a target becomes a measure, it ceases to be a good measure.
Goodhart's law is a law that says : When a target becomes a measure, it ceases to be a good measure.
Campbell's Law about social ______, says The more any quantitative social indicator is used for social decision-making, the more subject it will be to corruption pressures
Campbell's Law about social ______, says The more any quantitative social indicator is used for social decision-making, the more subject it will be to corruption pressures
Relational algebra allows for which?
Relational algebra allows for which?
In what plans the Querying behaviour is heterogeneous?
In what plans the Querying behaviour is heterogeneous?
Hybrid plans combine pre-optimization in a quick with fine-tuning during runtime
Hybrid plans combine pre-optimization in a quick with fine-tuning during runtime
What transformations are based on?
What transformations are based on?
Transformation rules transform an ______ tree step by step
Transformation rules transform an ______ tree step by step
What effect results of a query are affected by?
What effect results of a query are affected by?
Pushing selections is always a good heuristic
Pushing selections is always a good heuristic
What is used to break Cartesian products
What is used to break Cartesian products
What is a typical block size for NTFS and most 'traditional' file systems?
What is a typical block size for NTFS and most 'traditional' file systems?
What are the two ways to organize blocks to fit database records?
What are the two ways to organize blocks to fit database records?
Indexes always require sequential searching of rows to find stored data.
Indexes always require sequential searching of rows to find stored data.
Which of the following is a type of index mentioned?
Which of the following is a type of index mentioned?
What is the primary purpose of a query processor in a DBMS?
What is the primary purpose of a query processor in a DBMS?
File organization and indexing are irrelevant to query processing efficiency.
File organization and indexing are irrelevant to query processing efficiency.
A query optimizer aims to find the way of executing a query.
A query optimizer aims to find the way of executing a query.
Match the memory type with its typical capacity:
Match the memory type with its typical capacity:
What is the goal of Query Optimization?
What is the goal of Query Optimization?
The 'optimal' way of executing a query is always the fastest in absolute terms.
The 'optimal' way of executing a query is always the fastest in absolute terms.
What is a key technique for 'Optimizing' Queries?
What is a key technique for 'Optimizing' Queries?
What is one way you can optimize a query?
What is one way you can optimize a query?
Heuristic based query optimization guarantees the absolute best result.
Heuristic based query optimization guarantees the absolute best result.
Which of the following is a con related to heuristic-based query optimization?
Which of the following is a con related to heuristic-based query optimization?
What is crucial to have when using Cost-Based Query Optimization?
What is crucial to have when using Cost-Based Query Optimization?
Match the query optimization phase with its description:
Match the query optimization phase with its description:
In the context of file organization, what do file systems group together?
In the context of file organization, what do file systems group together?
A primary index refers to additional data structures, beyond the raw data, that facilitate efficient data retrieval.
A primary index refers to additional data structures, beyond the raw data, that facilitate efficient data retrieval.
In database systems, a secondary index helps to efficiently find specific in stored data.
In database systems, a secondary index helps to efficiently find specific in stored data.
Which of the following is a core question to consider when fitting database records into blocks?
Which of the following is a core question to consider when fitting database records into blocks?
What is meant by the term 'algebra' in the context of 'Algebraic Query Rewriting'.
What is meant by the term 'algebra' in the context of 'Algebraic Query Rewriting'.
Algebraic query rewriting always leads to drastically different results.
Algebraic query rewriting always leads to drastically different results.
What does it mean to Cascade a selection?
What does it mean to Cascade a selection?
What does it mean to be 'Commutative' in the context of selections applied to Relational Algebra?
What does it mean to be 'Commutative' in the context of selections applied to Relational Algebra?
What does it mean to be 'Commutative' in the context of Joins?
What does it mean to be 'Commutative' in the context of Joins?
Match the following concepts
Match the following concepts
Algebraic Optimization has no importance to a relational algebra.
Algebraic Optimization has no importance to a relational algebra.
What is the end goal when it comes to Algebraic Optimization.
What is the end goal when it comes to Algebraic Optimization.
What is a Static Plan?
What is a Static Plan?
What is the purpose of a Hybrid plan?
What is the purpose of a Hybrid plan?
The canonical tree has different semantics to the final tree, during query optimization.
The canonical tree has different semantics to the final tree, during query optimization.
After running a query plan through the Query Optimizer, what should you make ABSOLUTELY SURE OF?
After running a query plan through the Query Optimizer, what should you make ABSOLUTELY SURE OF?
What might be more costly when a Cost Model attempts to break things up?
What might be more costly when a Cost Model attempts to break things up?
For algebraic transofmrations, all transformations are based on a set of what?
For algebraic transofmrations, all transformations are based on a set of what?
When is commuting projections with 𝜎 ONLY possible?
When is commuting projections with 𝜎 ONLY possible?
The best results are always possible when using Simple Heuristics.
The best results are always possible when using Simple Heuristics.
When using Simple Heuristics for query plans, should be applied as early as possible.
When using Simple Heuristics for query plans, should be applied as early as possible.
Which of the following is NOT typically found in a memory hierarchy?
Which of the following is NOT typically found in a memory hierarchy?
A query processor is a component external to a DBMS, responsible for translating SQL queries into a machine-readable format.
A query processor is a component external to a DBMS, responsible for translating SQL queries into a machine-readable format.
What is the primary goal of query optimization?
What is the primary goal of query optimization?
In the context of file organization within databases, the primary question to address is whether to organize blocks by ______ or by columns.
In the context of file organization within databases, the primary question to address is whether to organize blocks by ______ or by columns.
Match the following memory types with their relative access times:
Match the following memory types with their relative access times:
What is a key characteristic of storage media regarding data access speed?
What is a key characteristic of storage media regarding data access speed?
In database systems, all file systems blocks are grouped into smaller blocks to optimize storage.
In database systems, all file systems blocks are grouped into smaller blocks to optimize storage.
In the context of database indexes, what type of searching is avoided through the use of an index?
In the context of database indexes, what type of searching is avoided through the use of an index?
The primary index on old encyclopedias is analogous to 'Sorting and ______ of Data'.
The primary index on old encyclopedias is analogous to 'Sorting and ______ of Data'.
Match each memory type with its approximate capacity:
Match each memory type with its approximate capacity:
What is the primary function of a (secondary) index in a database system?
What is the primary function of a (secondary) index in a database system?
In query optimization, algebraic rewriting always involves changing the semantics of the original query to improve performance.
In query optimization, algebraic rewriting always involves changing the semantics of the original query to improve performance.
Briefly describe the goal of query optimization.
Briefly describe the goal of query optimization.
Query optimization can be seen as finding a better operator ______.
Query optimization can be seen as finding a better operator ______.
Match the step to the stage of Query Processing:
Match the step to the stage of Query Processing:
In the context of query optimization, what does a 'cost-based' approach involve?
In the context of query optimization, what does a 'cost-based' approach involve?
In query optimization, a heuristic-based algorithm guarantees the selection of the absolute best query plan.
In query optimization, a heuristic-based algorithm guarantees the selection of the absolute best query plan.
What is the purpose of defining 'good cost metrics' in cost-based query optimization?
What is the purpose of defining 'good cost metrics' in cost-based query optimization?
The two classes of query optimization algorithm are Cost-Based Algorithm and ______-Based Algorithm.
The two classes of query optimization algorithm are Cost-Based Algorithm and ______-Based Algorithm.
Match the following steps with the general optimization algorithm the belong to:
Match the following steps with the general optimization algorithm the belong to:
Which approach is typically the most accurate for Query Optimization?
Which approach is typically the most accurate for Query Optimization?
In the context of query optimization, it's always necessary to find the absolute best query execution plan to ensure optimal performance.
In the context of query optimization, it's always necessary to find the absolute best query execution plan to ensure optimal performance.
What is the downside for an operator tree that has too many joins?
What is the downside for an operator tree that has too many joins?
The canonical and final operator tree should have a similar ______.
The canonical and final operator tree should have a similar ______.
Match the description to each concept:
Match the description to each concept:
With indexes available, the process of SQL Query is how many times faster?
With indexes available, the process of SQL Query is how many times faster?
A static plan must be found at run time for its query.
A static plan must be found at run time for its query.
Cite 2 set operations with Commutativity.
Cite 2 set operations with Commutativity.
A is a heuristic to improve a canonical operator tree step by step, but still doesn't change the results.
A is a heuristic to improve a canonical operator tree step by step, but still doesn't change the results.
Match the definition to the action:
Match the definition to the action:
What is true in regards to selections within heuristic pushing heuristics?
What is true in regards to selections within heuristic pushing heuristics?
Applying projections early doesn't reduce block sizes in blocks containing intermediate results.
Applying projections early doesn't reduce block sizes in blocks containing intermediate results.
What operator should native joins be more efficient than?
What operator should native joins be more efficient than?
The step to combine selections and is used to find joins.
The step to combine selections and is used to find joins.
Match the definition with the step of Simple Algebraic Heuristic Algorithm:
Match the definition with the step of Simple Algebraic Heuristic Algorithm:
For Pipelining, which is not necessary?
For Pipelining, which is not necessary?
Pipelining always works well for every operation.
Pipelining always works well for every operation.
If one knows how to evaluate a query better than the optimizer, then what is a potential tool to use?
If one knows how to evaluate a query better than the optimizer, then what is a potential tool to use?
The final state of query processes is ______.
The final state of query processes is ______.
Match the concept to what is mentioned in algebraic rewriting:
Match the concept to what is mentioned in algebraic rewriting:
What is the primary role of a query processor in a Database Management System (DBMS)?
What is the primary role of a query processor in a Database Management System (DBMS)?
All storage media have the same speed when randomly accessing data blocks.
All storage media have the same speed when randomly accessing data blocks.
What is the core question to consider when fitting database records into blocks during file organization?
What is the core question to consider when fitting database records into blocks during file organization?
A __________ index is an additional lookup data structure to more efficiently find specific rows.
A __________ index is an additional lookup data structure to more efficiently find specific rows.
Match the storage media with their respective access times:
Match the storage media with their respective access times:
Which of the following tasks is not part of the query optimization process?
Which of the following tasks is not part of the query optimization process?
When optimizing queries, it is generally advantageous to waste more time on optimizing than the time you are saving.
When optimizing queries, it is generally advantageous to waste more time on optimizing than the time you are saving.
What does it mean to get the 'same query result but faster' and what is it in relation to?
What does it mean to get the 'same query result but faster' and what is it in relation to?
A General __________-Based Algorithm involves enumerating alternative query plans, estimating their costs, and choosing the cheapest plan.
A General __________-Based Algorithm involves enumerating alternative query plans, estimating their costs, and choosing the cheapest plan.
Match each description with the correct term.
Match each description with the correct term.
When is it appropriate to to use Dynamic plans as opposed to static plans?
When is it appropriate to to use Dynamic plans as opposed to static plans?
With Algebraic Query Rewriting transformations, the results of a query can be affected.
With Algebraic Query Rewriting transformations, the results of a query can be affected.
What is at the 'heart' of the operations of the Query Processor?
What is at the 'heart' of the operations of the Query Processor?
Applying __________ early minimizes the size of records in intermediate results.
Applying __________ early minimizes the size of records in intermediate results.
Match heuristic optimization techniques with their descriptions:
Match heuristic optimization techniques with their descriptions:
Flashcards
Storage media reads data in what?
Storage media reads data in what?
Data is read in chunks.
Storage media speed for block access?
Storage media speed for block access?
Random access is slow, consecutive access is fast.
File systems group what?
File systems group what?
Group storage media blocks into larger blocks.
Databases group what?
Databases group what?
Signup and view all the flashcards
How do you fit database records into blocks?
How do you fit database records into blocks?
Signup and view all the flashcards
What is a secondary index?
What is a secondary index?
Signup and view all the flashcards
Indexes vs. sequential row searching?
Indexes vs. sequential row searching?
Signup and view all the flashcards
Types of indexes?
Types of indexes?
Signup and view all the flashcards
Query Optimization Goal?
Query Optimization Goal?
Signup and view all the flashcards
What does query optimization aim to do?
What does query optimization aim to do?
Signup and view all the flashcards
What are Heuristics?
What are Heuristics?
Signup and view all the flashcards
Cost-based optimization?
Cost-based optimization?
Signup and view all the flashcards
General Cost-Based Algorithm steps?
General Cost-Based Algorithm steps?
Signup and view all the flashcards
General Heuristic-Based Algorithm?
General Heuristic-Based Algorithm?
Signup and view all the flashcards
Heuristic-Based pros and cons?
Heuristic-Based pros and cons?
Signup and view all the flashcards
Cost-Based pros and cons?
Cost-Based pros and cons?
Signup and view all the flashcards
Heuristic Optimization?
Heuristic Optimization?
Signup and view all the flashcards
What is a cost estimation function used for?
What is a cost estimation function used for?
Signup and view all the flashcards
Cost-based optimization (naive)
Cost-based optimization (naive)
Signup and view all the flashcards
Why is exhaustive search of query plan prohibitively expensive?
Why is exhaustive search of query plan prohibitively expensive?
Signup and view all the flashcards
Goal for relational algebra optimization?
Goal for relational algebra optimization?
Signup and view all the flashcards
Types of Query Plans?
Types of Query Plans?
Signup and view all the flashcards
Static plans: what are they saved for?
Static plans: what are they saved for?
Signup and view all the flashcards
Dynamic plans.
Dynamic plans.
Signup and view all the flashcards
Hybrid Plans?
Hybrid Plans?
Signup and view all the flashcards
Transform canonical tree?
Transform canonical tree?
Signup and view all the flashcards
What is cost metric given by?
What is cost metric given by?
Signup and view all the flashcards
Our Cost Metrics for now?
Our Cost Metrics for now?
Signup and view all the flashcards
Transformation Rules?
Transformation Rules?
Signup and view all the flashcards
Applying selections?
Applying selections?
Signup and view all the flashcards
Push Selections.
Push Selections.
Signup and view all the flashcards
Size of records in intermediate results?
Size of records in intermediate results?
Signup and view all the flashcards
Push Projections
Push Projections
Signup and view all the flashcards
Force Joins
Force Joins
Signup and view all the flashcards
Pipelines.
Pipelines.
Signup and view all the flashcards
Pipeline execution ways?
Pipeline execution ways?
Signup and view all the flashcards
Producer Driven?
Producer Driven?
Signup and view all the flashcards
Coordinated the execution?
Coordinated the execution?
Signup and view all the flashcards
What available operations for pipelining?
What available operations for pipelining?
Signup and view all the flashcards
Query Processor
Query Processor
Signup and view all the flashcards
Memory Hierarchy
Memory Hierarchy
Signup and view all the flashcards
Enumerate
Enumerate
Signup and view all the flashcards
Disk accesses measurement
Disk accesses measurement
Signup and view all the flashcards
Symbolic calculations
Symbolic calculations
Signup and view all the flashcards
Cascading π
Cascading π
Signup and view all the flashcards
Arbitrary order
Arbitrary order
Signup and view all the flashcards
Heuristics.
Heuristics.
Signup and view all the flashcards
Simple Heuristics
Simple Heuristics
Signup and view all the flashcards
Pipelining.
Pipelining.
Signup and view all the flashcards
Iterator interfaces
Iterator interfaces
Signup and view all the flashcards
Coordinated execution.
Coordinated execution.
Signup and view all the flashcards
Study Notes
Memory Hierarchy: Cost vs. Access Time
- Memory hierarchy is organized by cost and access time
- Registers offer access times of 1-10 nanoseconds and are the most expensive
- Cache provides access in 10-100 nanoseconds and is very expensive
- Main Memory has access times of 60-300 nanoseconds, costing around 10 euros per gigabyte
- Hard Disk access is slower, at 10-12 milliseconds, and is cheaper at ~0.10 euros per gigabyte
- Latency Gap reported as 10^6
- Tertiary Storage is slowest with access times reported as seconds to minutes, and is the cheapest storage option at less than 0.10 euros per gigabyte
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.