Metabase issues repeated count(*) operations, slowing our DB


#1

We have metabase attached to our Redshift cluster. Periodically in metabase, we will see:

-- Metabase SELECT count(*) AS "count" FROM "public"."v_events_stream"

That is actually a view that is itself very slow to query (that one takes ~5min to run).

I haven’t ever written anything like that and I am assuming that because the query is prefaced with --Metabase it means it is automatically being run by Metabase code itself.

Is that the case and is there any way to stop it?

Thanks,
Eric


#2

Sounds like you are experiencing Database Sync and Analysis.

As the fine admin guide explains by default runs periodically and you can switch it to a only run on manual trigger from an admin.


#3

That was what I needed, thank you so much! :tada: