Install and load
Run these commands in a Haybarn SQL session. The extension is available from the community repository.
INSTALL gpudb FROM community;
LOAD gpudb FROM community;
Using upstream DuckDB? Follow the maintainer’s installation instructions.
Usage example
which processor will run, and what this build can do
-- which processor will run, and what this build can do
SELECT gpu_build_info();
-- make a (key, value) pair resident on the GPU once ...
CREATE TABLE sales AS
SELECT (range % 1000)::BIGINT AS store, (range * 7 % 10007)::BIGINT AS amount
FROM range(10000000);
SELECT gpu_upload_pair('sales_by_store', store, amount) FROM sales;
-- ... then ask as often as you like: GROUP BY, HAVING and top-k run on the device
-- top 5 stores by sum(amount): (store, sum, count)
SELECT * FROM gpu_groupby_sum_resident_topk('sales_by_store', 5, 'desc');
-- backend, rows, wall time and kernel time of the last call
SELECT gpu_last_stats();
Provided by singhpratech. Not yet verified on Haybarn 2.0.0.
Sample data & setupAbout this extension
gpudb is DuckDB plus a GPU. You write the SQL you already write. A statement is answered by the GPU when that has been measured to be faster for its shape and size on your machine, and by DuckDB — untouched, at its usual speed — otherwise. Rows, column names and column types are identical either way.
Two rules hold everywhere and are enforced by the test gates the project ships:
Project overview from the community descriptor.
Documentation and resources
Project and build details
- Repository
- singhpratech/duckdbgpumetaldbram
- License
- Apache-2.0
- Maintainers
- singhpratech
- Written in
- C++
- Build source
b712f4b7624b- Build definition
- Community descriptor