Skip to content

Expose proxied_queries as a virtual table to support SELECT and TRUNCATE operations #1545

@vgrippa

Description

@vgrippa

Is your feature request related to a problem? Please describe.
The output of SHOW PROXIED QUERIES grows unbounded and becomes difficult to navigate when identifying candidate queries for caching. The lack of filtering, projection, or cleanup mechanisms limits its practical usability. Converting this output into a virtual table (proxied_queries) would offer better flexibility and control.

Describe the solution you'd like
Besides the command, we should expose SHOW PROXIED QUERIES as a virtual/system table, for example, proxied_queries, with support for:
• SELECT ... FROM proxied_queries: enable filtering, aggregation, substring, and conditional expressions—similar to how ProxySQL exposes stats_mysql_query_digest.
• TRUNCATE proxied_queries: clear the contents to start collecting fresh data, improving analysis after configuration or workload changes.

Describe alternatives you've considered
Manual parsing of the full output and restarting the component to reset internal stats—both inefficient and error-prone.

Additional context
This will improve usability for caching strategies and real-time analysis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions