From 5bcb08ef375e537cc276f78c3c477ed86fb1eb44 Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Mon, 19 Nov 2018 02:44:34 +0000 Subject: [PATCH] Don't use count estimate in postgresql It produces random numbers that misslead the code. --- lib/database/books.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/database/books.go b/lib/database/books.go index e776c63..a085e92 100644 --- a/lib/database/books.go +++ b/lib/database/books.go @@ -87,7 +87,7 @@ func (db *pgDB) getBooks(active bool, query string, length int, start int) (book OrderExpr(order, rankParams...). Offset(start). Limit(length). - SelectAndCountEstimate(10000) + SelectAndCount() return books, num, err }