Query Processing of Pre-partitioned Data Using Sandwich Operators

  • Stephan Baumann
  • Peter Boncz
  • Kai-Uwe Sattler
Part of the Lecture Notes in Business Information Processing book series (LNBIP, volume 154)


In this paper we present the “Sandwich Operators”, an elegant approach to exploit pre-sorting or pre-grouping from clustered storage schemes in operators such as Aggregation/Grouping, HashJoin, and Sort of a database management system. Thereby, each of these operator types is “sandwiched” by two new operators, namely PartitionSplit and PartitionRestart. PartitionSplit splits the input relation into its smaller independent groups on which the sandwiched operator is executed. After a group is processed, PartitionRestart is used to trigger the execution on the following group. Executing each of these operator types with the help of the Sandwich Operators introduces minimal overhead and does not penalize performance of the sandwiched operator, as its implementation remains unchanged. On the contrary, we show that sandwiched execution of each operator results in lower memory consumption and faster execution time. PartitionSplit and PartitionRestart replace special implementations of partitioned versions of these operators. For many groups Sandwich Operators turn blocking operators into pseudo streaming operators, resulting in faster response time for the first query results.


indexing clustering partitioned data query processing 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bhattacharjee, B., Padmanabhan, S., Malkemus, T., Lai, T., Cranston, L., Huras, M.: Efficient query processing for multi-dimensionally clustered tables in DB2. In: VLDB (2003)Google Scholar
  2. 2.
    Chen, W.-J., Fisher, A., Lalla, A., McLauchlan, A., Agnew, D.: Database Partitioning, Table Partitioning, and MDC for DB2 9. IBM Redbooks (2007)Google Scholar
  3. 3.
    Graefe, G.: Partitioned b-trees - a user’s guide. In: BTW, pp. 668–671 (2003)Google Scholar
  4. 4.
    Herodotou, H., Borisov, N., Babu, S.: Query Optimization Techniques for Partitioned Tables. In: SIGMOD (2011)Google Scholar
  5. 5.
    Inkster, D., Boncz, P., Zukowski, M.: Integration of VectorWise with Ingres. SIGMOD Record 40(3) (2011)Google Scholar
  6. 6.
    Leslie, H., Jain, R., Birdsall, D., Yaghmai, H.: Efficient Search of Multi-Dimensional B-Trees. In: VLDB (1995)Google Scholar
  7. 7.
    Manegold, S., Boncz, P., Kersten, M.: Generic Database Cost Models for Hierarchical Memory. In: VLDB (2002)Google Scholar
  8. 8.
    Markl, V.: MISTRAL: Processing Relational Queries using a Multidimensional Access Technique. Institut für Informatik der TU München (1999)Google Scholar
  9. 9.
    Morales, T.: Oracle Database VLDB and Partitioning Guide, 11g Release 1 (11.1). Oracle (July 2007)Google Scholar
  10. 10.
    O’Neil, P., O’Neil, E., Chen, X., Revilak, S.: The star schema benchmark and augmented fact table indexing. In: Nambiar, R., Poess, M. (eds.) TPCTC 2009. LNCS, vol. 5895, pp. 237–252. Springer, Heidelberg (2009)Google Scholar
  11. 11.
    Padmanabhan, S., Bhattacharjee, B., Malkemus, T., Cranston, L., Huras, M.: Multi-dimensional Clustering: A New Data Layout Scheme in DB2. In: SIGMOD (2003)Google Scholar
  12. 12.
    Polyzotis, N.: Selectivity-based Partitioning: A Divide-and-Union Paradigm for Effective Query Optimization. In: CIKM (2005)Google Scholar
  13. 13.
    Selinger, P., Astrahan, M., Chamberlin, D., Lorie, R., Price, T.: Access Path Selection in a Relational Database Management System. In: SIGMOD (1976)Google Scholar
  14. 14.
    Stonebraker, M., et al.: C-Store: A Column-Oriented DBMS. In: VLDB (2005)Google Scholar
  15. 15.
    Talmage, R.: Partitioned Table and Index Strategies Using SQL Server 2008. MSDN Library (March 2009)Google Scholar
  16. 16.
    Wang, X., Cherniack, M.: Avoiding Sorting and Grouping in Processing Queries. In: VLDB (2003)Google Scholar
  17. 17.
    Zukowski, M., Boncz, P.A., Nes, N.J., Héman, S.: MonetDB/X100 - A DBMS In The CPU Cache. IEEE Data Eng. Bull. 28(2), 17–22 (2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Stephan Baumann
    • 1
  • Peter Boncz
    • 2
  • Kai-Uwe Sattler
    • 1
  1. 1.Ilmenau University of TechnologyIlmenauGermany
  2. 2.Centrum for WiskundeAmsterdamNetherlands

Personalised recommendations