Ring
Repository for the source code of the engine presented in the paper Worst-case Optimal Graph Joins in Almost No Space.
Instructions
To run our code, we have to install an extended version of the library SDSL. You can find the library and the instructions to install it in our webpage.
After the extended version of SDSL is installed, we have to clone this repository and follow these steps:
- Create our
build
folder and compile the code:
mkdir build
cd build
cmake ..
make
Check that there is no errors.
- Download the version of Wikidata that you want to use:
- Wikidata Filtered (about 80M triples).
- Wikidata (about 1000M triples). Note that this file is compressed.
Now put the .dat file inside a folder.
- Building the index. After compiling the code we should have an executable called
build-index
inbuild
. Now run:
./build-index <absolute-path-to-the-.dat-file> <type-ring>
<type-ring>
can take two values: ring
or c-ring
. Both are implementations of our ring index but using plain and compressed bitvectors, respectively.
This will generate the index in the folder where the .dat
file is located. The index is suffixed with .ring
or .c-ring
according to the second argument.
- Querying the index. In
build
folder, you should find another executable file calledquery-index
. To solve the queries you should run:
./query-index <absoulute-path-to-the-index-file> <absolute-path-to-the-query-file>
Note that the second argument is the path to a file that contains all the queries. The queries of our benchmark are in Queries
:
- The file
Queries-wikidata-benchmark.txt
can be run withwikidata-filtered-enumerated.dat
. - The file
Queries-bgps-limit1000.txt
contains the queries ofwikidata-enumerated.dat
.
After running that command, you should see the number of the query, the number of results, and the elapsed time of each one of the queries with the following format:
<query number>;<number of results>;<elapsed time>
At the moment, we can find the rest of the complementary material at this webpage. Note that we will find instructions to run the code there, and although the instructions are different from the ones in this repository, they should work too.