libredb / libredb/libredb-studio

[FEATURE] nicer way to display and query the table count

Open
#702 3 comments 0 reactions 0 assignees View on GitHub
bug enhancement
Dominant language
TypeScript
Stars
726
Forks
119
Avg merge
7h 47m
Merged PRs (30d)
265

Description

## Is your feature request related to a problem?

A very common operation is to get an exact count of a table, e.g.

```sql
SELECT COUNT(*) FROM my_table;
```

when exploring a DB. Having to do this manually for many tables takes time.

The count for the rows are also in thousands, which is difficult to read when the number is in millions+

example-row-count

## Describe the solution you'd like

1. The count should support millions (M), billions (B), etc instead of only using thousands (K). For example, this is what Drizzle Studio looks like:

drizzle-studio-sample

2. Add a quick action for "SELECT TABLE COUNT" in this context menu:

select-table-count

Or perhaps 2 options side-by-side for APPROX count vs EXACT count

## Describe alternatives you've considered

Running the count myself, or use drizzle-studio.

Can also use the "Profile Table" feature which does display the count

profile-table

although sometimes this takes a long time (for big table) as it does other things as well, and we can't edit the COUNT query to include additional filters

## Use Case

To get a quick count and have a simple base query to modify.

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing table-count display, table context menu, and Profile Table entry point. Trace how counts and table queries are handled across supported databases, then define the exact and approximate count actions. Done means large counts use readable M/B-style abbreviations and the context menu can generate an editable table-count query.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql, typescript
Domain
databases, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.