We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5eb690c commit 0823a02Copy full SHA for 0823a02
src/Adapters/Storage/Postgres/PostgresStorageAdapter.js
@@ -2040,7 +2040,7 @@ export class PostgresStorageAdapter implements StorageAdapter {
2040
if (where.pattern.length > 0 || !estimate) {
2041
qs = `SELECT count(*) FROM $1:name ${wherePattern}`;
2042
} else {
2043
- qs = 'SELECT reltuples AS approximate_row_count FROM pg_class WHERE relname = $1';
+ qs = 'SELECT n_live_tup AS approximate_row_count FROM pg_stat_all_tables WHERE relname = $1;';
2044
}
2045
2046
return this._client
0 commit comments