TablePlus-Linux icon indicating copy to clipboard operation
TablePlus-Linux copied to clipboard

Hang on big table How to disable TablePlus to count a table?

Open yusufmalikul opened this issue 1 year ago • 4 comments

Please answer the questions below, it helps us to track the issue.

  1. Database version (Ex: PostgreSQL 10.0): Postgres 12

  2. TablePlus version (the number on the welcome or about screen, Ex: build 81): 1.2.0 (254)

  3. Linux distro (Ex: Ubuntu 18.04): Ubuntu 22.04

  4. The steps to reproduce this issue: Click on a table, TablePlus will send count(*) query which make it hang on big table. Is there a way to disable this count query?

Screenshot of the count query:

image

yusufmalikul avatar Nov 19 '24 07:11 yusufmalikul

@yusufmalikul Can you run the query above the SELECT COUNT(*) to see what the estimated row count is?

nangtrongvuon avatar Nov 19 '24 07:11 nangtrongvuon

@nangtrongvuon the row count is above 2 billion, this always make my TablePlus hang and I need to wait or force quit.

yusufmalikul avatar Nov 19 '24 07:11 yusufmalikul

@yusufmalikul I understand that the row count might be very big, but can you run the select reltuples.. query on its own and see what the result is? It is likely to be a number less than 500000, or 0.

nangtrongvuon avatar Nov 19 '24 07:11 nangtrongvuon

ok here, its the big table: image

yusufmalikul avatar Nov 19 '24 07:11 yusufmalikul