<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders-xunzodi5k" -->

---
title: Trying DuckDB for Magento Analytics: An Experiment with...
description: A hands-on experiment tests the MariaDB DuckDB storage engine as an analytical layer for a Magento shop with one million orders and two million order items....
canonical: https://daily.dev/posts/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders-xunzodi5k
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Trying DuckDB for Magento Analytics: An Experiment with One Million Orders | daily.dev
og:description: A hands-on experiment tests the MariaDB DuckDB storage engine as an analytical layer for a Magento shop with one million orders and two million order items....
og:url: https://daily.dev/posts/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders-xunzodi5k
og:image: https://api.daily.dev/og/posts/xUNZODI5k.png
og:image:alt: Trying DuckDB for Magento Analytics: An Experiment with One Million Orders
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Trying DuckDB for Magento Analytics: An Experiment with One Million Orders

**[MariaDB.org](https://daily.dev/sources/mariadb-foundation)** · 13 min read · 0 upvotes · 0 comments

## Summary

A hands-on experiment tests the MariaDB DuckDB storage engine as an analytical layer for a Magento shop with one million orders and two million order items. Keeping Magento's operational tables on InnoDB while running the full Orders Report against DuckDB snapshots dropped combined query time from 18.464s (InnoDB only) to 8.267s (orders on DuckDB, items still InnoDB) to 0.292s (both tables on DuckDB) — a 63.2x speedup. The author notes the snapshot load itself took 34.5 seconds, discusses why a warmed COUNT(*) comparison is misleading, sketches a snapshot/ETL architecture separating transactional and analytical storage, and lists limitations plus a roadmap including testing synchronous dual writes across InnoDB and DuckDB in one transaction.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://mariadb.org/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders>

## Questions this post answers

### How much faster is a Magento Orders Report when both sales_order and sales_order_item tables use the DuckDB storage engine instead of InnoDB?

Moving both tables to the MariaDB DuckDB storage engine (version 1.5.5) made a complete Magento Orders Report 63.2 times faster in one test: combined execution time for two report queries dropped from 18.464 seconds on InnoDB to 0.292 seconds when both sales_order and sales_order_item were converted to DuckDB, using one million orders and two million order items.

_Developers weighing DuckDB against InnoDB for reporting workloads can track real benchmark write-ups like this on daily.dev._

### Does moving just the orders table to DuckDB while keeping order items on InnoDB give most of the performance benefit for a Magento report?

No, moving only the sales_order table to DuckDB while leaving sales_order_item on InnoDB cut report time from 18.464 seconds to 8.267 seconds (2.23x), but the report still had to scan and aggregate two million InnoDB order-item rows, so it fell far short of the 63.2x speedup achieved once both tables were on DuckDB.

_Engineers planning incremental storage-engine migrations can follow benchmark breakdowns like this on daily.dev before committing._

### How do you add the DuckDB storage engine to a MariaDB instance for testing analytical queries?

Use the ghcr.io/mariadb/duckdb Docker image tagged with the matching MariaDB version, for example ghcr.io/mariadb/duckdb:11.4, in place of the standard MariaDB image; after recreating the container, running SHOW ENGINES confirms a DUCKDB engine entry, letting you query InnoDB and DuckDB tables through the same MariaDB connection and convert a table with ALTER TABLE ... ENGINE=DUCKDB.

_Teams evaluating MariaDB's DuckDB engine for analytics can find setup walkthroughs like this on daily.dev._

## Similar posts on daily.dev

- [The DuckDB MySQL engine at 500 GB](https://daily.dev/posts/the-duckdb-mysql-engine-at-500-gb-baqjll9pk) · Planet MySQL · 0 upvotes · 0 comments
- [Running DuckDB as a MySQL 9.7 storage engine](https://daily.dev/posts/running-duckdb-as-a-mysql-9-7-storage-engine-hhxnvb0s1) · Percona Blog · 0 upvotes · 0 comments
- [DuckDB Speed on MySQL with dbtrail, Without a New Storage Engine](https://daily.dev/posts/duckdb-speed-on-mysql-with-dbtrail-without-a-new-storage-engine-0gt0zkgml) · Planet MySQL · 1 upvotes · 0 comments
- [From Spreadsheets to DuckLake: A Data Engineer's Road to DuckDB](https://daily.dev/posts/from-spreadsheets-to-ducklake-a-data-engineer-s-road-to-duckdb-ucbstyyau) · DuckDB · 0 upvotes · 0 comments

---

Tags: [#infrastructure](https://daily.dev/tags/infrastructure), [#duckdb](https://daily.dev/tags/duckdb), [#olap](https://daily.dev/tags/olap), [#magento](https://daily.dev/tags/magento)

[View this post on daily.dev](https://daily.dev/posts/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders-xunzodi5k)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Trying DuckDB for Magento Analytics: An Experiment with One Million Orders","url":"https://daily.dev/posts/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders-xunzodi5k","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders-xunzodi5k"},"datePublished":"2026-09-16T16:04:41.096Z","dateModified":"2026-09-16T16:25:09.211Z","description":"A hands-on experiment tests the MariaDB DuckDB storage engine as an analytical layer for a Magento shop with one million orders and two million order items....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f5c6a31f4c5cc603f2ad6870b23ea25b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f5c6a31f4c5cc603f2ad6870b23ea25b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"MariaDB.org","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"MariaDB.org","logo":"https://media.daily.dev/image/upload/s--onniydaR--/f_auto,q_auto/v1787487510/logos/mariadb-foundation?_a=BAMAMicg0","url":"https://daily.dev/sources/mariadb-foundation"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders-xunzodi5k","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"infrastructure,duckdb,olap,magento","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"MariaDB.org","item":"https://daily.dev/sources/mariadb-foundation"},{"@type":"ListItem","position":3,"name":"Trying DuckDB for Magento Analytics: An Experiment with One Million Orders"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders-xunzodi5k#faq","mainEntity":[{"@type":"Question","name":"How much faster is a Magento Orders Report when both sales_order and sales_order_item tables use the DuckDB storage engine instead of InnoDB?","acceptedAnswer":{"@type":"Answer","text":"Moving both tables to the MariaDB DuckDB storage engine (version 1.5.5) made a complete Magento Orders Report 63.2 times faster in one test: combined execution time for two report queries dropped from 18.464 seconds on InnoDB to 0.292 seconds when both sales_order and sales_order_item were converted to DuckDB, using one million orders and two million order items. Developers weighing DuckDB against InnoDB for reporting workloads can track real benchmark write-ups like this on daily.dev."}},{"@type":"Question","name":"Does moving just the orders table to DuckDB while keeping order items on InnoDB give most of the performance benefit for a Magento report?","acceptedAnswer":{"@type":"Answer","text":"No, moving only the sales_order table to DuckDB while leaving sales_order_item on InnoDB cut report time from 18.464 seconds to 8.267 seconds (2.23x), but the report still had to scan and aggregate two million InnoDB order-item rows, so it fell far short of the 63.2x speedup achieved once both tables were on DuckDB. Engineers planning incremental storage-engine migrations can follow benchmark breakdowns like this on daily.dev before committing."}},{"@type":"Question","name":"How do you add the DuckDB storage engine to a MariaDB instance for testing analytical queries?","acceptedAnswer":{"@type":"Answer","text":"Use the ghcr.io/mariadb/duckdb Docker image tagged with the matching MariaDB version, for example ghcr.io/mariadb/duckdb:11.4, in place of the standard MariaDB image; after recreating the container, running SHOW ENGINES confirms a DUCKDB engine entry, letting you query InnoDB and DuckDB tables through the same MariaDB connection and convert a table with ALTER TABLE ... ENGINE=DUCKDB. Teams evaluating MariaDB's DuckDB engine for analytics can find setup walkthroughs like this on daily.dev."}}]}
```

