PHPackages                             jakiboy/pducky - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. jakiboy/pducky

ActiveLibrary[Database &amp; ORM](/categories/database)

jakiboy/pducky
==============

Run fast SQL queries on massive datasets (CSV, JSON, and Parquet) powered by DuckDB.

0.2.0(9mo ago)4251MITPHPPHP &gt;=7.4CI passing

Since Nov 27Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/Jakiboy/pducky)[ Packagist](https://packagist.org/packages/jakiboy/pducky)[ Docs](https://github.com/Jakiboy/pducky)[ RSS](/packages/jakiboy-pducky/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Pducky
======

[](#pducky)

[![DuckDB PHP adapter](assets/banner.png)](#)

High-performance PHP adapter for [DuckDB](https://duckdb.org/) that executes SQL queries directly on massive datasets (CSV, JSON, Parquet) without preprocessing or imports. Features SQLite-compatible interface, FFI integration, and intelligent CSV parsing for zero-ETL analytics on files up to gigabytes in size.

Benchmark:
----------

[](#benchmark)

Tested with a large CSV dataset containing 1 million rows (**150 MB**) using PHP v8.3.

> **Note:** No optimizations were applied. The benchmark includes database creation from compressed CSV and query execution.

[![DuckDB PHP adapter](assets/screenshot.png)](#)

CPUMemoryDiskOSTimingi7 (13K)32 GoNVMe**Windows** 10 Pro x64**2.19s**i7 (8)8 GoNVMe**Windows** 10 Pro x64**3.054s**Xeon (E22)16 GoSSD**Linux** Debian 11**3.58s***i3 (3)**8 Go**SSD**Windows 10 Pro x64**30.23s*Requirements:
-------------

[](#requirements)

- PHP **exec** function
- PHP **SQLite3** extension
- PHP **FFI** extension (Used by Loader)

Install:
--------

[](#install)

```
composer require jakiboy/pducky
vendor/bin/pducky install-binaries
```

Test:
-----

[](#test)

```
git clone https://github.com/Jakiboy/pducky.git
cd pducky && composer dump-autoload
composer install-binaries
cd examples && bash generate.sh
bash test.sh
```

Examples:
---------

[](#examples)

### Fetch single value:

[](#fetch-single-value)

```
$price = (new Pducky\Adapter('data.csv'))->import()->single(
	'SELECT `price` FROM `temp` WHERE `ean` = "4567890123456";'
); // 374.08$
```

### Fetch rows:

[](#fetch-rows)

```
$rows = (new Pducky\Adapter('data.csv'))->import()->query(
	'SELECT * FROM `temp` LIMIT 100;'
); // []
```

### Create database:

[](#create-database)

Create database `data` with table `product` from a compressed CSV file `data.csv.gz`.

```
(new Pducky\Adapter('data.csv.gz'))->import('data', 'product');
```

### Loader query (FFI):

[](#loader-query-ffi)

```
$rows = (new Pducky\Loader())->connect('data.db')
	   ->importCsv('data.csv', 'product')
	   ->query('SELECT * FROM product LIMIT 100;'); // []
```

References:
-----------

[](#references)

- [SQL Introduction](https://duckdb.org/docs/stable/sql/introduction)
- [Importing Data](https://duckdb.org/docs/stable/data/overview)

Authors:
--------

[](#authors)

- [Jakiboy](https://github.com/Jakiboy) (*Initial work*)

⭐ Support:
----------

[](#-support)

Skip the coffee! If you like the project, a Star would mean a lot.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance58

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~311 days

Total

3

Last Release

275d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a9408e68876cf40312866dc080b26fda86fdd82efd2d82a09612077cb73af3c?d=identicon)[Jakiboy](/maintainers/Jakiboy)

---

Top Contributors

[![Jakiboy](https://avatars.githubusercontent.com/u/7604550?v=4)](https://github.com/Jakiboy "Jakiboy (25 commits)")

---

Tags

phpjsonxmlsqlcsvsqlite3data-analysisparquetduckdbbig-data

### Embed Badge

![Health badge](/badges/jakiboy-pducky/health.svg)

```
[![Health](https://phpackages.com/badges/jakiboy-pducky/health.svg)](https://phpackages.com/packages/jakiboy-pducky)
```

###  Alternatives

[annexare/countries-list

Continents &amp; countries: ISO 3166-1 alpha-2 code, name, ISO 639-1 languages, capital, currency, native name, phone. JSON, CSV and SQL.

1.3k220.8k1](/packages/annexare-countries-list)[rolfvreijdenberger/izzum-statemachine

A superior statemachine library php &gt;= 5.3. Integrates with your domain models perfectly.

7425.5k](/packages/rolfvreijdenberger-izzum-statemachine)[archon/dataframe

Archon: PHP Data Analysis Library

9824.2k1](/packages/archon-dataframe)[thedataist/drill-connector

Objects that allow you to programmatically connect to Apache Drill.

118.7k1](/packages/thedataist-drill-connector)[mammothphp/woollym

WoollyM: PHP Data Analysis Library

111.6k](/packages/mammothphp-woollym)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
