mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-11 16:57:26 +02:00
[#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:
1 parent
3885c93d59
commit
d97b5b1f6c
2 files changed
+8
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user