Skip to content

Commit

Permalink
revert: fix: Inaccurate table total row count for PostgreSQL
Browse files Browse the repository at this point in the history
This reverts commit 0823a02.
  • Loading branch information
mtrezza authored May 28, 2023
1 parent 6c5f89a commit 6722110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Adapters/Storage/Postgres/PostgresStorageAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2040,7 +2040,7 @@ export class PostgresStorageAdapter implements StorageAdapter {
if (where.pattern.length > 0 || !estimate) {
qs = `SELECT count(*) FROM $1:name ${wherePattern}`;
} else {
qs = 'SELECT n_live_tup AS approximate_row_count FROM pg_stat_all_tables WHERE relname = $1;';
qs = 'SELECT reltuples AS approximate_row_count FROM pg_class WHERE relname = $1';
}
return this._client
Expand Down

0 comments on commit 6722110

Please sign in to comment.