Do the count stimated

The DB is being overloaded by the qaueries
This commit is contained in:
Las Zenow 2020-06-24 11:07:54 +00:00
parent b54745028a
commit 3399d0ef1b

View file

@ -90,7 +90,7 @@ func (db *pgDB) getBooks(active bool, query string, length int, start int) (book
OrderExpr(order, rankParams...). OrderExpr(order, rankParams...).
Offset(start). Offset(start).
Limit(length). Limit(length).
SelectAndCount() SelectAndCountEstimate(1000)
return books, num, err return books, num, err
} }