[#6739] use rowid as count column for non-view collections to minimize the need of having the id field as covering index

This commit is contained in:
Gani Georgiev 2025-04-28 14:47:22 +03:00
parent 3885c93d59
commit d97b5b1f6c
2 changed files with 8 additions and 0 deletions

View File

@ -1,8 +1,11 @@
## v0.27.2 (WIP)
- Added workers pool when cascade deleting record files to minimize _"thread exhaustion"_ errors ([#6780](https://github.com/pocketbase/pocketbase/discussions/6780)).
- Updated the excerpt modifier to properly account for multibyte characters ([#6778](https://github.com/pocketbase/pocketbase/issues/6778)).
## v0.27.1
- Updated example `geoPoint` API preview body data.

View File

@ -79,6 +79,11 @@ func recordsList(e *core.RequestEvent) error {
searchProvider := search.NewProvider(fieldsResolver).Query(query)
// use rowid when available to minimize the need of a covering index with the "id" field
if !collection.IsView() {
searchProvider.CountCol("_rowid_")
}
records := []*core.Record{}
result, err := searchProvider.ParseAndExec(e.Request.URL.Query().Encode(), &records)
if err != nil {