Cloud, on the free trial.
Ok, if I run the core query (the pure sql part that is enclosed in double quotes), and chop off all this stuff:
Running from Navicat, I get 0.069 seconds. It’s a tiny, development table at this point, only 286 rows in total, and the entire query is based on a single view.
If I run it in Metabase as a direct SQL query, again it is instantaneous.
On the dashboard, at the moment it’s taking 22 seconds.
I have a bar chart on the same dashboard, querying the same view, but with fewer dimensions (3 dimensions instead of 8). This loads instantly. In viewing the network response, I note that:
The bar chart returns 240 rows from the SQL query, and generates a response array of 59 arrays (59 rows) with three elements per array.
The pivot table, returning the same 240 rows in SQL, returns an array of 6,893 arrays, with 8 elements per array. It looks like it creates 240 arrays, and then a sequential number indicating the column in the pivot, and then the value. My x-axis (column headings) in the pivot are month periods, there are a few gaps but roughly ~25-30 to 30 so that’s where the 6893 number is coming from.
Is that the problem do you think, writing the 6k array, or rendering it in the client?