engineer at Qbil Software B.V., an ERP company in the Netherlands • At Qbil we work extensively with MySQL, PHP and Symfony • Qbil Software is multi-tenant, with advanced querying and reporting needs SymfonyCon Amsterdam 2025 1 / 15
Database Growing Pains • MySQL as primary data store • Logging/analytics tables growing large (>100MB) • Slowing down backups and database dumps • Goal: Fit more databases on smaller instance sizes SymfonyCon Amsterdam 2025 2 / 15
PHP Approach: • Schedule commands to load from MySQL • Convert to CSV • Write to S3 via AWS PHP SDK • Read back via S3 API ✓ Pros: High flexibility ✗ Cons: Lots of code, performance issues, memory concerns SymfonyCon Amsterdam 2025 4 / 15
Developed in the CWI Netherlands 🇳🇱 • Columnar database query engine and file format • Perfect for large analytical data (CSVs > 1GB) • Easy to install, embed, and run • Fast with familiar SQL syntax • Extensions for MySQL, AWS S3, and more • Supports CSV/Parquet/JSON formats SymfonyCon Amsterdam 2025 7 / 15
to S3 COPY ( select * from mysql_query('qt_db', ' SELECT *, date_format(visited_at, ''%Y'') as visit_year, date_format(visited_at, ''%m'') as visit_month, date_format(visited_at, ''%d'') as visit_day FROM page_visits WHERE visited_at < current_date ORDER BY id ASC ') ) TO 's3://qt-analytics/page_visits' (FORMAT PARQUET, PARTITION_BY (visit_year, visit_month, visit_day, tenant_id), APPEND); SymfonyCon Amsterdam 2025 11 / 15
Up MySQL -- Delete data from MySQL select * from mysql_execute('qt_db', ' DELETE FROM page_visits WHERE visited_at < current_date '); SymfonyCon Amsterdam 2025 12 / 15