DataBrewery / cubes

[NOT MAINTAINED] Light-weight Python OLAP framework for multi-dimensional data analysis
http://cubes.databrewery.org
Other
1.49k stars 314 forks source link

Cube queries not using cache on mariadb #446

Closed schwab closed 6 years ago

schwab commented 7 years ago

Mariadb has a query cache mechanism which caches sql queries when it sees that the request is identical to recent queries. This results in a huge performance boost for subsequent queries. The mechanism for enabling this and some things which cause it not be used are described @ https://mariadb.com/kb/en/mariadb/query-cache.

I have notice however, that python cube generated (for instance a simple /members lookup) always takes ~3.4 to run. However, if I run the same query directly against the mariadb server using the terminal client, it comes back in ~3.4sec the first time, but subsequent requests take <1ms. Why then is python cubes query not resulting in a cached hit on mariadb when the same request is sent multiple times (in order with no writes going on) when it's sent by python cubes?

Is there anything I can do to further troubleshoot this problem or configure slicer to allow it to get mariadb's cached version of the query?

schwab commented 6 years ago

Closing as I'm not able to reproduce this. I believe it must have been a mariadb setting or something else.