0

I'm using Postgres on AWS EBS, when running a query that uses a bitmap heap scan and a bitmap index scan, the execution time seems proportional to the number of "heap blocks" read, as shown by the EXPLAIN ANALYZE (I've not 100% verified this). Because EBS is networked attached storage, it has a high (~1ms) latency, but a high throughput/bandwidth, meaning Postgres wouldn't be taking full advantage of the disk.

Is it the case that when reading from Disk postgres queries blocks/pages sequentially?

1
  • When doing a sequential scan, yes. When doing any sort of index scan, it's unlikely. (It's not impossible, if your indexed expression happens to match the on-disk sequence of rows, but if your query were broad enough to touch many contiguous blocks, the planner would probably have picked a seqscan plan instead anyway)
    – AdamKG
    Oct 15, 2020 at 10:14

1 Answer 1

1

In the case of bitmap heap scan, it can issue async block reads. This is controlled by effective_io_concurrency.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.