Prefer estimated count using RPC (supabase)
How to get the results of Prefer estimated =count but using RPC ? I have a function with limit and offset but this doesn 't work anymore with Prefer estimated count . A solution would be selecting all and then filter as per limit and offset but this isn 't efficient for db , is there an efficient solution like Prefer ? You 're making a db function call , not a standard GET request It wouldn 't do anything for a db function call You 'll have to implement the prefer logic into the call is what I meant I 'm looking for an efficient way , the only solution I have now is counting all the select then filter as per limit and offset , but this isn 't efficient because it doesn 't limit the select . Do you know a solution of having a performant select with limit but in the same time having an estimated of values ? Which is similar , but it doesn 't have all the convenience of PostgREST I was forced to use RPC because I need to select all the values from a table where the "date " equals with today , then showing the others from past and then the ones from future . This is possible with function but not with PostgREST . Tried to filter but isn 't an ideal solution because it cuts of results if not included in the initial query .