Understanding the performance of a query #61
-
I've written the following query: var result = await _supabaseClient.From<KnownEndpointEntity>().Select("*").Where(x => x.id == id).Get();
return result.Models.First(); I'm trying to understand if the filtering (where clause) is being done in the database in a query, or on the client. I've read the docs that I can find for both I'll keep investigating and will update here if I figure it out myself. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Filtering happens database side - I’ve written the LINQ parser so that it translates the query expressions into the GET/POST/PATCH requests necessary to interact with Basically, everything that happens prior to the async request is server side: var response = await postgrestClient
.Table<T>()
.Where(...) // Server Side
.Where(...) // Server Side
.Get(); Everything that happens with var models = response.Models<T>();
var filtered = models.Where(....) // Client Side |
Beta Was this translation helpful? Give feedback.
Filtering happens database side - I’ve written the LINQ parser so that it translates the query expressions into the GET/POST/PATCH requests necessary to interact with
postgrest-csharp
.Basically, everything that happens prior to the async request is server side:
Everything that happens with
response.Models<T>()
is client side.