New answers tagged

1

I ... want to select latest row with city_id = 125. Bold emphasis mine. Your query does not match the declared objective. Should be something like: SELECT * FROM measurement WHERE city_id = 125 ORDER BY logdate DESC LIMIT 1; Which should make Postgres scan the latest partition first. Assuming logdate is defined NOT NULL. Else use ORDER BY logdate ...


5

Bitmaps can either store a bitmap of rows, or if that becomes too large to fit in work_mem it can "go lossy" by storing a bitmap of blocks. It can do this selectively, so some blocks can be converted lossy while others not. If it goes lossy, then the Heap Scan must recheck every row in every lossy block which it visits, because it no longer has information ...



Top 50 recent answers are included