<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Challenges for a GPU-Accelerated Dynamic Programming Approach for Join-Order Optimization</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andreas Meister</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gunter Saake</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Otto-von-Guericke-University Magdeburg Institute for Technical and Business Information Systems Magdeburg</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2016</year>
      </pub-date>
      <fpage>86</fpage>
      <lpage>91</lpage>
      <abstract>
        <p>Relational database management systems apply query optimization in order to determine efficient execution plans for declarative queries. Since the execution time of equivalent query execution plans can differ by several orders of magnitude based on the used join order, join-order optimization is one of the most important problems within query processing. Since the time-budget of query optimization is limited, efficient join-order optimization approaches are needed to determine execution plans with low execution times. The state of the art in commercial systems for determining optimal join orders is dynamic programming. Unfortunately, existing algorithms are mainly sequential algorithms, which do not benefit from current parallel system architectures. In current system architectures, specialized co-processors, such as GPUs, provide a higher computational power compared to CPUs. If the full potential of GPUs is used, query optimizer can provide optimal solutions for more complex problems. Unfortunately, adapting existing dynamic programming approaches for join-order optimization to GPUs is not straightforward. In this paper, we discuss the challenges for a GPU-accelerated dynamic programming approach for join-order optimization, and propose different ways to handle these challenges.</p>
      </abstract>
      <kwd-group>
        <kwd>GPU-Accelerated Optimization</kwd>
        <kwd>Join-Order Optimization</kwd>
        <kwd>Dynamic Programming</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Categories and Subject Descriptors</title>
      <p>random query plans [sorted by runtime]</p>
    </sec>
    <sec id="sec-2">
      <title>1. INTRODUCTION</title>
      <p>
        Relational Database Management Systems (DBMSs) use
declarative query languages, such as the Structured Query
Language (SQL). Within declarative query languages, queries
only specify what data should be retrieved, but not how the
data should be retrieved by the system. Therefore, the
system needs to transform the declarative query into an
executable plan. Based on the properties of the relational
operators, such as commutativity of joins, several equivalent
plans exist. In order to ensure an efficient query processing,
DBMSs need to select an efficient query execution plan. To
this end, DBMSs apply different heuristics, such as pushing
down selections, and optimization approaches to ensure the
selection of efficient query execution plans. The execution
time of a query can vary by several orders of magnitude
based on the join order [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], like in Query 5 of the TPC-H
benchmark [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], see Figure 1. Therefore, one of the most
important optimization problems within the query processing
is join-order optimization.
      </p>
      <p>
        Because join-order optimization is an NP-complete
problem [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ], providing optimal solutions is challenging. Often
heuristics, such as avoiding Cartesian products or
evaluating only left-deep trees, are used in order to cope with the
complexity of join-order optimization by reducing the search
space [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]. Unfortunately, by reducing the search space also
efficient execution plans or even the optimal execution plan
Year
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
      </p>
      <p>CPU</p>
      <sec id="sec-2-1">
        <title>GFLOPS</title>
      </sec>
      <sec id="sec-2-2">
        <title>Pentium 4 (Northwood)</title>
      </sec>
      <sec id="sec-2-3">
        <title>Pentium 4 (Northwood)</title>
      </sec>
      <sec id="sec-2-4">
        <title>Pentium 4 (Prescott)</title>
      </sec>
      <sec id="sec-2-5">
        <title>Core 2 Duo</title>
      </sec>
      <sec id="sec-2-6">
        <title>Core 2 Quad</title>
        <p>Q9650
Core i7 960</p>
        <p>
          Core i7 970
Core i7 3960X
Core i7 3970X
may not be considered during the optimization, leading to
inefficiencies within the query execution [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ]. In order to
provide an optimal join order the dynamic programming
approach was proposed [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ], which is currently the state of the
art approach for providing an optimal join order in
commercial systems, such as Oracle1 or Postgres2.
        </p>
        <p>
          As the dynamic programming approach was proposed
