Can i query the database directly?

Would querying the database manually, rather than using the reporting API, provide any change in performance. It definitely will provide better information for us since, reporting modules have no option to show other columns from another module despite them definitely being joined. For example i am querying a custom dimension that has a segment of event, all that the reporting returns to me is custom dimension stuff (which makes sense since its the custom dimension api module) but ideally i would like it to show certain event info too.

Is there a way we can query the database directly?

Hi,

You can of course always query the database directly (after all it is just a MySQL database)

But I am not sure if there is a huge advantage, after all when you add a custom interpreter of the data, you are just rewriting Matomo. In advantage there is a lot of effort to keep the Reporting API backward compatible with updates, while it isn’t guaranteed that the database scheme will stay the same.

That said you can find information about the database scheme here: Database schema: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3