Do the count stimated
The DB is being overloaded by the qaueries
This commit is contained in:
parent
b54745028a
commit
3399d0ef1b
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ func (db *pgDB) getBooks(active bool, query string, length int, start int) (book
|
|||
OrderExpr(order, rankParams...).
|
||||
Offset(start).
|
||||
Limit(length).
|
||||
SelectAndCount()
|
||||
SelectAndCountEstimate(1000)
|
||||
return books, num, err
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue