<!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>An In-depth Investigation of Large-scale RDF Relational Schema Optimizations Using Spark-SQL</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mohamed Ragab</string-name>
          <email>mohamed.ragab@ut.ee</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Feras M. Awaysheh</string-name>
          <email>feras.awaysheh@ut.ee</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Riccardo Tommasini</string-name>
          <email>riccardo.tommasini@ut.ee</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Juan Carlos Ramos</string-name>
          <email>jramos@ut.ee</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Data Systems Group, University of Tartu</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper discusses one of the most significant challenges of large-scale RDF data processing over Apache Spark, the relational schema optimization. The choice of RDF partitioning techniques and storage formats using SparkSQL significantly impacts query performance. The impact of the relational schemas and the underlying data storage formats is indisputable; they significantly afect the query performance. Nevertheless, the trade-ofs in different configurations have not been a subject of intensive study in the literature. This paper presents an in-depth investigation for practitioners to understand such trade-ofs and their best practices. It also reports on the pitfalls behind the implementation SPARQL optimizations over SparkSQL. Our experiments provide insights into these schemas' relative strengths by comparing three diferent partitioning techniques and four other storage formats. Our results draw a better understanding of the current State-Of-The-Art (S.O.T.A) and pave the way for a wide range of best practices and systematically tuning the performance of distributed systems to handle vast RDF data.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Currently, we are witnessing an enormous amount of widely
