Is there any way to speed up this Postgres bitmap heap scan?
问题 Database newbie here. This is my query, I'm using Postgres 9.3.5: =# explain analyse SELECT SUM(actual_cost) as cost, SUM(total_items) as num_items, processing_date FROM frontend_items WHERE chemical_id='0501013B0' GROUP BY processing_date; And this is the query plan: HashAggregate (cost=1648624.91..1648624.92 rows=1 width=16) (actual time=12591.844..12591.848 rows=17 loops=1) -> Bitmap Heap Scan on frontend_items (cost=14520.24..1643821.35 rows=640474 width=16) (actual time=254.841..12317