Skip to main content

Select

  • Chapter
  • First Online:
A Course in In-Memory Data Management
  • 1511 Accesses

Abstract

In this chapter, we describe how an application can extract data that was once stored in the database (execution of the SELECT statement).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 74.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.00
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hasso Plattner .

Self Test Questions

Self Test Questions

 

  1. 1.

    Table Size

    What is the table size if it has 8 billion tuples and each tuple has a total size of 200 byte?

    1. (a)

      \(\approx \) 12.8 TB

    2. (b)

      \(\approx \) 12.8 GB

    3. (c)

      \(\approx \) 2 TB

    4. (d)

      \(\approx \) 1.6 TB

  2. 2.

    Optimizing SELECT

    How could the performance of SELECT statements be improved?

    1. (a)

      Reduce the number of indices

    2. (b)

      By using the FAST SELECT keyword

    3. (c)

      Order multiple sequential select statements from low selectivity to high selectivity

    4. (d)

      Optimizers try to keep intermediate result sets large for maximum flexibility during query processing.

  3. 3.

    Selection Execution Order

    Given is a query that selects the names of all German women born after January 1, 1990 from the world_population table (contains data about all people in the world). In which order should the query optimizer execute the selections? Assume a sequential query execution plan.

    1. (a)

      country first, birthday second, gender last

    2. (b)

      country first, gender second, birthday last

    3. (c)

      gender first, country second, birthday last

    4. (d)

      birthday first, gender second, country last.

  4. 4.

    Selectivity Calculation

    Given is the query to select the names from German men born after January 1, 1990 and before December 31, 2010 from the world population table (8 billion people). Calculate the selectivity.

    Selectivity = number of tuples selected / number of tuples in the table

    Assumptions:

    • there are about 80 million Germans in the table

    • males and females are equally distributed in each country

    • there is an equal distribution between all generations from 1910 until 2010

    1. (a)

      0.001

    2. (b)

      0.005

    3. (c)

      0.1

    4. (d)

      1

  5. 5.

    Execution Plans

    For any one SELECT statement...

    1. (a)

      there always exist exactly two execution plans, which mirror each other

    2. (b)

      exactly one execution plan exists

    3. (c)

      several execution plans with the same result set, but differing performance may exist

    4. (d)

      several executions plans may exist that deliver differing result sets.

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Plattner, H. (2013). Select. In: A Course in In-Memory Data Management. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-36524-9_15

Download citation

Publish with us

Policies and ethics