Skip to content

[WIP] MDEV-36737: Research and Estimation for Adapting VIDEX to MariaDB #4217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: 11.8
Choose a base branch
from

Conversation

YoungHypo
Copy link

@YoungHypo YoungHypo commented Jul 22, 2025

  • The Jira issue number for this PR is: MDEV-36737

Description

VIDEX is a disaggregated, extensible virtual index engine for what-if analysis. While primarily developed for MySQL/Percona, this pull request integrates the VIDEX engine into MariaDB 11.8.

Release Notes

Added a VIDEX engine in storage/videx to support what-if analysis for index strategies, integrates AI-based cardinality and NDV (number of distinct values) estimation algorithms

How can this PR be tested?

TODO: modify the automated test suite to verify that the PR causes MariaDB to behave as intended.
Consult the documentation on "Writing good test cases".

If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the 11.8 tag.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

Current Progress

The VIDEX engine currently implements the basic logic of the info_low function. It collects the statistics from InnoDB (e.g., stats.data_file_length, stats.index_file_length, key->rec_per_key, etc.) as mock data.

In simple single-table queries, VIDEX is able to return a valid execution plan and complete the query correctly.

TODO

  • Implement multi-table JOIN support
  • Test records_in_range via index-based queries
  • Support ADD INDEX operations after table creation
  • Conduct more complex SQL testing, such as TPC-H Q21
  • Enable HTTP requests from the server side
  • Set up and run CI tests

@svoj svoj added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Jul 23, 2025
@svoj svoj marked this pull request as draft July 23, 2025 05:24
Copy link
Contributor

@svoj svoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick review, mostly compilation issues outlined.

To keep things organised in one place, we should do most of this effort under this pull request. If you face some issues and you feel a need to create new pull request, let us know. We could probably help you to edit this one.

IF (PLUGIN_VIDEX STREQUAL "NO")
ADD_FEATURE_INFO(VIDEX "OFF" "Storage Engine")
RETURN()
ENDIF()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, MYSQL_ADD_PLUGIN() will do this for you. It will emit cmake variable and do similar handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.
Development

Successfully merging this pull request may close these issues.

3 participants