Find when dashboards were last accessed

Is there a query or an easy way to find out when dashboards were last accessed? We have so many dashboards and I think its slowing our system down. Problem is, I dont know if they are all relevant anymore. I want to be able to sort and find dashboards that have not been accessed or viewed in a long time. This would prevent me from asking about hundreds of dashboards! Is there an easy way to do this? I looked in the audit feature of metabase but couldnt see anything that would provide that information. Thanks!

Hi @emosse
Have a look at Metabase Metadata SQL

@flamber thank you. However, how do I start? Its asking me to select a database. Is there a way around this? Where would report_dashboard be in? Also, none of these are last views. Does that exist as a field? I cant tell because I cant look at these tables

@emosse You would need to make a query that joins in view_log and perhaps query_execution depending on what you're looking for.

But Metabase is not slow because there's a few hundred dashboards that are unused.
The problem is elsewhere, likely in your setup or hosting/scaling.

Post "Diagnostic Info" from Admin > Troubleshooting.

I dont have view_log in database. Where would this reside?

I realize that it may not be slow because of dashboard count. To be more clear, this is related to overall clean up so we dont have hundreds of dashboards floating out there

@emosse You need to connect to the Metabase application database. I can guarantee that you have a view_log table, otherwise Metabase wouldn't work.

The Audit functionality in the Pro/Enterprise provides you with information about how many views a dashboard has.
https://www.metabase.com/docs/latest/enterprise-guide/audit.html

yes I saw that audit has how many views, but i would like to know last viewed. If a dashboard hasnt been viewed in 2 years then it doesnt really matter how many times its been viewed because no one is looking at it