API taking long to load results and show dashboard

Hello community,

I use Metabase (v0.50.4) self-hosted with PostgreSQL (application DB).
All my data though that is shown on the dashboards/questions is coming from BigQuery.

One of my dashboards is taking a while (20-30 seconds) in the Loading... page before loading the cards. Debugging in the browser I can see it happens due to 2 calls to the API, these URLs (see the picture):

  • https://my_metabase.com/api/dashboard/123
  • https://my_metabase.com/api/dashboard/123/query_metadata

When I call these 2 endpoints directly, they return a JSON of 40k rows each, with all the metadata of all dashboard tables, calculated columns, etc. within the questions in the dashboard; which explains the size of the file.

I understand that as more questions as more it takes to load, the size of the table, etc... but my point is that this file (even 40k rows), has 44kb, and the db returns it in milliseconds.

So, what is the thing that causes this load to take 30 seconds? Is it the application to parse the query result into the JSON file?

Is there anything I can do to just make it load faster in the app side, given the DB provides the results pretty fast?

Thank you very much!

UP! :slight_smile:

Please upgrade to a newer version, this has been fixed already

It is much better indeed in v0.51.5! Thank you!

1 Like

Just updating on this topic, I made this dashboard load pretty fast now, and the reason was removing the calculated columns in the questions.

I had about 5, 6 calculated columns in each question, and many questions in the dashboard. I guess Metabase take some time to compile the SQL to send to the DB and hence this "loading..." on screen before even loading the dashboard layout.

Moving these columns to my table in the database, I removed all calculated columns from questions and, done, dashboard loading faster again.

cool, we made a lot of fixes in the most recent versions