|
Multi-core Hash Joins
Main-memory hash join implementations for multi-core CPUs
|
Typedefs | |
| typedef struct arg_t | arg_t |
Functions | |
| void | allocate_hashtable (hashtable_t **ppht, uint32_t nbuckets) |
| void | destroy_hashtable (hashtable_t *ht) |
| void | build_hashtable_st (hashtable_t *ht, relation_t *rel) |
| int64_t | probe_hashtable (hashtable_t *ht, relation_t *rel, void *output) |
| result_t * | NPO_st (relation_t *relR, relation_t *relS, int nthreads) |
| void | build_hashtable_mt (hashtable_t *ht, relation_t *rel, bucket_buffer_t **overflowbuf) |
| void * | npo_thread (void *param) |
| result_t * | NPO (relation_t *relR, relation_t *relS, int nthreads) |
Definition at line 88 of file no_partitioning_join.c.
| void allocate_hashtable | ( | hashtable_t ** | ppht, |
| uint32_t | nbuckets | ||
| ) |
Allocates a hashtable of NUM_BUCKETS and inits everything to 0.
| ht | pointer to a hashtable_t pointer |
Not an elegant way of passing whether we will numa-localize, but this feature is experimental anyway.
Definition at line 183 of file no_partitioning_join.c.
| void build_hashtable_mt | ( | hashtable_t * | ht, |
| relation_t * | rel, | ||
| bucket_buffer_t ** | overflowbuf | ||
| ) |
Multi-thread hashtable build method, ht is pre-allocated. Writes to buckets are synchronized via latches.
| ht | hastable to be built |
| rel | the build relation |
| overflowbuf | pre-allocated chunk of buckets for overflow use. |
Definition at line 427 of file no_partitioning_join.c.
| void build_hashtable_st | ( | hashtable_t * | ht, |
| relation_t * | rel | ||
| ) |
Single-thread hashtable build method, ht is pre-allocated.
| ht | hastable to be built |
| rel | the build relation |
Definition at line 231 of file no_partitioning_join.c.
| void destroy_hashtable | ( | hashtable_t * | ht | ) |
Releases memory allocated for the hashtable.
| ht | pointer to hashtable |
Definition at line 218 of file no_partitioning_join.c.
| result_t * NPO | ( | relation_t * | relR, |
| relation_t * | relS, | ||
| int | nthreads | ||
| ) |
Definition at line 592 of file no_partitioning_join.c.
| result_t * NPO_st | ( | relation_t * | relR, |
| relation_t * | relS, | ||
| int | nthreads | ||
| ) |
The No Partitioning Join Optimized (NPO) as a single-threaded implementation. Just returns the number of result tuples.
| relR | input relation R - inner relation |
| relS | input relation S - outer relation |
Definition at line 357 of file no_partitioning_join.c.
| void * npo_thread | ( | void * | param | ) |
Just a wrapper to call the build and probe for each thread.
| param | the parameters of the thread, i.e. tid, ht, reln, ... |
Definition at line 492 of file no_partitioning_join.c.
| int64_t probe_hashtable | ( | hashtable_t * | ht, |
| relation_t * | rel, | ||
| void * | output | ||
| ) |
Probes the hashtable for the given outer relation, returns num results. This probing method is used for both single and multi-threaded version.
| ht | hashtable to be probed |
| rel | the probing outer relation |
| output | chained tuple buffer to write join results, i.e. rid pairs. |
Definition at line 280 of file no_partitioning_join.c.