almost 40 years ago, where only traditional system
architectures with single-core CPUs were available, the traditional
dynamic programming approach is a sequential algorithm.
In the past, this was not a problem, because the clock-speed
of CPUs increased every year, and, hence, also the
performance and applicability of the dynamic programming
approach increased automatically. Unfortunately, based on
physical effects, such as the power wall [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], increasing the
clock speed is not practicable anymore. In order to provide
more computational power, CPU vendors started to combine
multiple cores on one chip. With this approach the
computational capacity of CPUs was increased in the past years, see
Table 1. Unfortunately, sequential algorithms do not
benefit from parallel processors, and, hence, the applicability
of the dynamic programming approach for join-order
optimization is practically limited to the optimization of queries
with up to 12 tables [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. To utilize the potential powers of
multi-core CPUs, the execution of existing sequential
algorithms need to be parallelized. Han et al. proposed a
parallel algorithm for multi-Core CPUs in order to apply the
dynamic programming approach to more complex
optimization problems [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. By using different partitioning schemata
for assigning calculations to available CPU cores, Han et al.
achieve almost linear speedup and extend the practicable
limit of the dynamic programming approach to up to 20-25
tables depending on the topology of the queries [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
Unfortunately, increasing the numbers of CPU cores on one chip
is also limited. Based on the fixed energy-budget of CPUs,
the maximal number of CPU cores on one chip is estimated
to be between ten to around one hundred cores per chip [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ].
        </p>
        <sec id="sec-2-6-1">
          <title>1oracle.de 2postgresql.org/</title>
          <p>
            To provide further computational power, the use of
coprocessors was proposed. Co-processors, such as GPUs,
FPGAs, and MICs, are specialized for specific calculations [
            <xref ref-type="bibr" rid="ref4">4</xref>
            ].
For example, GPUs are highly parallel co-processors,
offering a higher computational power per dollar compared to
CPUs based on their specialized architecture [
            <xref ref-type="bibr" rid="ref18">18</xref>
            ], see
Table 1. In order to use the computational power of GPUs,
we need to adapt existing algorithms to the specialized
architecture of GPUs, similar to the change from single-core
CPUs to multi-core CPUs.
          </p>
          <p>
            Many GPU-adapted approaches in the field of
optimization [
            <xref ref-type="bibr" rid="ref19 ref5">5, 19</xref>
            ] and DBMSs [
            <xref ref-type="bibr" rid="ref11 ref3 ref9">3, 9, 11</xref>
            ], show that the adaption
is worthwhile and high speedups are possible.
Unfortunately, in the field of query optimization only approaches
for selectivity estimation [
            <xref ref-type="bibr" rid="ref10">10</xref>
            ] are available. Other
important optimization problems, such as join-order optimization
are still lacking GPU-based approaches. We argue that
GPU-acceleration will be benefiting also for other
optimization approaches within the field of query optimization in
DBMSs [
            <xref ref-type="bibr" rid="ref15">15</xref>
            ] and, hence, plan to adapt the join-order
optimization on GPUs, starting with the dynamic programming
approach [
            <xref ref-type="bibr" rid="ref14">14</xref>
            ].
          </p>
          <p>Unfortunately, the adaption of approaches from
CPUbased to GPU-based execution is challenging based on the
different architectures and resulting properties of GPUs and
CPUs. Therefore many challenges arise during the
adaption of the dynamic programming approach for join-order
optimization. In this paper, we discuss the challenges for a
GPU-accelerated dynamic programming approach for
joinorder optimization, and propose different ways to handle
these challenges.</p>
          <p>The remainder of this paper is structured as follow. In
Section 2, we discuss the difference between CPUs and GPUs.
In Section 3, we explain the basic concept of dynamic
programming approach. In Section 4, we illustrate the
challenges for a GPU-based dynamic programming approach for
join-order optimization. In the last section, we conclude our
discussions.
Control</p>
          <p>ALU</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>GPU-ACCELERATION</title>
      <p>The architecture for CPUs and GPUs highly differ, see
Figure 2, based on different execution focus.</p>
      <p>CPUs efficiently support a wide range of applications from
control-intensive workflows to simple mathematical
operations. Therefore, CPUs provide advanced techniques to
support the broad variance of applications. CPUs provide
branch-prediction techniques to support control intensive
applications, and pipelining in order to increase the
throughput, when multiple operations are executed concurrently.
These techniques require additional functionality. Hence, a
large part of CPU chips are used for the control logic to
provide this required functionality. In order to provide a low
response time for multiple concurrent operations, CPU cores
are independent, whereby each core has a high clock rate up
to four GHz. Based on the high clock-speed and
independent execution, only few cores (currently up to 18 cores) can
be put on one CPU chip. A CPU chip can directly access
the main memory. Since the access to the main memory
is slow compared to the access of the internal register and
clock speed of CPUs, large caches (up to 45 MB) are used
in order to reduce the access gap to main memory. Hereby,
each core has access to the complete shared cache.</p>
      <p>In contrast to CPUs, GPU cores cannot directly access the
main memory. Therefore, GPUs provide their own memory
on the device, accessible by the GPU cores. Before the GPU
cores can process data, the data needs to be transferred
from the main memory to the device memory of the GPU
via the Peripheral Component Interconnect Express (PCIe)
bus. Although GPUs provide a high computational power
based on the number of cores (up to around 5000), the
computational power and also the capabilities of a single GPU
core is limited compared to CPU cores. In order to manage
the high number of cores, GPU cores cannot work
independently. GPU cores are grouped to streaming processors,
whereby the number of cores can vary depending on the
architecture of the GPU. For each streaming processor, only
one control unit and cache is provided. Hence, all cores of
one streaming processor need to execute the same
instruction. Additionally, each core of a streaming processor has a
lower clock speed (up to 900 Mhz) compared to CPU cores,
and lacks such advanced techniques such as branch
prediction or pipelining. Based on the simple core model, switches
between different executions can be performed without much
overhead. The execution of operations and memory transfer
from and to the GPU device for general purpose
computations are managed by the CPU. The management of
executions by the CPU are performed by C-like application
pro</p>
      <p>T4
T3
T2
T1
1</p>
      <p>T3,4
gramming interfaces (APIs), such as CUDA3 and OpenCL4,
provided by all GPU vendors.</p>
      <p>Based on the different architecture, CPUs and GPUs are
suitable for different application scenarios. CPUs are
suitable for control-intensive applications and executing
different operations on few data items. Whereas GPUs are well
suited for parallel calculations, where operations are
performed on a huge data set in parallel.</p>
      <p>
        As already mentioned, Han et al. proved with their
CPUbased dynamic programming approach that the dynamic
programming approach for join-order optimization benefits
from parallelization [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Unfortunately, the CPU-based
dynamic programming approach proposed by Han et al. is not
directly applicable to GPUs, based on the different
architecture of GPUs compared to CPUs. In order to understand the
challenges of adapting the dynamic programming approach
for GPUs, we will first explain the approach of dynamic
programming for join-order optimization.
3.
      </p>
    </sec>
    <sec id="sec-4">
      <title>DYNAMIC PROGRAMMING FOR JOIN</title>
    </sec>
    <sec id="sec-5">
      <title>ORDER OPTIMIZATION</title>
      <p>
        The dynamic programming approach for join-order
optimization [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] is the state of the art approach for providing an
optimal solution within commercial DBMSs, such as Oracle
or Postgres. In contrast to randomized approaches, such as
genetic algorithms [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the dynamic programming approach
is a deterministic approach, providing always the same
solution for the same input. The dynamic programming
approach applies an exhaustive search in order to determine
the optimal solution for the join-order problem. In order to
avoid the evaluation of non-optimal join-orders, the dynamic
programming approach solves an optimization problem, by
splitting up the problem into subproblems. The splitting of
a complex problem into subproblems is done based on the
assumption that an optimal solution can only contain
optimal subsolutions. Hence, the subproblems are solved in an
optimal way, and combined to solutions for more complex
problems or the optimal solution for the overall
optimization problem, see Figure 3. Based on the combination of
existing subsolutions, the dynamic programming approach
avoids the calculation of non-optimal join orders in contrast
to a brute-force approach. Since, in general, for each
subsolution multiple equivalent join-orders are available, the
optimal subsolution must be selected based on a cost model.
Based on the focus of the optimization, different cost
models, such as page accesses [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ], communication overhead [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ],
      </p>
      <sec id="sec-5-1">
        <title>3developer.nvidia.com/cuda-zone 4khronos.org/opencl/</title>
        <p>
          execution time [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ], or number of intermediate results [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]
can be used.
        </p>
        <p>For the join-order optimization this means that the
dynamic programming approach starts with determining the
cost of accessing each individual table, see Algorithm 1 line
1 to 4. In DBMSs, different options to access tables are
available (e.g., table scan or indexes). Hence, all options need
to be evaluated and the best option need to be selected via
pruning, see Algorithm 1 line 3. Hereby, for example
different access operators can be evaluated, such as table access
or index access. After determining the access costs of the
table the second iteration combines two tables by a join. In
the third iteration, one solution of the first and one solution
of the second iteration is combined, whereby the validity of
the intermediate results must be checked such as that both
solutions do not contain identical tables. Within each
iteration, we construct solutions containing exactly one table
more than the previous iteration, see Algorithm 1 line 5 to
14. Similar to the table access, multiple equivalents solutions
are created. By pruning, we select the optimal solution, see
Algorithm 1 line 11.</p>
        <p>Algorithm 1 Sequential dynamic programming approach
for join-order optimization
Input: Query Q joining n tables (t1, · · · , tn)
Output: Optimal join order for query Q
1: for i = 1 to n do
2: optimal results[ti]+ = create access plans(ti);
3: prune plans(optimal results[ti]);
4: end for
5: for i = 2 to n do
6: for all s ⊆ {t1, · · · , tn} with |s| = i do
7: optimal results[s] = {} ;
8: for all tk ∈ s do
9: optimal results[s]+ =
10: create join(optimal results[s − {tk}], tk);
11: prune plans(optimal results[s]);
12: end for
13: end for
14: end for</p>
        <p>return optimal results[t1, · · · , tn]</p>
        <p>
          Since the evaluation of one iteration is dependent on all
previous iterations, the dynamic programming approach is
only parallelizable within one partition, but not over all
partitions [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], see Algorithm 1 line 6 to 13. Han et al. used this
limited parallelism to speed up the dynamic approach
using multi-core CPUs. The basic idea of their approach is
to determine within each iteration, which calculations need
to be evaluated. The necessary calculations are partitioned
based on the number of available CPU-cores. The cores can
execute the calculation independent of each other. When
all CPU cores finished their execution, the results of all
cores are merged. In the next step, the merged results are
pruned, so that only the optimal solution for one subproblem
is stored. This continues until the final result can be
provided. In order to avoid an unbalanced load between
processors, they evaluated several partition schemata. Based on a
proposed data structure, invalid solutions, where the tables
of the two join partners are overlapping, are skipped. Using
the parallel execution of multi-core CPUs and their adapted
approach, Han et al. achieve an almost linear speed up for
the dynamic programming approach on multi-core CPUs.
        </p>
        <p>Based on the parallel architecture of GPUs, GPUs provide
a higher computational power compared to CPUs. Since the
dynamic programming approach benefits from the parallel
execution on CPUs, we also claim that the dynamic
programming approach will benefit from the parallel execution
on GPUs.
4.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>CHALLENGES FOR DP ON GPUS</title>
      <p>Although a parallel dynamic programming approach
exists for multi-core CPUs, it is not directly applicable to
GPUs. In the following, we will explain why the adaption
of the dynamic programming approach is challenging.</p>
      <p>Although GPUs offer the advantage of an high
theoretical computational power, reaching the peak performance of
GPUs is a cumbersome and challenging task. Hereby, the
main challenge is the efficient use of the architecture, which
is completely different to CPUs, cf. Section 2. In order to
provide an efficient application on GPUs, applications need
to consider the following aspects:
• Avoid branching
• Transfer bottleneck
• Memory hierarchy
• Parallel calculations
• Limited storage
In the following, we will describe these challenges and
propose how to handle these challenges for the dynamic
programming approach on GPUs.</p>
      <p>
        Avoid branching: As mentioned previously, the GPU cores
are grouped to streaming processors. Since cores of one
streaming processor share cache and control logic of the
streaming processor, all cores of one streaming processor
can only execute the same instruction. If cores of a
streaming processor need to execute different operations, for
example based on branching, the different operations will be
executed sequentially. While sequentially executing
different operations, one part of cores of the streaming
processor stalls, while the other part of the group executes an
operation. Since only part of the cores are active, not the
complete computational potential of GPUs is used,
reducing the efficiency and also the usefulness of GPUs. Hence,
branching should be avoided for GPU-accelerated
applications. For the dynamic programming approach, this means
that we should try to eliminate invalid calculations, and
maybe not simply execute and skip invalid calculations as
done in the approach for multi-core CPUs of Han et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
Transfer bottleneck: Similar to CPUs, data need to be
available in the caches of streaming processors for the
processing. Unfortunately, the data cannot be loaded directly
into the cache of streaming processors on GPUs. Before a
GPU can load the data into the cache of streaming
processors, the data need to be stored in the device memory of
GPUs. To store data on the device memory, data need to
be transferred from the main memory to the device
memory via the PCIe bus. Unfortunately, the bandwidth of
the PCIe bus is limited compared to the internal
memory bandwidth of GPUs. Therefore, the PCIe bus poses
a major bottleneck for data intensive applications.
GPUaccelerated applications should avoid the inefficient
transfer from main memory to GPU device memory or should
overlap the transfer with calculations to hide the limited
bandwidth of the PCIe bus. For the dynamic programming
approach, this means that we should perform all
calculations on the GPU if possible. Hence, only statistics, such as
selectivity estimations and cardinality of tables, need to be
transferred at the beginning to the GPU, and, at the end,
only the optimized plan should be transferred back to the
main memory. Since statistics do not need to be
transactional consistent, the caching of these statistics on the GPU
is also an alternative to further reduce the communication
via the PCIe bus.
      </p>
      <p>
        Memory hierarchy: When the data is available on the
device, the data can be processed by the streaming processor
of GPUs. In contrast to CPUs, in GPUs, there are
different types of memory available, providing different access
speed and cacheability. The memory of GPUs consists of
global memory, constant memory, texture memory, shared
and local memory [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. Global memory is the largest
available storage, whereas the access speed of read and write
operations is the lowest. In contrast to global memory,
constant memory is a read only memory. Although constant
memory also uses the global memory, streaming processors
provide special caches for constant memory. Therefore, the
access speed to constant memory is increased by a better
cacheability. Similar to constant memory, texture memory
is read only memory, which is cached for streaming
processors. In contrast to constant memory, the texture memory
is optimized for two dimensional data. Shared memory
resides on streaming processors, hereby, each core of the
streaming processor can directly access the shared
memory. Since shared memory resides on streaming processors,
the size is smaller than the global memory, but the access
speed is faster. Local memory is only accessible by one
specific core. Unfortunately, there is no dedicated memory
available for this type of memory, and, hence, global
memory is used. Since constant memory and texture memory
provide good cacheability and shared memory is fast
accessible, the usage of these memory types is essential for
an efficient execution on GPUs. For the dynamic
programming approach, this means that we should transfer results
of each iteration into the cacheable memory (Constant or
texture memory). For the transfer from global memory
to the constant memory coalesced memory accesses should
be used, because coalesced accesses are more efficient on
GPUs compared to sequential memory accesses. In
addition to the use of cacheable memory, shared memory should
be used during the needed merge and reduction phase.
Parallel calculations: As pointed out, we need to avoid
branching, avoid transfers from and to main memory, and
use the fast on-chip memory to achieve the peak
performance of GPUs by parallel calculations. When we consider
a GPU-accelerated dynamic programming approach,
providing enough parallel calculations poses a challenge. As
mentioned previously, the execution of the dynamic
programming approach requires that all previous iterations are
finished before evaluating a new iteration. The consequence
for a GPU-accelerated dynamic programming approach is
that enough calculations need to be available in order to
utilize the high computational power of GPUs.
Depending on the topology of queries, this is easily fulfilled, see
Figure 4. Although for linear and cyclic query topologies,
only a small number of intermediate results need to be
evaluated for an optimal result (2680 and 7240 for 20 tables),
the number of intermediate results, which we need to
evaluate, explodes when clique query topology or queries with
cross-joins are considered (3.5 billion for 20 tables). For
the dynamic programming approach, this means that, on
GPUs, we should especially focus on the compute
intensive optimization, such as clique or star query topologies
or queries with cross joins.
      </p>
      <p>
        Limited storage: Unfortunately, with the number of
intermediate results also the storage requirements for the
dynamic programming approach rises. In our previous work,
we argued that the query optimization only requires little
storage sizes to provide results of their optimization [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ].
Although for the dynamic programming approach, this is
true for the inputs, it might not be true for the storage
of the optimal subsolutions, see Figure 5. Although the
output of the dynamic programming approach is only one
optimal plan for a given query, the dynamic programming
approach need to store intermediate results in order to
ensure an efficient optimization. Hence, for every solution
of a subproblem one result need to be stored. Although
Vance et al. argue that for one solution only 16 bytes need
to be stored [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ], this can already be challenging for larger
queries. In Figure 5, we show the number of intermediate
results, stored during the execution of the dynamic
programming approach. Whereas for linear, and cyclic queries
the number of solution is small and manageable (211 and
382 for 20 tables), the number of intermediate results
explodes, when we consider cross joins, or clique and star
query topologies (1 million, 1 million and 0,5 million for
20 tables). Since even high end class GPUs provide only a
small device memory (24 GB for the Nvidia Tesla K 80),
the storage requirements for the intermediate results poses
a further challenge. For the dynamic programming
approach, this means that on the one hand, we need an
efficient storage structure for storing intermediate results. On
the other hand, we need mechanisms to partition the
evaluation of iterations for queries with higher numbers of tables
similar to the vectorized executions in DBMSs [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ].
Although a high number of challenges exists for the
adaption of the dynamic programming approach for join-order
optimization on GPUs, we can use existing techniques and
considerations to solve these challenges. By solving these
challenges, we can use the GPU-acceleration for the dynamic
programming approach to extend the applicability to more
complex optimization problems and to reduce the
optimization time for simple optimization problems.
      </p>
    </sec>
    <sec id="sec-7">
      <title>5. SUMMARY</title>
      <p>Within this paper, we discuss the challenges for a
GPUaccelerated dynamic programming approach for join-order
optimization. Based on the properties of GPUs and the
execution model of the dynamic programming approach
different challenges arise. Although the challenges for a
GPUaccelerated application, such as branching, transfer
bottleneck, memory hierarchy, parallel calculations and limited
storage amount, are well known, within each algorithms
these challenges have to be handled in different ways. Hence,
we proposed different ways how to handle and avoid these
different challenges.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>K.</given-names>
            <surname>Bennett</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. C.</given-names>
            <surname>Ferris</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Y. E.</given-names>
            <surname>Ioannidis</surname>
          </string-name>
          .
          <article-title>A Genetic Algorithm for Database Query Optimization</article-title>
          .
          <source>ICGA</source>
          , pages
          <fpage>400</fpage>
          -
          <lpage>407</lpage>
          . Morgan Kaufmann Publishers,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Borkar</surname>
          </string-name>
          and
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Chien</surname>
          </string-name>
          .
          <article-title>The future of microprocessors</article-title>
          .
          <source>CACM</source>
          ,
          <volume>54</volume>
          (
          <issue>5</issue>
          ):
          <fpage>67</fpage>
          -
          <lpage>77</lpage>
          , May
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>S.</given-names>
            <surname>Breß</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Siegmund</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Heimel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Saecker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Lauer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Bellatreche</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Saake</surname>
          </string-name>
          .
          <article-title>Load-Aware Inter-Co-Processor Parallelism in Database Query Processing</article-title>
          .
          <source>Data &amp; Knowledge Engineering</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D.</given-names>
            <surname>Broneske</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Breß</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Heimel</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Saake</surname>
          </string-name>
          .
          <article-title>Toward Hardware-Sensitive Database Operations</article-title>
          .
          <source>In EDBT</source>
          , pages
          <fpage>229</fpage>
          -
          <lpage>234</lpage>
          . OpenProceedings.org,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Cecilia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Garc</surname>
          </string-name>
          <article-title>´ıa, A</article-title>
          . Nisbet,
          <string-name>
            <given-names>M.</given-names>
            <surname>Amos</surname>
          </string-name>
          , and
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Ujaldo´n. Enhancing data parallelism for Ant Colony Optimization on GPUs</article-title>
          .
          <source>Journal of Parallel and Distributed Computing</source>
          ,
          <volume>73</volume>
          (
          <issue>1</issue>
          ):
          <fpage>42</fpage>
          -
          <lpage>51</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>G. K.</given-names>
            <surname>Chen</surname>
          </string-name>
          and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Guo</surname>
          </string-name>
          .
          <article-title>Discovering epistasis in large scale genetic association studies by exploiting graphics cards</article-title>
          .
          <source>Frontiers in Genetics</source>
          ,
          <volume>4</volume>
          (
          <issue>266</issue>
          ),
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>W.-S.</given-names>
            <surname>Han</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Kwak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. M.</given-names>
            <surname>Lohman</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Markl</surname>
          </string-name>
          .
          <source>Parallelizing Query Optimization. PVLDB</source>
          ,
          <volume>1</volume>
          (
          <issue>1</issue>
          ):
          <fpage>188</fpage>
          -
          <lpage>200</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>N.</given-names>
            <surname>Hardavellas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ferdman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Falsafi</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Ailamaki</surname>
          </string-name>
          .
          <article-title>Toward Dark Silicon in Servers</article-title>
          .
          <source>IEEE Micro</source>
          ,
          <volume>31</volume>
          (
          <issue>4</issue>
          ):
          <fpage>6</fpage>
          -
          <lpage>15</lpage>
          ,
          <year>July 2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>B.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Fang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. K.</given-names>
            <surname>Govindaraju</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Luo</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P. V.</given-names>
            <surname>Sander</surname>
          </string-name>
          .
          <source>Relational Query Coprocessing on Graphics Processors. TODS</source>
          ,
          <volume>34</volume>
          :21:
          <fpage>1</fpage>
          -
          <lpage>21</lpage>
          :
          <fpage>39</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Heimel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kiefer</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Markl</surname>
          </string-name>
          .
          <article-title>Self-Tuning, GPU-Accelerated Kernel Density Models for Multidimensional Selectivity Estimation</article-title>
          . SIGMOD, pages
          <fpage>1477</fpage>
          -
          <lpage>1492</lpage>
          . ACM,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>T.</given-names>
            <surname>Karnagel</surname>
          </string-name>
          , R. Mu¨ller, and
          <string-name>
            <given-names>G. M.</given-names>
            <surname>Lohman. Optimizing</surname>
          </string-name>
          GPU-accelerated Group-By and
          <article-title>Aggregation</article-title>
          .
          <source>In ADMS</source>
          , pages
          <fpage>13</fpage>
          -
          <lpage>24</lpage>
          . ADMS,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>V.</given-names>
            <surname>Leis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gubichev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mirchev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Boncz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kemper</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T.</given-names>
            <surname>Neumann. How Good Are Query Optimizers</surname>
          </string-name>
          ,
          <source>Really? PVLDB</source>
          ,
          <volume>9</volume>
          (
          <issue>3</issue>
          ):
          <fpage>204</fpage>
          -
          <lpage>215</lpage>
          , Nov.
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>L. F.</given-names>
            <surname>Mackert</surname>
          </string-name>
          and
          <string-name>
            <given-names>G. M.</given-names>
            <surname>Lohman</surname>
          </string-name>
          . R*
          <article-title>Optimizer Validation and Performance Evaluation for Distributed Queries</article-title>
          . VLDB, pages
          <fpage>149</fpage>
          -
          <lpage>159</lpage>
          . Morgan Kaufmann,
          <year>1986</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>A.</given-names>
            <surname>Meister</surname>
          </string-name>
          .
          <article-title>GPU-accelerated join-order optimization</article-title>
          .
          <source>VLDB PhD workshop</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>A.</given-names>
            <surname>Meister</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Breß</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Saake. Toward</surname>
          </string-name>
          GPU-accelerated
          <source>Database Optimization. Datenbank-Spektrum</source>
          ,
          <volume>15</volume>
          (
          <issue>2</issue>
          ):
          <fpage>131</fpage>
          -
          <lpage>140</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>G.</given-names>
            <surname>Moerkotte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Fender</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Eich</surname>
          </string-name>
          .
          <article-title>On the Correct and Complete Enumeration of the Core Search Space</article-title>
          . SIGMOD, pages
          <fpage>493</fpage>
          -
          <lpage>504</lpage>
          . ACM,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>T.</given-names>
            <surname>Neumann</surname>
          </string-name>
          .
          <article-title>Engineering High-Performance Database Engines</article-title>
          . PVLDB,
          <volume>7</volume>
          (
          <issue>13</issue>
          ):
          <fpage>1734</fpage>
          -
          <lpage>1741</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Owens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Luebke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Govindaraju</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Harris</surname>
          </string-name>
          , J. Kru¨ger,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lefohn</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T. J.</given-names>
            <surname>Purcell</surname>
          </string-name>
          . A Survey of
          <article-title>General-Purpose Computation on Graphics Hardware</article-title>
          .
          <source>Computer Graphics Forum</source>
          ,
          <volume>26</volume>
          (
          <issue>1</issue>
          ):
          <fpage>80</fpage>
          -
          <lpage>113</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>P.</given-names>
            <surname>Pospichal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Schwarz</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Jaros</surname>
          </string-name>
          .
          <source>Parallel Genetic Algorithm Solving 0/1 Knapsack Problem Running on the GPU. MENDEL</source>
          , pages
          <fpage>64</fpage>
          -
          <lpage>70</lpage>
          . Brno University of Technology,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>P.</given-names>
            <surname>Rogers</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Macri</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Marinkovic</surname>
          </string-name>
          .
          <source>AMD heterogeneous Uniform Memory Access</source>
          .
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>S.</given-names>
            <surname>Ryoo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. I.</given-names>
            <surname>Rodrigues</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. S.</given-names>
            <surname>Baghsorkhi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. S.</given-names>
            <surname>Stone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. B.</given-names>
            <surname>Kirk</surname>
          </string-name>
          , and W.-m. W. Hwu.
          <article-title>Optimization Principles and Application Performance Evaluation of a Multithreaded GPU Using CUDA</article-title>
          .
          <source>PPoPP</source>
          , pages
          <fpage>73</fpage>
          -
          <lpage>82</lpage>
          . ACM,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>W.</given-names>
            <surname>Scheufele</surname>
          </string-name>
          and
          <string-name>
            <given-names>G.</given-names>
            <surname>Moerkotte</surname>
          </string-name>
          .
          <article-title>On the Complexity of Generating Optimal Plans with Cross Products (Extended Abstract)</article-title>
          .
          <source>PODS</source>
          , pages
          <fpage>238</fpage>
          -
          <lpage>248</lpage>
          . ACM,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>P. G.</given-names>
            <surname>Selinger</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. M. Astrahan</surname>
            ,
            <given-names>D. D.</given-names>
          </string-name>
          <string-name>
            <surname>Chamberlin</surname>
            ,
            <given-names>R. A.</given-names>
          </string-name>
          <string-name>
            <surname>Lorie</surname>
            , and
            <given-names>T. G.</given-names>
          </string-name>
          <string-name>
            <surname>Price</surname>
          </string-name>
          .
          <article-title>Access Path Selection in a Relational Database Management System</article-title>
          .
          <source>SIGMOD</source>
          , pages
          <fpage>23</fpage>
          -
          <lpage>34</lpage>
          . ACM,
          <year>1979</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>E. J.</given-names>
            <surname>Shekita</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. C.</given-names>
            <surname>Young</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.-L.</given-names>
            <surname>Tan</surname>
          </string-name>
          <article-title>. Multi-Join Optimization for Symmetric Multiprocessors</article-title>
          . VLDB, pages
          <fpage>479</fpage>
          -
          <lpage>492</lpage>
          . Morgan Kaufmann Publishers,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>M.</given-names>
            <surname>Steinbrunn</surname>
          </string-name>
          ,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <article-title>Moerkotte, and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Kemper</surname>
          </string-name>
          .
          <article-title>Heuristic and Randomized Optimization for the Join Ordering Problem</article-title>
          .
          <source>VLDB Journal</source>
          ,
          <volume>6</volume>
          (
          <issue>3</issue>
          ):
          <fpage>191</fpage>
          -
          <lpage>208</lpage>
          , Aug.
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>B.</given-names>
            <surname>Vance</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Maier</surname>
          </string-name>
          .
          <article-title>Rapid Bushy Join-order Optimization with Cartesian Products</article-title>
          . SIGMOD, pages
          <fpage>35</fpage>
          -
          <lpage>46</lpage>
          . ACM,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>M.</given-names>
            <surname>Zukowski</surname>
          </string-name>
          , M. van de Wiel, and
          <string-name>
            <given-names>P.</given-names>
            <surname>Boncz</surname>
          </string-name>
          .
          <article-title>Vectorwise: A Vectorized Analytical DBMS</article-title>
          . ICDE, pages
          <fpage>1349</fpage>
          -
          <lpage>1350</lpage>
          . IEEE,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>