question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Detect unique identifiers" takes tens of seconds for each new query (Postgre).

See original GitHub issue

When I start query execution DBeaver writes first Detect unique identifiers and spend 10-15s, then actually executes query.

There is a button “Cancel” to interrupt that process. After pushing it and around 5s delay I see alert: Database driver is not responding. Do you want to cancel request and close connection?. I chose no and got response a bit later.

What feature “Detect unique identifiers” enables? Can I disable probing of “unique identifiers”?

I cannot find such option, similar option was mentioned here: https://github.com/dbeaver/dbeaver/issues/5633

My Postgre is PostgreSQL 9.6.10 on x86_64-alpine-linux-musl, compiled by gcc (Alpine 6.3.0) 6.3.0, 64-bit running inside VirtualBox (Vagrant).

I see similar tips (other messages appear, like “Load TableCache”, etc) appear when I connect to Google Cloud Managed Postgre 11 but it takes fraction of seconds to finish.

I updated DBeaver Version 7.3.4.202101311042 from scoop install dbeaver. Same behavior is with old Version 6.2.2.201910072100

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
kseniiaguzeevacommented, Feb 18, 2021
  1. Could you please see which query gives so long execution time (Window>Show view>Query manager)? Screenshot 2021-02-18 at 13 11 46

  2. Try to disable Read table metadata and Read table preferences in Preferences>Data Editor Screenshot 2021-02-18 at 13 13 34

Even if disabling options helps, I will be glad to receive the query from Query manager and investigate it.

1reaction
elektro-wollecommented, Jul 22, 2022

I’ve tried the statement directly on the database and can confirm the ten seconds. But without the pg_stat_get_numscans expression the execution is instant (50ms).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How we made DISTINCT queries up to 8000x faster on ...
As a table grows (and they grow quickly with time-series data), this operation keeps getting slower.
Read more >
Fixing Slow PostgreSQL Queries: How to Make a ... - OtterTune
Ah, the frustrating slow-running PostgreSQL query. What's an otter to do? The first thing to do — without question — is run ANALYZE....
Read more >
SQL query to search an unique ID that can be in three different ...
The unique_id column, that is present in all tables, is a serial type (autoincrement) and its counter is shared with the three tables,...
Read more >
PostgreSQL Running Slow? Tips & Tricks to Get to the Source
As a PostgreSQL Database Administrator, there are the everyday ... to help find the common offenders quickly, as well as gain new insight...
Read more >
28.2. The Cumulative Statistics System - PostgreSQL
Similarly, information about the current queries of all sessions is ... The per-index statistics are particularly useful to determine which indexes are ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found