Thanks, very interesting insights! Can you try the same test ( with --no-data-checksums) on you mac > and see if that makes a difference? >
I disabled checksums on PG18, and retried the tests, with and without modifying random_page_cost, and for TEMP tables only. When random_page_cost is the default value (=4), both versions do Seq Scan, and PG18 is indeed a bit faster (313 ms vs. 347 ms). However, when random_page_cost = 1.1, both versions do Index Only Scan, and PG 17.5 is faster (135 ms vs. 152 ms). Another counter-intuitive part is that when I run "explain" again, both versions show slower results. (both 170-180 ms) Using pg_prewarm to load both the table and the index into the shared buffers does not change anything. To summarize: * Test setup works for TEMP table with random_page_cost = 1.1; data-checksums did not play a role * It's fast initially and slows down on both versions in subsequent runs * PG 17.5 is faster, but much more noticeably on the first run I'm now thinking maybe the compilation options for PG 17.5 have been different. I'm using the default version that comes with Homebrew, but for PG 18, I compiled it myself. Here are the results for `select version();` on both: PostgreSQL 17.5 (Homebrew) on aarch64-apple-darwin24.4.0, compiled by Apple clang version 17.0.0 (clang-1700.0.13.3), 64-bit vs. PostgreSQL 18beta1 on aarch64-darwin, compiled by clang-17.0.0, 64-bit Best Regards, Sadeq Dousti