available RDF datasets [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]. Centralized RDF engines, e.g.,
RDF3X [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and gStore [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ], provide native ways for
processing/querying RDF datasets with the full expressive capabilities of
SPARQL. Yet, they can not handle large-scale RDF datasets
efectively [
        <xref ref-type="bibr" rid="ref2 ref9">2, 9</xref>
        ]. The need for processing large RDF datasets calls for
innovative solutions to store, analyze, and query these massive
RDF datasets [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. This call leads the community to leverage Big
Data (BD) processing frameworks like Apache Spark [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] to
process large RDF datasets [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        BD platforms excel in the analytical processing of relational
data. The literature includes several attempts that leverage such
capabilities to analyze RDF data [
        <xref ref-type="bibr" rid="ref17 ref2">2, 17</xref>
        ]. In practice, utilizing
BD engines for RDF relational processing requires storing RDF
data using a relational schema and translating SPARQL queries
into equivalent SQL ones. On the same note, BD platforms are
designed to scale horizontally [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. However, the choice of the
right schema can significantly impact the performance of query
processing [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. Moreover, choosing the right partitioning
technique also returns with variant query runtime performance [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
In this regard and from a BD perspective, we cannot ignore the
variety of data formats [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Given the complexity of the
solution space, i.e., relational schema, partitioning technique, storage
format, current works focus on one dimension at a time.
However, the relevance of a comprehensive analysis of the trade-ofs
among these dimensions is of paramount importance [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] yet is
still missing.
      </p>
      <p>
        In this paper, we try to fill this research gap by
experimentally evaluating SPARQL on top of SparkSQL. In particular, our
analysis focuses on existing RDF relational schemas and their
state-of-the-art improvements. To this end, we present a
systematic and comparative evaluation of the query performance
considering (i) ℎ RDF partitioning techniques (most
suitable for relational nature of data in Spark-SQL), i.e., Horizontal,
Subject-based, and Predicate-based partitioning and (ii)  
different well-established storage formats, i.e., ORC, CSV, Parquet,
and Avro [
        <xref ref-type="bibr" rid="ref15 ref16">15, 16</xref>
        ]. In this way, our work difers from previous
ones [
        <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
        ] that only focus on the complexity of the workloads
and the size of the data.
      </p>
      <p>The contribution of this paper is threefold. (i) First, it uses
SparkSQL to validate the performance of RDF schema
advancements (i.e. ExtVP and WPT ) compared to their baseline opponents
(i.e PT, and VP). (ii) Second, it empirically analyzes the efect of
partitioning techniques on the ExtVP and WPT schema runtime
performance. (iii) Third, it tests the efects of multiple distributed
storage row and columnar-oriented file formats on HDFS. Finally,
it outlines the best practices and recommendations that help
in achieving the best RDF query performance. Overall, the
paper findings guide the realization of next-generation large-scale
RDF solutions over Apache Spark by optimizing the relational
schemas.</p>
      <p>The remainder of the paper is organized as follows: section 2
presents an overview of the required background information
and key concepts necessary to understand our study. Section 3
discusses the experimental methodology. Section 4 presents the
benchmarking scenario and the experimental setup. Section 5
presents the paper results, while we provide a comprehensive
discussion in section 6. Section 7 presents the related work,
positioning this paper in the context of other survey on RDF
processing using BD frameworks. Finally, section 8 concludes the paper
and presents future works.
2</p>
    </sec>
    <sec id="sec-2">
      <title>BACKGROUND</title>
      <p>In this section, we present the information that is necessary to
understand the content of this paper. We assume that the reader
is familiar with the RDF data model and the SPARQL query
language.
2.1</p>
    </sec>
    <sec id="sec-3">
      <title>Apache Spark &amp; SparkSQL</title>
      <p>
        Apache Spark is currently the de-facto BD engine [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ]. It is one
of the most active and widely-used large-scale data processing
systems in both industry and academia [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. It mainly adopts
in-memory distributed computing of large scale data analytics.
      </p>
      <p>
        SparkSQL is a relational package built on top of Apache Spark
[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] with support for the SQL interface while providing capabilities
for structured and semi-structured data.
2.2
      </p>
    </sec>
    <sec id="sec-4">
      <title>RDF Relational Schema</title>
      <p>The most intuitive approach to follow for representing RDF into
a relational structure is the Single Statement Table Schema (ST),
which requires storing RDF datasets in a single triples table of
three columns that represent components of the RDF triple, i.e.,
Subject, Predicate, and Object. This solution is the simplest, and
it is commonly adopted by several existing open-source RDF
triplestores, e.g., Apache Jena, RDF4J, and Virtuoso. However, it
inevitably increases the number of required self-joins for long
chains SPARQL query evaluation when they run on top of
relational SQL systems.</p>
      <sec id="sec-4-1">
        <title>Vertically Partitioned Tables Schema (VP) is an RDF stor</title>
        <p>
          age schema proposed to mitigate the performance issues of the ST
schema. It aims to speed up the queries over RDF triple stores [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
This schema is simple to design; the RDF triples table is
decomposed into a table of two columns (Subject, Object) for each unique
property in the RDF dataset.
        </p>
        <p>
          Extended Vertical Partitioning schema (ExtVP) is a
querydriven optimization that aims at minimizing the input size of
the data during query evaluation [
          <xref ref-type="bibr" rid="ref22">22</xref>
          ], inspired by the semi-Join
reductions. In particular, ExtVP minimizes data skewness and
eliminates dangling triples (i.e. triples that do not have a joining
partner or do not contribute to any join in the SPARQL query)
from the input tables. ExtVP speeds up query answering by
precomputing the possible join relations between the VP tables and
materializing the results of these semi-joins as tables in the
storage backend, e.g. HDFS. Particularly, for every two VP relations
ExtVP relies on pre-computing semi-join reductions of
SubjectSubject (SS), Subject-Object (SO), and Object-Subject (OS) join
patterns. The output tables are reduced in size and will be used
in joins instead of the original VP tables. However, one of the
limitations of the ExtVP schema is the additional storage
overhead of the materialized ExtVP tables in comparison to the VP
schema tables (cf. Table 1).
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Property (n-ary) Tables Schema (PT) is a storage schema</title>
        <p>
          proposed to cluster multiple RDF properties as n-ary table columns
for the same subject to group entities that are similar in structure.
The biggest advantage of property tables compared to a single
triples table schema (ST) is that they can reduce the number of
subject-subject self-joins that result from star-shaped patterns in a
SPARQL query. Whereas, one of the limitations of the PT schema
is that it works quite well with the highly structured RDF data.
However, its performance degrades for the poorly structured
ones [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ]. Furthermore, typical RDF comes with diverse
structures, which make it virtually hard to define an optimal layout
of this schema [
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]. Moreover, a poorly-selected property table
layout can significantly slow down the query performance [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
Due to its sparse-tables representation nature, PT schema also
sufers from high storage overheads when a large number of
predicates is present in the RDF data model [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
        </p>
      </sec>
      <sec id="sec-4-3">
        <title>Wide Property Table Schema (WPT) represents the whole</title>
        <p>
          RDF dataset into a single unified table [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ]. Such table uses all
RDF properties in the dataset as columns. It aims at extending the
PT schema for optimizing star-shaped SPARQL queries, which
are highly common in the SPARQL query workloads. Therefore,
star-shaped SPARQL queries will require no joins to be answered.
Moreover, this schema does not require any kind of clustering
algorithm that is likely to produce sub-optimal schemas for an
arbitrary RDF dataset. Unfortunately, WPT does not overcome
all the limitations of the PT schema. Indeed, this representation
can also be very sparse for poorly structured data, and it may
face a large storage overhead, especially with many multi-valued
properties existing in the RDF dataset.
2.3
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>RDF Data Partitioning</title>
      <p>
        For RDF data processing, many partitioning techniques exist [
        <xref ref-type="bibr" rid="ref2 ref4">2,
4</xref>
        ]. In the following, we present the partitioning techniques that
are suitable for our experiments on SparkSQL.
      </p>
      <sec id="sec-5-1">
        <title>Horizontal-Based Partitioning (HP) requires dividing the</title>
        <p>RDF dataset evenly (as much as possible) on the number of
machines in the cluster. In particular, we use this technique to
partition the relational RDF tables of the diferent schemas
horizontally into even  chunks(i.e partitions) over the cluster machines.</p>
      </sec>
      <sec id="sec-5-2">
        <title>Subject-Based Partitioning(SBP) requires the distribution</title>
        <p>of triples into partitions according to the hash value computed
for the RDF subjects. As a result, all the triples that have the
same subject are assumed to reside on the same partition. In our
scenario, we applied spark partitioning using the subject as the
partitioning key with our diferent relational schema tables (i.e
DataFrames).</p>
      </sec>
      <sec id="sec-5-3">
        <title>Predicate-Based Partitioning (PBP) is similar to the SBP,</title>
        <p>it distributes triples to the various partitions based on the hash
value computed for the predicate. Similarly, all the triples that
have the same predicate are assumed to reside on the same
partition. We also applied the Spark partitioning using the predicate
as the partitioning key with our diferent relational schemas
Dataframes.</p>
        <p>
          Baseline partitioning (BP): In our experiments, we also used
the baseline partitioning technique that basically depends on the
native default partitioning of HDFS of the tables files over the
cluster nodes. This is the technique used in the state-of-the-art
works of the schema advancements [
          <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
          ].
3
        </p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>EVALUATION METHODOLOGY</title>
      <p>
        In this section, we discuss the experimental methodology that
we used for the reproducibility of the state-of-the-art findings [
        <xref ref-type="bibr" rid="ref21 ref22 ref6">6,
21, 22</xref>
        ] that imply some changes in the experimental artifacts, we
organize our experiments as follows.
      </p>
      <p>
        First, we assess if we can reproduce the state-of-the-art
results of those schema optimizations over the baseline relational
schemas performance. Thus, we performed our experiments in
a setup as similar as possible to what the original authors have
done [
        <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
        ]. In this regard, we use the baseline HDFS
partitioning technique. We also use Parquet as our baseline storage file
format (grey shaded boxes cf. Figure 1).
      </p>
      <p>Second, we introduce disturbing factors to our experiments,
such as the diferent partitioning techniques, and diferent file
formats alongside diferent SPARQL query shapes.</p>
      <p>Regarding the data partitioning, we introduce the Horizontal
Partitioning technique and Subject-based partitioning for the
WPT and PT schema experiments.On the other hand,
Horizontal, Subject and Predicate-based partitioning techniques were
used for the VP and ExtVP schema experiments. We expect that
these partitioning techniques will negatively impact the
performance of SparkSQL when evaluating SPARQL queries due tothe
distribution of the relational table across nodes. This will force
more shufling in the presence of joins. In particular,
Horizontal partitioning should have a worse impact than Subject-based
partitioning on PT and WPT schemas, and Predicated-based on
(Ext)VP ones. It worth mentioning that the HP technique does
not take the query shape into account and possibly place these
rows in diferent nodes.</p>
      <p>
        Regarding the storage of file formats besides the baseline
Parquet, we consider an additional columnar one, i.e., ORC, and two
row-oriented ones, i.e., CSV and Avro. We expect columnar
formats to perform better for the queries with a subset of column
projections, since they allow an eficient scan of tables by reading
only a portion of columns [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. In action, SP2Bench has a small
number of column projections across all its benchmark queries.
      </p>
      <p>Finally, aiming to draft our observations, primary findings,
and propose best practices, we discuss and analyze our results.
Additionally, we highlight the trade-ofs of combining all these
dimensions in the discussion section.</p>
      <p>Moreover, we aim to observe these optimizations’ impact on
the large SPARQL query performance on the SparkSQL engine.
Mostly, we want to verify and answer the following questions:
(1) How far do RDF partitioning techniques and storage
formats impact the query performance?
(2) How can we systematically analyze diferent relational
schemas? How can these schemas efectively improved to
achieve the highest performance?
(3) What are the best practices that guide the large RDF
community eforts in adopting performance-oriented
solutions?</p>
    </sec>
    <sec id="sec-7">
      <title>4 BENCHMARK &amp; EXPERIMENTAL SETUP</title>
      <p>
        This section outlines the paper experiment setup and the used
benchmark with its queries. The experimental setups (presented
in Figure 1) summarizes the configuration combinations (
Relational schema, Partitioning, Storage). The triangle with X
represents that we have performed our experiments for 4 diferent
relational schemas, partitioning each schema across 4 various
relational techniques, i.e one baseline HDFS, and other 3
RDFspecific techniques. Last but not least, those schemas are stored
across 4 diferent storage formats. In detail:
Benchmark &amp;Dataset: In our evaluation, we used the SP2Bench
(SPARQL Performance Benchmark) [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ]. SP2Bench has a
reasonable low score of data structuredness, making it closer to the
structure of real-world RDF datasets [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. So, it is valid to state
that, to the best of our understanding, SP2Bench meets a wide
spectrum of queries and answers well the main claims we are
investigating.
      </p>
      <p>Data Storage: We generated a synthetic RDF dataset with 100
triples size in Notation3 format. This scale size is enough for
checking the validity of the literature findings regarding the RDF
relational schemas optimizations, and maintaining the
reproducibility of them in a more complex solution space.
VP
8KB-1.9GB
-Total: 8.3GB
8KB-272MB
-Total: 1.7GB
8KB-249MB
-Total: 1.5GB
8KB-264MB
-Total: 1.6GB
Wide Property</p>
      <p>Tables
Property</p>
      <p>Tables
Ext. Vertical</p>
      <p>Tables
Vertical</p>
      <p>Tables
Relational
Schemata</p>
      <p>ExtVP
- OS (4.9GB) - SS (39GB)
- SO (806MB) -Total:∼45GB
- OS (359MB) - SS (8.8GB)
- SO (331MB) -Total:∼9.5GB
- OS (243MB) - SS (7.8GB)
- SO (301MB) -Total:∼8.4GB
- OS (319MB) - SS (8.4GB)
- SO (318MB) -Total:∼9GB</p>
      <p>Baseline</p>
      <p>HDFS
Horizontal</p>
      <p>Based
Subject
Based
Predicate</p>
      <p>Based
Partitioning
Technique</p>
      <p>The generated n3 RDF dataset is converted into CSV relational
schemas using Jena TDB 1, a disk-based access repository for
storing RDF datasets. We further used the Jena ARQ 2 for
querying these TDB datasets and generating the output schemas tables
in the CSV file format. Finally, these raw textual CSV documents
are loaded to the HDFS. Moreover, we have used the Spark
framework to write the relational schemas data tables from the CSV
format into the other HDFS file formats (Avro, Parquet, and ORC).
Table 1 shows the size of the generated native RDF dataset (i.e
11GB), as well as store sizes of each relational schema in the
mentioned diferent file formats on top of HDFS. It is clearly shown,
how the diferent relational schemas afect the input data sizes.</p>
      <sec id="sec-7-1">
        <title>1https://github.com/apache/jena/tree/master/jena-tdb 2https://github.com/apache/jena/tree/master/jena-arq</title>
        <p>In action, the PT schema has the smallest table sizes in total,
followed by the VP schema, then the WPT table schema. Whereas,
the largest storage overheads come with the ExtVP schema. We
can also notice how the storage formats afect the sizes of the
schemas significantly. In particular, columnar-oriented formats
have the minimum table sizes across all the schemas. Indeed, ORC
is shown to have the minimum table sizes, followed by Parquet.
While, the Avro row-oriented formats have quite larger schema
sizes, and CSV has the largest table sizes.</p>
        <p>
          Queries: SP2Bench queries have diferent complexities and a
high diversity of features [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ]. These queries implement
meaningful requests on top of RDF data. In our experiments, we reused the
SQL version of the queries associated with the SP2Bench
benchmark 3 for the mentioned RDF relational schemas. However, for
the new relational schema advancements (e.g. ExtVP, WPT) that
are missing on the benchmark website, we have manually
translated these queries into SQL, and we provide all these translated
queries in our project repository 4. We have evaluated all of these
11 queries of type SELECT, except 9, and 11 which are not
applicable (’NA’) for the PT and the WPT relational schemas.
7 is also not applicable in the VP and ExtVP schemas. Notably,
for generating the ExtVP tables, the default selectivity threshold
of 1 has been configured [
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]. Table 2 shows our benchmark
queries complexities, in terms of the number of joins, filters, and
projections, alongside the SPARQL query shape.
        </p>
        <p>Environment Setup: Our experiments were executed on a
baremetal cluster of 4 machines with CentOS-Linux V7 OS, running
on 32 cores per node processor, and 128 GB of memory per node,
alongside with a high speed 2 TB SSD drive for each node. We
used Spark V2.4 to fully support SparkSQL capabilities. In
particular, our Spark cluster consists of one master node and 3 worker
machines, while Yarn is used as the resource manager, which in
total uses 330 GB and 84 virtual processing cores.</p>
        <p>RDF Data Partitioning: We used Spark partitioners for
partitioning the registered relational schemas tables/Spark DataFrames.
This is required to persist those DataFrames on top of the HDFS
default file blocks partitioning level. We use the resulting Data
Frames as the input for the query engine. In our experiments, we
have the baseline HDFS partitioning (grey partitioning box cf. 1).
While other RDF partitioning techniques also have been tested,
namely HP, SBP, and PBP approaches. These techniques depend
on partitioning the tables’ data horizontally across machines
(i.e HP), or on the Spark key partitioning of the RDF subject or
predicate (i.e SBP, PBP respectively).</p>
        <sec id="sec-7-1-1">
          <title>Performance Evaluation measure (Latency): We used the</title>
          <p>Spark.time function by passing the spark.sql(...) query execution
function as a parameter to measure the query latency. We run the
experiments for all queries 5 times (excluding the first cold start
run time, to avoid the warm-up bias, and computed an average
of the other 4 run times).
5</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>EXPERIMENT RESULTS</title>
      <p>In this section, we discuss our experiment results. Also, we
compare the optimized relational schemas (i.e., WPT, and ExtVP)
against their baseline schemas, i.e., PT, and VP, respectively,
according to our methodology (cf. Section 3).</p>
      <p>PT
WPT
2
0
9
0
2
0
8
3
WPT vs. PT</p>
      <sec id="sec-8-1">
        <title>Baseline</title>
      </sec>
      <sec id="sec-8-2">
        <title>Horizontal</title>
      </sec>
      <sec id="sec-8-3">
        <title>Subject</title>
      </sec>
      <sec id="sec-8-4">
        <title>Avro</title>
        <p>
          2/9
2/9
2/9
7
3
CSV
2/9
3/9
2/9
6
3
ORC
8/9
6/9
6/9
9
10
Table 3 shows the SP2Bench queries’ number of joins when
translated into SQL concerning the PT and WPT schemas. Except for
8 (that requires many self-joins of the WPT table), the number
of joins always decreases, adopting the WPT schema. Moreover,
we expect that the WPT schema query performance (i.e., in terms
of latency) will outperform other relational schemas [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. In this
regard, the Parquet data format eficiently handles the sparsity
caused by the WPT table schema —as Null values are eficiently
ignored in this file format [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ].
        </p>
        <p>Meanwhile, Table 4 shows the overall benchmark results of
the WPT performance over PT schema across all file formats
(horizontally in the table), and across the diferent partitioning
techniques (vertically). Values in this table specify the number of
queries in which the WPT schema performs better than the
baseline PT schema. The green color indicates that WPT performing
the best, while the yellow color indicates that its performance is
above 50% over PT, and the red means that performance is less
than 50%.</p>
        <p>
          Our experiment results confirm that the WPT schema
performs better than the baseline PT schema in all the queries (i.e., 9
queries out of 9 queries in the benchmark) with Parquet file
format, alongside using the baseline HDFS partitioning technique.
Indeed, these results confirm the findings in [
          <xref ref-type="bibr" rid="ref21 ref6">6, 21</xref>
          ] assessing the
reproducibility regarding the WPT schema optimization.
        </p>
        <p>To investigate how the performance diference between the
WPT and PT schemas changes, we introduce two new dimensions,
i.e., various file formats and diferent partitioning techniques. In
this regard, Table 5 shows the efect of data partitioning ( left of
the table) and storage formats (right of the table) considering the
other new factors across all the experiments. To this extent, we
have calculated the percentages as follows, for the partitioning
factor’s impact, we pivoted on each partitioning technique and
counted the percentage of how much the WPT schema
performance in SparkSQL is better than the PT schema one across all
the queries while considering all the changes of the storage file
formats (moving across them). We calculated the partitioning
effect similarly but pivoting on the storage file format and moving
across the partitioning techniques in all of queries.</p>
        <p>Table 5 also demonstrates that in such a complex space of
diferent relational schema, data partitioning, and storage file
formats, the schema-based query optimization is not
straightforward. As we can see, WPT outperforms PT schema only for 58%
in the queries using only the baseline default HDFS partitioning
technique regarding the storage formats, and only 78% for the
3http://dbis.informatik.uni-freiburg.de/index.php?project=SP2B/queries.php
4https://datasystemsgrouput.github.io/SPARKSQLRDFBenchmarking/
avro
csv
orc
avro
csv
orc
csv
orc</p>
        <p>Parquet
Parquet file format. The determination of this result shows the
trade-of of considering alternative storage file formats and
partitioning techniques alongside the experiments’ query evaluation.</p>
        <p>Regarding the storage, we can see that ORC, another columnar
ifle format gives closer performance to our baseline columnar
Parquet file format with 74%. However, the baseline Parquet is
yet better, as Parquet is unlike ORC, can eficiently handle the
WPT table’s sparsity. Whereas, we can see that row-oriented
formats have a significant negative efect on the performance
of WPT. WPT schema performance is better than PT with only
22% and 25% in all Avro and CSV queries, respectively. In action,
SP2Bench queries only have one query (i.e., 2) with more than 2
column projections. This justifies why column-oriented formats
give better results for the WPT than the row-based ones. In
general, we can state that file formats afected the generalization
of the state-of-the-art results for the WPT schema.</p>
        <p>At last, we enroll in three specific queries, namely, 2, 4, and
8 , which well exemplify our findings. We selected these queries
as good representatives of our findings. There is a tremendous
performance enhancement in WPT over PT in 2 and 4. The
reason behind this refers to the number of SparkSQL joins of
WPT is significantly less than the joins in PT schema (cf. Table 3).
Particularly, in 2 number of joins in PT (SQL-version) is 9
compared to no-joins in WPT schema. While in 4 with PT schema,
we have 8 SQL joins in comparison to 3 self-joins of the WPT table.
Interestingly, we have more joins in WPT than the baseline PT
schema in 8, i.e., 10 self-joins, and 8 joins, respectively. Figure
2 (a), (b) and Figure 3 depict the performance of SparkSQL for
2, 4, and 8 respectively under a various combination of file
formats and partitioning techniques. In particular, these figures
combine the ratios of WPT being better than PT in those
mentioned queries. Ratios less than 1 indicate better performance of
WPT over PT in that query and across the diferent configuration
settings.</p>
        <p>Not surprisingly, we can notice that 8 is the only query that
witnesses worse performance for the WPT compared to the PT
schema. Figure 3 shows that most of the ratios of ’WPT over PT’
is greater than 1 in the baseline-partitioned data experiments
(i.e. only partitioned with HDFS), and other file formats instead
of Parquet. Notably, all the results (i.e., total query runtimes)
and query histograms can be found on our mentioned GitHub
repository.</p>
      </sec>
    </sec>
    <sec id="sec-9">
      <title>5.2 ExtVP VS. VP Schema Results</title>
      <p>
        According to [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ], ExtVP outperforms or at least has a similar
performance to the VP schema. The reason is that queries are
similar, and the number of SQL joins in the VP and ExtVP schemas
are the same. This clarification is reflected in Table 6. Indeed, the
performance improvement depends mainly on the percentage of
reductions in the input table sizes that the ExtVP optimization
might introduce out of the join correlations for each query [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ].
Table 6 also presents the percentage of ExtVP reductions of the
processed tables’ rows for each query over the original input
tables processed rows with the baseline VP tables. The semi-join
reductions provided by the ExtVP help speeding-up the
performance of SparkSQL by reducing the size of the shufled data.
      </p>
      <p>VP ExtVP Input tables data Size Red.</p>
      <p>Q1 2 2 58%
Q2 9 9 77%
Q3 1 1 59%
Q4 7 7 96%
Q5 5 5 60%
Q6 9 9 31%
Q8 9 &amp; 1 Union 9 &amp; 1 Union 5%
Q9 2 &amp; 1 Union 2 &amp; 1 Union 0%
Q10 1 Union 1 Union 0%</p>
      <p>
        Q11 0 0 0%
Table 6: Number of joins and percentage of input tables
sizes [Red]uctions after optimization ExtVP VS. VP.
1.4
VP 1.2
rvoe 1
PV 0.8
txE 0.6
foo 0.4
i
taR 0.2
0
1.4
VP 1.2
rveo 1
PV 0.8
txE 0.6
foo 0.4
i
taR 0.2
0
avro
csv
orc
avro
csv
orc
In more details, ExtVP optimizes specific queries according
to the correlations between triple patterns in those queries [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ],
namely, in Subject-to-Subject(SS), Object-to-Subject(OS), and
Subjectto-Object(SO) [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]. Thus, we expect some queries to give similar
results to the VP schema queries (i.e., No reductions occurred in
the VP tables by the ExtVP schema optimization). Notably, in our
experiments, 9,10, and 11 do not present any input data
reductions. Thus, we state that it is expected that their performance
to be very close to baseline VP performance.
      </p>
      <p>The same approach that has been adopted in WPT to PT
schemas performance comparison is also used for evaluating
the performance of ExtVP against the VP.</p>
      <p>First, we check if our experiments’ results confirm the
stateof-the-art regarding the ExtVP schema optimization over the
baseline VP schema performance.</p>
      <p>
        Table 7 (on the right) shows the total number of queries in
which the ExtVP performance is better than VP schema
performance across all the benchmark queries. For our baseline HDFS
partitioning technique, and with the Parquet file format, we can
see that some queries do not benefit from the optimizations of
the ExtVP. Indeed, 3 out of 10 queries fail to utilize the optimized
ExtVP technique. The reason behind such behavior is that those
queries have unbounded predicates that can not be optimized
by the ExtVP schema [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] (see 9 and 10 in Table 2), or they
have no efective join reductions (see 9,10,11 in Table 6).
The performance of these queries is a subject of discussion in
detail in the next sections.
      </p>
      <p>Second, similarly to what we have done for the WPT schema
optimization, we now investigate how generalizable the
stateof-the-art results are when we introduce diferent file formats
partitioning techniques over the data for both the ExtVP and VP
schemas.</p>
      <p>Similarly, Table 8 shows how far the data partitioning (left of
the table) and data formats (right of the table) impact the results
of ExtVP in comparison to VP schema performance. Notably, this
table’s percentage values are also calculated similarly to how
we have calculated the WPT against the PT. We pivoted on the
analysis dimension of choice, i.e., file format  or partitioning
technique  , and we calculated how many times SparkSQL
performs better using ExtVP than using the baseline VP approach.</p>
      <p>Regarding the partitioning techniques’ efect on ExtVP, our
expectations are confirmed. In particular, we can observe that
the partitioning techniques degraded the performance of ExtVP
significantly. Only, 35%, and 30% of the experiments adopting
Horizontal, and Subject-based partitioning respectively show a
performance improvement in using ExtVP over VP. Adopting</p>
      <sec id="sec-9-1">
        <title>ExtVP VS. VP Avro CSV ORC Parquet</title>
        <p>Baseline_Part 6/10 6/10 5/10 7/10
Horizontal_Part 3/10 3/10 3/10 3/10
Predicate_Part 2/10 3/10 6/10 6/10
Subject_Part 2/10 3/10 3/10 3/10
Table 7: Comparison of ExtVP schema with the VP schema
in diferent storage formats, and in diferent partitioning
techniques.</p>
        <sec id="sec-9-1-1">
          <title>ExtVP/VP</title>
        </sec>
        <sec id="sec-9-1-2">
          <title>Partitioning efect</title>
          <p>Baseline_Part
Horizontal
Predicate-bsed
Subject-based
67.5%
35%
55%
30%</p>
        </sec>
        <sec id="sec-9-1-3">
          <title>Storage efect</title>
          <p>Parquet
ORC
AVRO
CSV
55%
45%
42.5%
42.5%
Predicate-based partitioning slightly reduces this negative efect
(i.e., 55% of the queries show that performance improvement).</p>
          <p>From Table 8, we can also see that the ExtVP schema is only
outperforming the VP schema, with 67% of the queries using
the baseline HDFS partitioning scenario. Thus, we can see the
trade-of of considering various storage file formats. We can
see also that the baseline Parquet file format is the one that has
less impact on the overall performance for ExtVP. Indeed, in
55% of the cases where Parquet is used, ExtVP outperforms the
VP performance. Additionally, the ORC columnar file format
provides high performance of ExtVP over VP schema with an
overall 45%. However, there is a clear diference from the Parquet
ifle format with 10%.</p>
          <p>On the other hand, the row-oriented formats degrade the
performance of ExtVP. For only 42.5% of the experiments that adopt
either Avro or CSV, ExtVP performance beats the performance of
the VP schema. Such behavior is related to the number of column
projections in the SP2Bench queries, which are the minimum
in this benchmark scenario. Thus, columnar file formats can fit
such query workloads better than the row-oriented ones.</p>
          <p>Last but not least, herein the most notable query examples
are introduced, confirming our previous findings but with more
innumerable details. First, 4 is revealed to be the query with
the most benefit with the ExtVP optimization. The reason
behind this is that 4 includes a high number of joins (i.e., 7 joins),
and has the maximum number of input tables’ rows reductions
while using the ExtVP schema optimization with 96% of reduced
processed rows (cf. Table 6). This query is directly followed by
2 with 77%. Although 2 has a higher number of table joins
WPTH</p>
          <p>PTH
Q1 Q2 Q3 Q4 Q5 Q6 Q8 Q10 Q11
Q1 Q2 Q3 Q4 Q5 Q6 Q8 Q10 Q11
Q1 Q2 Q3 Q4 Q5 Q6 Q8 Q10 Q11
(a) CSV - Horizontal Partitioning
(b) CSV - Subject-based Partitioning
(c) Avro - Horizontal Partitioning
WPT</p>
          <p>PT
WPT</p>
          <p>PT
WPT</p>
          <p>PT
Q1 Q2 Q3 Q4 Q5 Q6 Q8 Q10 Q11
Q1 Q2 Q3 Q4 Q5 Q6 Q8 Q10 Q11
Q1 Q2 Q3 Q4 Q5 Q6 Q8 Q10 Q11
(d) Avro - Subject-based Partitioning
(e) ORC - Horizontal Partitioning
(f) ORC - Subject-based Partitioning
WPT</p>
          <p>PT
WPT</p>
          <p>
            PT
Q1 Q2 Q3 Q4 Q5 Q6 Q8 Q10 Q11
Q1 Q2 Q3 Q4 Q5 Q6 Q8 Q10 Q11
(g) Parquet - Horizontal Partitioning
(h) Parquet - Subject-based Partitioning
than 4, the reductions in input table sizes in 4 are more
significant. On the other side, 9, 10, and 11 do not benefit from
the ExtVP optimization, i.e., ExtVP does not provide any input
table size reductions. In particular, 9 and 10 have unbounded
predicate variables in the original SPARQL queries. ExtVP cannot
directly handle this type of queries[
            <xref ref-type="bibr" rid="ref22">22</xref>
            ]. While 11 has only a
single triple pattern, and thus it has no joins in optimizing the
ExtVP optimization approach. Figures 4 (a) and (b) show the
performance of SparkSQL for 4 and 9, respectively, under various
combination of formats and partitioning techniques in the ExtVP
experiments. Figure 4 (a) shows that 4 is always below the line
of all the other queries’ average runtimes. Whereas, ExtVP does
not show a remarkable diference over the VP schema in 9, i.e.,
they show pretty close performance to each other.
          </p>
          <p>In the next section, we discuss in further details the experiment
ifndings against the current S.O.T.A regarding the superiority of
ExtVP and PT.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-10">
      <title>6 DISCUSSION</title>
      <p>The paper helps to characterize and classify the RDF schemas
and their optimizations within the SparkSQL realm. It helps data
architects and practitioners interested in large scale RDF
better understanding the relational RDF schema’s potential using
diferent partitioning techniques and storage formats. This
understanding will lead to a better selection of the most suitable
and performance-optimized solution that adequately suits their
case. Doing so will also accommodate better design and
development of new SPARQL systems, leading to reliable RDF services
with high Spark performance. Taking our experiment findings
into consideration, herein, we discuss our results and give some
insights on processing RDF best practices at a large scale.</p>
      <p>Next, we place the literature assumptions on the relational
schema optimizations’ superiority against our experimental
findings. We follow this by recommendations to the large RDF
practitioners.</p>
    </sec>
    <sec id="sec-11">
      <title>6.1 Assumption: WPT always outperforms PT</title>
      <p>
        According to [
        <xref ref-type="bibr" rid="ref21 ref6">6, 21</xref>
        ], we expect that the performance of the WPT
schema outperforms the PT schema, especially with the
"starshaped" queries. Star-shaped queries can be answered when the
WPT table is queried with no-joins included. This assumption is
because all the properties relevant to the same subject are present
in the same row of the WPT table.
      </p>
      <p>The state-of-the-art findings of the WPT schema are fully
reproduced with the default HDFS partitioning and with using
the baseline Parquet file format. That is, the performance of
Spark using WPT schema for representing RDF dataset is always
outperforming the baseline PT schema.</p>
      <p>
        Nevertheless, our results show when we deviate from the
original setup [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] introducing new experimental factors, the solution
space increases in complexity. Consequently, the trade-ofs
between relational schema, partitioning techniques, and storage
formats make the WPT optimization reproducibility not
straightforward. Using other partitioning techniques alongside the baseline
Parquet format afected the reproducibility of the WPT schema
      </p>
      <p>ExtVP</p>
      <p>ExtVP</p>
      <p>VP
(j) CSV-Horizontal Partitioning
(k) CSV-Subject-based Partitioning
(l) CSV-Predicate-based Partitioning
optimizations. Only 78% of the queries results conform with the
fact that WPT is better than the PT schema (Table 5).</p>
      <p>Figure 5 aims to analyze the schemas performance when the
solution adopts diferent partitioning techniques and file formats.
Figures 5 (a-h) show clearly the efect of partitioning techniques
on the reproducibility of the WPT optimizations across all the
different file formats. For instance, notably the horizontal
partitioning (Figures 5 (a,c,e,g)) afected the performance of WPT, making
its performance in SparkSQL worse than the baseline PT schema
in most of the queries (i.e., 1,3,5,6,8,11). Similarly, we
can observe the negative efect of the subject-based technique
on WPT schema (Figures 5 (b,d,f,h)) in the same queries.</p>
      <p>The impact of file formats aside Parquet is even worse. Even
using the baseline (HDFS) partitioning technique afects the
reproducibility of the WPT schema optimizations. Overall, only
58% of the query results conforming with the fact that WPT is
outperforming PT schema (Table 5). The experiments show that
columnar file formats, e.g., ORC, and Parquet, are the best for
representing such wide tables (WPT and PT). Columnar file
formats are the best for sparse queries (i.e., queries with few column
projections or columns to access) out of the wide tables. They
perform better than the row-oriented file formats, e.g., CSV and
Avro, which would be only better with queries that require full
rows reading.</p>
      <p>Figure 5 shows the performance degradation considering
different file formats. For instance, moving from Parquet and ORC
in Figures 5 (e-h) to other row-oriented file formats such as Avro
and CSV in Figures 5 (a-d), we can notice the performance
degradation of the queries with the WPT schema optimizations.</p>
    </sec>
    <sec id="sec-12">
      <title>6.2 Assumption: ExtVP always outperforms VP</title>
      <p>
        According to [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ], we expect that ExtVP provides better or at
least similar performance gains, as the queries are similar, and the
number of SQL joins in the VP schema is equal to the ExtVP joins.
Nevertheless, one should keep in mind that ExtVP improvements
are mainly due to the original SPARQL query nature. It also
depends on the possible reductions in the table input data size and
excluding the dangling triples (rows that do not contribute to any
joins) [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]. Typically, ExtVP queries are similar to the VP ones;
the only diference realizes in the queried tables/DataFrames (i.e.,
their size reduced by ExtVP or their size are the same VP). Thus,
the relational engine’s performance, e.g., Spark with the ExtVP,
should be equivalent or better to its performance with the VP
schema.
      </p>
      <p>Based on our experiments, the findings of the ExtVP schema
are not fully reproduced, even considering the default HDFS
partitioning and the baseline Parquet file format. Some queries do
not benefit from the ExtVP optimizations ( 9, 10, 11),
notable input size reductions occurred in those queries), cf. Table 6.
Beyond those queries, we can confirm that the state-of-the-art
results (ExtVP performs better than VP in most cases). However,
our results show that the schema-based query optimization is
not straightforward in such a complex solution space.</p>
      <p>Regarding the partitioning techniques, using an alternative to
the baselines technique (HDFS) afects the reproducibility of the
ExtVP optimizations even if the storage format is Parquet. Only
55% of the queries results show that ExtVP is superior to the VP
schema (cf. Table 8). Moreover, Figure 6 shows the efect of other
RDF partitioning techniques on the reproducibility findings of
the ExtVP optimization. For instance, deviating from the baseline
partitioning technique to other RDF-based techniques with the
same baseline Parquet, i.e., Figures 6(a-c) degrades the results of
ExtVP and makes it perform worse than the baseline VP schema
in several queries (1, 4, 5, 6, 8) with the Horizontal and
Subject-based partitioning. The predicate-based partitioning in
Figure 6(c) has a better performance with this schema, which has
performance close to VP’s in the previously-mentioned queries.</p>
      <p>Similarly, using storage formats diferent from Parquet afects
the ExtVP optimizations’ reproducibility, even with the baseline
(HDFS) partitioning technique. Indeed, we have only 67.5% of
the queries results of ExtVP outperforming VP (cf. Table 8).
Similarly, Figure 6 shows the efect of other file formats other than
the baseline Parquet, i.e Figures 6 (d-l) for ORC, Avro, and CSV
respectively. We can notice the queries’ performance degradation
with the ExtVP schema optimizations moving vertically to these
other formats.</p>
      <p>Finally, from our experiments, we observe that columnar file
formats are better than the Row-oriented ones. However, the
performance diference is not significant with such similar schemas.
The table structure is the same table of two columns
Predicate (Subject-Object) in both vertical schemas. Moreover, both
schemas have not wide tables in comparison to the WPT and PT
schemas. That is, these schemas will not benefit a lot from the
columnar file formats. The performance gain of columnar over
the row-oriented file formats is because SP 2Bench queries have a</p>
      <sec id="sec-12-1">
        <title>Avro CSV ORC Parquet</title>
      </sec>
      <sec id="sec-12-2">
        <title>Baseline-HDFS ✓ ✓ ˜ ✓*</title>
      </sec>
      <sec id="sec-12-3">
        <title>Horizontal X X X X</title>
      </sec>
      <sec id="sec-12-4">
        <title>Subject-based X X X X</title>
      </sec>
      <sec id="sec-12-5">
        <title>Predicate-based X X ✓ ✓</title>
        <p>Where ✓is good practice, X is bad practice, and ˜ has the same
performance compared to VP.</p>
        <p>* ExtVP had a very competitive performance
few numbers of column projections. Thus, it would work better
with columnar rather than row-based file formats.
6.3</p>
      </sec>
    </sec>
    <sec id="sec-13">
      <title>Recommendations</title>
      <p>Overall, Tables 9 and 10 provides an abstracted map of good and
bad storage format and partitioning techniques.</p>
      <p>The results in Figure 5 and Table 9, show that partitioning
the WPT table has, in the majority, a negative efect on the WPT
optimization, making it perform even worse than its baseline
approach, i.e, the PT schema. The efect of the storage formats
is more significant in the WPT optimization (cf. Tables 5, 9).
Therefore, this WPT schema’s storage format selection decision
should be dealt with as a first-class citizen in such experiments.</p>
      <p>The horizontal and subject-based partitioning techniques are
not recommended with ExtVP optimization. However,
Predicatebased still gives better results than those two other RDF
partitioning techniques (cf. Tables 8 and 10). Also, columnar file
formats are still recommended with the ExtVP schema
optimization. However, it was noticed that the efect of the partitioning
is more significant to this optimization (cf. Figure 6, Tables 8,
and 10). Thus, the partitioning selection decision of this ExtVP
schema should be highly considered in these experiments.</p>
      <p>Also, our analysis yields the following recommendations
(1) With WPT, it is recommended to use the columnar storage
formats rather than row-oriented ones (cf. Table 9).
(2) With the WPT schema, Parquet is yet the best columnar
ifle format to select, it eficiently handles its sparsity.
(3) With WPT, it is recommended to use the native HDFS
partitioning, rather than selecting an RDF-oriented
partitioning technique.
(4) With ExtVP, the baseline HDFS partitioning is more
recommended than specific RDF ones. However, larger datasets
would require partitioning anyway.
(5) With ExtVP, the columnar file formats is a recommended
optimization.
7</p>
    </sec>
    <sec id="sec-14">
      <title>RELATED WORK</title>
      <p>
        In this section, we present the related work. In particular, we focus
on comparative studies that investigate the use of BD frameworks
for distributed RDF processing. To the best of our knowledge,
the literature includes several studies that compare partitioning
techniques, relational schemas, and storage formats [
        <xref ref-type="bibr" rid="ref14 ref2 ref6 ref8">2, 6, 8, 14</xref>
        ].
However, none of these approaches focus on replicating and
comparing existing optimization techniques.
      </p>
      <p>
        Abdelaziz et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] discussed several relational schemas for
materializing RDF datasets. Their main goal was to assess
diferent native and non-native RDF processing systems. However, it
does not discuss the impact of diferent relational schemas on a
specific system’s performance, such as SparkSQL; nor it discusses
partitioning techniques and data formats.
      </p>
      <p>
        Arrascue et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] lead an investigation on the performance
of the WPT schema against alternative relational schemas, i.e.,
triple tables, VP, and domain-dependent tables. Additionally, they
consider subject-based partitioning but limit the data formats
to Parquet. The work’s main finding is the flexibility of WPT
for generic query shapes in contrast with other approaches and
even considering partitioning. However, their exploration of the
solution space is limited in terms of partitioning techniques and
data formats.
      </p>
      <p>
        Cossu et al. [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] focused on a hybrid storage approach that
combines the benefits of PT and VP schemas to boost the query
performance without the need for extensive loading time. Their
solution, PROST, was able to outperform state of the art systems
like S2RDF for several query shapes. Nevertheless, their
exploration of partitioning techniques and data formats is limited.
Additionally, they focused their work on PT and VP schemas,
not considering WPT as an alternative schema that may further
improve the performance.
      </p>
      <p>
        On another side, Pham et al. results in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] indicates that more
than 95% of RDF dataset triples have tabular structure. They
combine structural non-quotient and statistical methods to
automatically discover and detect an emergent relational schema (in
the form of property tables) in RDF datasets. A similar approach
has been proposed in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] to mitigate the limitations of the WPT
and PT RDF schemata by merging the related hierarchical
characteristic sets and provide a novel RDF relational schema. The
aim of so doing is to provide a better SPARQL query evaluation.
      </p>
      <p>
        Finally, Akhter et al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], investigated the performance of
different partitioning techniques for RDF data, proposing a ranking
function that helps practitioners to choose the most appropriate
technique.
8
      </p>
    </sec>
    <sec id="sec-15">
      <title>CONCLUSIONS &amp; FUTURE WORK</title>
      <p>The reproducibility of well-known relational RDF processing
optimizations is critical to foster best practices that guide the
practitioners’ eforts. In this paper, we presented a comprehensive
empirical evaluation using three RDF partitioning techniques
and four storage formats over the distributed SparkSQL engine
to cope with this limitation. Our analysis demonstrates decisively
variant trade-ofs using diferent relational schemas, data
partitioning, and storage file formats against these state-of-the-art
optimizations. Our experiments show significant degradation
in Spark performance when partitioning by subject in the WPT
and partitioning horizontally due to the vast, sparse, and large
partitions of its schema table. On the same note, the storage
format also afects the WPT performance, where ORC and Parquet
are the most suitable representation of such configuration. Our
results on ExtVP illustrate that schema-based query optimization
is not straightforward using diferent configurations.</p>
      <p>Future work includes extending this study by analyzing the
impact of data scalability on SparQL performance. We intend to
utilize other RDF benchmarks such as WatDiv with diferent types
of query shapes and complexities. Our plans include investigating
this area further to design a benchmark that combines query
workloads with precise partitioning and storage instructions.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Daniel</surname>
            <given-names>J Abadi</given-names>
          </string-name>
          , Adam Marcus,
          <string-name>
            <surname>Samuel R Madden</surname>
            , and
            <given-names>Kate</given-names>
          </string-name>
          <string-name>
            <surname>Hollenbach</surname>
          </string-name>
          .
          <year>2007</year>
          .
          <article-title>Scalable semantic web data management using vertical partitioning</article-title>
          .
          <source>In VLDB.</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Ibrahim</given-names>
            <surname>Abdelaziz</surname>
          </string-name>
          , Razen Harbi, Zuhair Khayyat, and
          <string-name>
            <given-names>Panos</given-names>
            <surname>Kalnis</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>A survey and experimental comparison of distributed SPARQL engines for very large RDF data</article-title>
          .
          <source>Proceedings of the VLDB Endowment</source>
          <volume>10</volume>
          ,
          <issue>13</issue>
          (
          <year>2017</year>
          ),
          <fpage>2049</fpage>
          -
          <lpage>2060</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Giannis</given-names>
            <surname>Agathangelos</surname>
          </string-name>
          , Georgia Troullinou, Haridimos Kondylakis, Kostas Stefanidis, and
          <string-name>
            <given-names>Dimitris</given-names>
            <surname>Plexousakis</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>RDF Query Answering Using Apache Spark: Review and Assessment</article-title>
          .
          <source>In 34th IEEE International Conference on Data Engineering Workshops, ICDE Workshops</source>
          <year>2018</year>
          , Paris, France,
          <source>April 16-20</source>
          ,
          <year>2018</year>
          . IEEE Computer Society,
          <fpage>54</fpage>
          -
          <lpage>59</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Adnan</given-names>
            <surname>Akhter</surname>
          </string-name>
          ,
          <string-name>
            <surname>Axel-Cyrille Ngomo Ngonga</surname>
            , and
            <given-names>Muhammad</given-names>
          </string-name>
          <string-name>
            <surname>Saleem</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>An empirical evaluation of RDF graph partitioning techniques</article-title>
          .
          <source>In European Knowledge Acquisition Workshop</source>
          . Springer,
          <fpage>3</fpage>
          -
          <lpage>18</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Armbrust</surname>
          </string-name>
          , Reynold S. Xin, Cheng Lian, Yin Huai, Davies Liu, Joseph K. Bradley, Xiangrui Meng, Tomer Kaftan,
          <string-name>
            <given-names>Michael J.</given-names>
            <surname>Franklin</surname>
          </string-name>
          , Ali Ghodsi, and
          <string-name>
            <given-names>Matei</given-names>
            <surname>Zaharia</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <string-name>
            <surname>Spark</surname>
            <given-names>SQL</given-names>
          </string-name>
          :
          <article-title>Relational Data Processing in Spark</article-title>
          .
          <source>In SIGMOD Conference. ACM</source>
          ,
          <volume>1383</volume>
          -
          <fpage>1394</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Victor</given-names>
            <surname>Anthony Arrascue Ayala</surname>
          </string-name>
          , Polina Koleva, Anas Alzogbi, Matteo Cossu, Michael Färber, Patrick Philipp, Guilherme Schievelbein, Io Taxidou, and
          <string-name>
            <given-names>Georg</given-names>
            <surname>Lausen</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Relational schemata for distributed SPARQL query processing</article-title>
          .
          <source>In Proceedings of the International Workshop on Semantic Big Data. 1-6.</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Feras</surname>
            <given-names>M Awaysheh</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Mamoun</given-names>
            <surname>Alazab</surname>
          </string-name>
          , Maanak Gupta, Tomás F Pena, and José C Cabaleiro.
          <year>2020</year>
          .
          <article-title>Next-generation big data federation access control: A reference model</article-title>
          .
          <source>Future Generation Computer Systems</source>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Matteo</given-names>
            <surname>Cossu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Michael</given-names>
            <surname>Färber</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Georg</given-names>
            <surname>Lausen</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>PRoST: Distributed Execution of SPARQL Queries Using Mixed Partitioning Strategies</article-title>
          .
          <source>In Proceedings of the 21st International Conference on Extending Database Technology, EDBT</source>
          <year>2018</year>
          , Vienna, Austria, March
          <volume>26</volume>
          -29,
          <year>2018</year>
          ,
          <string-name>
            <surname>Michael</surname>
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Böhlen</surname>
          </string-name>
          , Reinhard Pichler, Norman May, Erhard Rahm,
          <string-name>
            <surname>Shan-Hung Wu</surname>
          </string-name>
          , and Katja Hose (Eds.).
          <source>OpenProceedings.org</source>
          ,
          <volume>469</volume>
          -
          <fpage>472</fpage>
          . https://doi.org/10.5441/002/edbt.
          <year>2018</year>
          .49
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>J.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Abadi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Ren</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>Scalable SPARQL querying of large RDF graphs</article-title>
          .
          <source>Proceedings of the VLDB Endowment</source>
          <volume>4</volume>
          (
          <year>2011</year>
          ),
          <fpage>1123</fpage>
          -
          <lpage>1134</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Todor</given-names>
            <surname>Ivanov</surname>
          </string-name>
          and
          <string-name>
            <given-names>Matteo</given-names>
            <surname>Pergolesi</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>The impact of columnar file formats on SQL-on-hadoop engine performance: A study on ORC and Parquet</article-title>
          .
          <source>Concurrency and Computation: Practice and Experience</source>
          (
          <year>2019</year>
          ),
          <year>e5523</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Todor</given-names>
            <surname>Ivanov</surname>
          </string-name>
          and
          <string-name>
            <given-names>Matteo</given-names>
            <surname>Pergolesi</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>The impact of columnar file formats on SQL-on-hadoop engine performance: A study on ORC and Parquet</article-title>
          .
          <source>Concurr. Comput. Pract. Exp</source>
          .
          <volume>32</volume>
          ,
          <issue>5</issue>
          (
          <year>2020</year>
          ). https://doi.org/10.1002/cpe.5523
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Marios</surname>
            <given-names>Meimaris</given-names>
          </string-name>
          , George Papastefanatos, and
          <string-name>
            <given-names>Panos</given-names>
            <surname>Vassiliadis</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>Hierarchical Property Set Merging for SPARQL Query Optimization.</article-title>
          .
          <source>In DOLAP</source>
          .
          <volume>36</volume>
          -
          <fpage>45</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>Thomas</given-names>
            <surname>Neumann</surname>
          </string-name>
          and
          <string-name>
            <given-names>Gerhard</given-names>
            <surname>Weikum</surname>
          </string-name>
          .
          <year>2010</year>
          .
          <article-title>The RDF-3X engine for scalable management of RDF data</article-title>
          .
          <source>The VLDB Journal 19</source>
          ,
          <issue>1</issue>
          (
          <year>2010</year>
          ),
          <fpage>91</fpage>
          -
          <lpage>113</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Minh-Duc</surname>
            <given-names>Pham</given-names>
          </string-name>
          , Linnea Passing, Orri Erling, and
          <string-name>
            <surname>Peter</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Boncz</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>Deriving an Emergent Relational Schema from RDF Data</article-title>
          .
          <source>In Proceedings of the 24th International Conference on World Wide Web, WWW</source>
          <year>2015</year>
          , Florence, Italy, May
          <volume>18</volume>
          -22,
          <year>2015</year>
          ,
          <string-name>
            <given-names>Aldo</given-names>
            <surname>Gangemi</surname>
          </string-name>
          , Stefano Leonardi, and Alessandro Panconesi (Eds.). ACM,
          <volume>864</volume>
          -
          <fpage>874</fpage>
          . https://doi.org/10.1145/2736277.2741121
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>Mohamed</surname>
            <given-names>Ragab</given-names>
          </string-name>
          , Riccardo Tommasini, Sadiq Eyvazov, and
          <string-name>
            <given-names>Sherif</given-names>
            <surname>Sakr</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>Towards making sense of Spark-SQL performance for processing vast distributed RDF datasets</article-title>
          .
          <source>In Proceedings of The International Workshop on Semantic Big Data. 1-6.</source>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <surname>Mohamed</surname>
            <given-names>Ragab</given-names>
          </string-name>
          , Riccardo Tommasini, and
          <string-name>
            <given-names>Sherif</given-names>
            <surname>Sakr</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Benchmarking Spark-SQL under Alliterative RDF Relational Storage Backends</article-title>
          . In QuWeDa@ISWC.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>Sherif</given-names>
            <surname>Sakr</surname>
          </string-name>
          .
          <year>2009</year>
          .
          <article-title>GraphREL: A Decomposition-Based and Selectivity-Aware Relational Framework for Processing Sub-graph Queries</article-title>
          .
          <source>In DASFAA.</source>
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>Sherif</given-names>
            <surname>Sakr</surname>
          </string-name>
          and
          <string-name>
            <given-names>Ghazi</given-names>
            <surname>Al-Naymat</surname>
          </string-name>
          .
          <year>2010</year>
          .
          <article-title>Relational processing of RDF queries: a survey</article-title>
          .
          <source>ACM SIGMOD Record 38</source>
          ,
          <issue>4</issue>
          (
          <year>2010</year>
          ),
          <fpage>23</fpage>
          -
          <lpage>28</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <surname>Sherif</surname>
            <given-names>Sakr</given-names>
          </string-name>
          , Angela Bonifati, Hannes Voigt, Alexandru Iosup, Khaled Ammar, Renzo Angles, Walid Aref, Marcelo Arenas, Maciej Besta,
          <string-name>
            <surname>Peter A Boncz</surname>
          </string-name>
          , et al.
          <year>2020</year>
          .
          <article-title>The Future is Big Graphs! A Community View on Graph Processing Systems</article-title>
          . arXiv preprint arXiv:
          <year>2012</year>
          .
          <volume>06171</volume>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>Muhammad</surname>
            <given-names>Saleem</given-names>
          </string-name>
          , Gábor Szárnyas, Felix Conrads, Syed Ahmad Chan Bukhari, Qaiser Mehmood, and
          <string-name>
            <surname>Axel-Cyrille Ngonga Ngomo</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>How Representative Is a SPARQL Benchmark? An Analysis of RDF Triplestore Benchmarks?</article-title>
          .
          <source>In The World Wide Web Conference. ACM</source>
          ,
          <volume>1623</volume>
          -
          <fpage>1633</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <surname>Alexander</surname>
            <given-names>Schätzle</given-names>
          </string-name>
          , Martin Przyjaciel-Zablocki,
          <string-name>
            <given-names>Antony</given-names>
            <surname>Neu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Georg</given-names>
            <surname>Lausen</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Sempala: Interactive SPARQL query processing on hadoop</article-title>
          .
          <source>In International Semantic Web Conference</source>
          . Springer,
          <fpage>164</fpage>
          -
          <lpage>179</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <surname>Alexander</surname>
            <given-names>Schätzle</given-names>
          </string-name>
          , Martin Przyjaciel-Zablocki,
          <string-name>
            <given-names>Simon</given-names>
            <surname>Skilevic</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Georg</given-names>
            <surname>Lausen</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>S2RDF: RDF querying with SPARQL on spark</article-title>
          .
          <source>Proceedings of the VLDB Endowment 9</source>
          ,
          <issue>10</issue>
          (
          <year>2016</year>
          ),
          <fpage>804</fpage>
          -
          <lpage>815</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Schmidt</surname>
          </string-name>
          , Thomas Hornung, Norbert Küchlin, Georg Lausen, and
          <string-name>
            <given-names>Christoph</given-names>
            <surname>Pinkel</surname>
          </string-name>
          .
          <year>2008</year>
          .
          <article-title>An Experimental Comparison of RDF Data Management Approaches in a SPARQL Benchmark Scenario</article-title>
          .
          <source>In International Semantic Web Conference (Lecture Notes in Computer Science)</source>
          , Vol.
          <volume>5318</volume>
          . Springer,
          <fpage>82</fpage>
          -
          <lpage>97</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Schmidt</surname>
          </string-name>
          , Thomas Hornung, Georg Lausen, and
          <string-name>
            <given-names>Christoph</given-names>
            <surname>Pinkel</surname>
          </string-name>
          .
          <year>2009</year>
          .
          <article-title>SPˆ2Bench: A SPARQL Performance Benchmark</article-title>
          .
          <source>In Proceedings of the 25th International Conference on Data Engineering, ICDE 2009, March 29 2009 - April 2</source>
          <year>2009</year>
          , Shanghai, China.
          <fpage>222</fpage>
          -
          <lpage>233</lpage>
          . https://doi.org/10.1109/ICDE.
          <year>2009</year>
          .28
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <surname>Matei</surname>
            <given-names>Zaharia</given-names>
          </string-name>
          , Reynold S. Xin, and
          <article-title>Patrick Wendell et</article-title>
          .al.
          <year>2016</year>
          .
          <article-title>Apache Spark: a unified engine for big data processing</article-title>
          .
          <source>Commun. ACM</source>
          <volume>59</volume>
          ,
          <issue>11</issue>
          (
          <year>2016</year>
          ),
          <fpage>56</fpage>
          -
          <lpage>65</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <surname>Lei</surname>
            <given-names>Zou</given-names>
          </string-name>
          , Jinghui Mo, Lei Chen,
          <string-name>
            <given-names>M Tamer</given-names>
            <surname>Özsu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Dongyan</given-names>
            <surname>Zhao</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>gStore: answering SPARQL queries via subgraph matching</article-title>
          .
          <source>Proceedings of the VLDB Endowment 4</source>
          ,
          <issue>8</issue>
          (
          <year>2011</year>
          ),
          <fpage>482</fpage>
          -
          <lpage>493</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>