News for hackers. Stuff that matters.
Re:PostgREST – Serve a RESTful API from Any Postgres Database by zX41ZdbW on Saturday December 31, 2022 @11:49AM (#34198185)
The cost can be calculated, but not always.

Example 1:

  SELECT ... FROM table WHERE key BETWEEN c1 AND c2
- here we can get the number of records and bytes to scan before even starting the query.

Example 2:

  SELECT ... FROM table WHERE key = (SELECT ...)
- here we cannot know how many records will be scanned until we will finish the subquery.

Maybe some estimations can be applied... but we don't do that.

There are no comments on this comment yet.