-> Seq Scan on presort_test The last found partition for RANGE and LIST partition lookups is cached. This reduces the overhead of bulk-loading into partitioned tables where many consecutive tuples belong to the same partition. Left join removals and unique joins on partitioned tables are all...
Since we know Postgres will pick the query plan with the lowest total cost, we can use that to try to understand the choices it has made. For example, if a query is not using an index that you expect it to, you can use settingsenable_seqscanto massively discourage certain query plan ...
postgres=# explain select * from tbl where id =1 or id=2 or id=3; QUERY PLAN --- Bitmap Heap Scan on tbl (cost=124.97..354.97 rows=10000 width=12) Recheck Cond: ((id = 1) OR (id = 2) OR (id = 3)) -> BitmapOr (cost=124.97..124.97 rows=10000 width=0) -> Bitmap I...