How to disable Metabase to access all tables in the DB

I just install Metabase v0.38.1, and set up database with “Periodically refingerprint tables” and “Automatically run queries when doing simple filtering and summarizing” disabled. Even before I create questions, I saw Metabase was sampling the data on my tables. Since some of tables in my DB are very large (over 10 million records), it caused some performance issue on my DB. Is there anyway to only allow to access table/query which is visible. Following is an example query I pulled from DB trace which I will never need for my reports

– /* partner: “metabase”, {“dashboard_id”:null,“chart_id”:null,“optional_user_id”:null,“optional_account_id”:“b2966094-bc2a-42fe-84d4-cce6b41862f5”,“filter_values”:{}} */ Metabase SELECT “source”.“substring52361” AS “substring52361”, “source”.“substring52362” AS “substring52362”, “source”.“substring52363” AS “substring52363”, “source”.“substring52364” AS “substring52364” FROM (SELECT “public”.“bulk_load”.“last_name” AS “last_name”, “public”.“bulk_load”.“first_name” AS “first_name”, “public”.“bulk_load”.“ip_address” AS “ip_address”, “public”.“bulk_load”.“email” AS “email”, substring(“public”.“bulk_load”.“last_name”, 1, 1234) AS “substring52361”, substring(“public”.“bulk_load”.“first_name”, 1, 1234) AS “substring52362”, substring(“public”.“bulk_load”.“ip_address”, 1, 1234) AS “substring52363”, substring(“public”.“bulk_load”.“email”, 1, 1234) AS “substring52364” FROM “public”.“bulk_load”) “source” LIMIT 10000

Hi @yongzou1

If you create a credential on your database, which only has privileges to the tables you want, then Metabase can only access those.

On first setup, Metabase will do a sync (to figure out the structure) and fingerprinting (which defines the Field Type and which binning is possible).
For reference: https://www.metabase.com/docs/latest/administration-guide/01-managing-databases.html#database-sync-and-analysis

You are looking for the following two requests - upvote by clicking :+1: on the first post of each issue:
https://github.com/metabase/metabase/issues/2146
https://github.com/metabase/metabase/issues/5281