How to stop database sync query

I see two running sync queries in database processes.

These queries are too heavy and can lock tables.
I disabled horly syncs in settings.

But sync queries are still running and restarts if I kill them or restart a database.

How can I stop them?

Hi @aliaksandr.karmyzau

Please post “Diagnostic Info” from Admin > Troubleshooting.

Metabase has to sync your databases to be able to show tables/fields in the interface.
Sync cannot be disabled currently, but there’s an issue open for changing that: - upvote by clicking :+1: on the first post

Scan is not the same as sync, but sync also includes fingerprinting, which is a somewhat heavy process that runs on first sync and then very rarely again.
Scan can be disabled.

For a bit more context here:

Here is Diagnostic Info

“browser-info”: {
“language”: “en-US”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36”,
“vendor”: “Google Inc.”
“system-info”: {
“file.encoding”: “UTF-8”,
“”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.7+10”,
“java.vendor”: “AdoptOpenJDK”,
“java.vendor.url”: “”,
“java.version”: “11.0.7”,
“”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.7+10”,
“”: “Linux”,
“os.version”: “4.14.209-160.339.amzn2.x86_64”,
“user.language”: “en”,
“user.timezone”: “GMT”
“metabase-info”: {
“databases”: [
“hosting-env”: “elastic-beanstalk”,
“application-database”: “postgres”,
“application-database-details”: {
“database”: {
“name”: “PostgreSQL”,
“version”: “11.8”
“jdbc-driver”: {
“name”: “PostgreSQL JDBC Driver”,
“version”: “42.2.8”
“run-mode”: “prod”,
“version”: {
“date”: “2021-01-05”,
“tag”: “v0.37.5”,
“branch”: “release-x.37.x”,
“hash”: “be537ee”
“settings”: {
“report-timezone”: “US/Central”

@aliaksandr.karmyzau Can you post the query that you kill on your database? I have a feeling it’s fingerprinting, but that would be very useful to know.

I can’t see the whole query but here:


@aliaksandr.karmyzau And you cannot right-click the cell and copy the information?
Otherwise run this query on MySQL: SHOW FULL PROCESSLIST


– Metabase
SELECT custom_certification_report.first_name AS first_name FROM custom_certification_report GROUP BY custom_certification_report.first_name ORDER BY custom_certification_report.first_name ASC LIMIT 5000

@aliaksandr.karmyzau Okay, that is definitely fingerprinting, but I’m unsure why it’s listing two processes (in your screenshot) - is that different process IDs?

How many rows do you have in custom_certification_report ?

And do you have any indexes on custom_certification_report . first_name ?

Yes, they are two separate processes with separate IDs.

SHOW INDEX FROM custom_certification_report gave me nothing

SELECT COUNT(*) FROM custom_certification_report just hangs, maybe metabase query locks the table

@aliaksandr.karmyzau Okay, stop Metabase, while you investigate your database. You can also try running the query Metabase gets stuck on with EXPLAIN ANALYZE in front to get more information about your database.