By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
525601 rows affected
| QUERY PLAN |
|---|
| GroupAggregate (actual time=5.558..277.689 rows=53 loops=1) |
| Group Key: date_part('week'::text, "timestamp") |
| -> Index Scan using idx_ts on eddi_minute em (actual time=0.064..216.788 rows=525601 loops=1) |
| Planning Time: 0.510 ms |
| Execution Time: 277.864 ms |
| QUERY PLAN |
|---|
| Aggregate (actual time=0.043..0.044 rows=1 loops=1) |
| -> Bitmap Heap Scan on eddi_minute em (actual time=0.036..0.037 rows=1 loops=1) |
| Recheck Cond: (("timestamp" >= '2021-06-23 00:01:00'::timestamp without time zone) AND ("timestamp" < '2021-06-23 00:02:00'::timestamp without time zone)) |
| Heap Blocks: exact=1 |
| -> Bitmap Index Scan on idx_timestamp (actual time=0.026..0.026 rows=1 loops=1) |
| Index Cond: (("timestamp" >= '2021-06-23 00:01:00'::timestamp without time zone) AND ("timestamp" < '2021-06-23 00:02:00'::timestamp without time zone)) |
| Planning Time: 0.141 ms |
| Execution Time: 0.077 ms |