explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NUf5

Settings
# exclusive inclusive rows x rows loops node
1. 189.012 4,843.032 ↑ 9,667.0 1 1

GroupAggregate (cost=388,218.88..388,460.61 rows=9,667 width=73) (actual time=4,843.032..4,843.032 rows=1 loops=1)

  • Group Key: (((context -> 'library'::text) ->> 'name'::text)), write_key
2. 899.472 4,654.020 ↓ 119.6 1,156,474 1

Sort (cost=388,218.88..388,243.06 rows=9,673 width=65) (actual time=4,532.713..4,654.020 rows=1,156,474 loops=1)

  • Sort Key: (((context -> 'library'::text) ->> 'name'::text)), write_key
  • Sort Method: external sort Disk: 90528kB
3. 2,599.489 3,754.548 ↓ 119.6 1,156,474 1

Bitmap Heap Scan on events (cost=349,766.73..387,578.54 rows=9,673 width=65) (actual time=1,156.546..3,754.548 rows=1,156,474 loops=1)

  • Recheck Cond: (((site_id)::text = 't66js6VS0cTxNPNOP007LXzm3JK2'::text) AND ("timestamp" > (CURRENT_DATE - '30 days'::interval day)) AND (widget_id IS NULL))
  • Rows Removed by Index Recheck: 2311702
  • Heap Blocks: lossy=584470
4. 44.226 1,155.059 ↓ 0.0 0 1

BitmapAnd (cost=349,766.73..349,766.73 rows=9,673 width=0) (actual time=1,155.059..1,155.059 rows=0 loops=1)

5. 208.031 208.031 ↓ 1.3 1,813,517 1

Bitmap Index Scan on site_id_idx (cost=0.00..47,093.89 rows=1,356,443 width=0) (actual time=208.031..208.031 rows=1,813,517 loops=1)

  • Index Cond: ((site_id)::text = 't66js6VS0cTxNPNOP007LXzm3JK2'::text)
6. 401.580 401.580 ↓ 1.6 6,763,494 1

Bitmap Index Scan on events_timestamp_idx (cost=0.00..78,617.46 rows=4,305,718 width=0) (actual time=401.580..401.580 rows=6,763,494 loops=1)

  • Index Cond: ("timestamp" > (CURRENT_DATE - '30 days'::interval day))
7. 501.222 501.222 ↓ 1.0 7,813,161 1

Bitmap Index Scan on events_widget_id_idx (cost=0.00..224,047.63 rows=7,746,542 width=0) (actual time=501.222..501.222 rows=7,813,161 loops=1)

  • Index Cond: (widget_id IS NULL)
Planning time : 0.156 ms
Execution time : 4,860.780 ms