We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 177891e + a01ee40 commit 0f2bdaaCopy full SHA for 0f2bdaa
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