explain.depesz.com

PostgreSQL's explain analyze made readable

Result: B9Xi

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 16.019 ↓ 6.0 6 1

Limit (cost=11,278.92..11,278.92 rows=1 width=650) (actual time=16.018..16.019 rows=6 loops=1)

2. 0.021 16.019 ↓ 6.0 6 1

Sort (cost=11,278.92..11,278.92 rows=1 width=650) (actual time=16.018..16.019 rows=6 loops=1)

  • Sort Key: a.latest_seen
  • Sort Method: quicksort Memory: 27kB
3. 3.324 15.998 ↓ 6.0 6 1

Hash Left Join (cost=1,201.73..11,278.91 rows=1 width=650) (actual time=7.163..15.998 rows=6 loops=1)

  • Hash Cond: (a.owning_group_id = gp.id)
  • Filter: (((((gp.name)::text = 'td'::text) OR (((gp.name)::text = 'archive'::text) AND (((a.state)::text = 'NEW'::text) OR ((a.state)::text = 'ACK'::text)) AND (NOT (a.tags @> '{"trade_desk": false}'::jsonb))) OR (((gp.name)::text =
  • Rows Removed by Filter: 3042
4. 6.545 12.666 ↓ 1.1 3,048 1

Bitmap Heap Scan on alerts_alert a (cost=1,200.08..11,017.65 rows=2,697 width=658) (actual time=6.451..12.666 rows=3,048 loops=1)

  • Recheck Cond: (((owner_id IS NULL) AND (((state)::text = 'NEW'::text) OR ((state)::text = 'ACK'::text))) OR (((type)::text = 'exchange_latency'::text) AND ((state)::text = 'NEW'::text)) OR ((((state)::text = 'NEW'::text) AND
  • Filter: (((((state)::text = 'NEW'::text) OR ((state)::text = 'ACK'::text)) AND (NOT (tags @> '{"severity": "-1"}'::jsonb)) AND (NOT (tags @> '{"severity": "info"}'::jsonb)) AND ((type)::text <> 'TD-Gateway-OrderRejects'::text
  • Heap Blocks: exact=2606
5. 0.133 6.121 ↓ 0.0 0 1

BitmapOr (cost=1,200.08..1,200.08 rows=2,702 width=0) (actual time=6.121..6.121 rows=0 loops=1)

6. 0.158 3.338 ↓ 0.0 0 1

BitmapAnd (cost=418.63..418.63 rows=4 width=0) (actual time=3.338..3.338 rows=0 loops=1)

7. 1.731 1.731 ↓ 1.8 3,491 1

Bitmap Index Scan on alerts_alert_5e7b1936 (cost=0.00..143.29 rows=1,982 width=0) (actual time=1.731..1.731 rows=3,491 loops=1)

  • Index Cond: (owner_id IS NULL)
8. 0.001 1.449 ↓ 0.0 0 1

BitmapOr (cost=274.41..274.41 rows=2,694 width=0) (actual time=1.449..1.449 rows=0 loops=1)

9. 1.145 1.145 ↓ 1.1 1,993 1

Bitmap Index Scan on alerts_alert_9ed39e2e (cost=0.00..190.53 rows=1,881 width=0) (actual time=1.145..1.145 rows=1,993 loops=1)

  • Index Cond: ((state)::text = 'NEW'::text)
10. 0.303 0.303 ↓ 1.3 1,097 1

Bitmap Index Scan on alerts_alert_9ed39e2e (cost=0.00..82.52 rows=813 width=0) (actual time=0.303..0.303 rows=1,097 loops=1)

  • Index Cond: ((state)::text = 'ACK'::text)
11. 0.027 0.621 ↓ 0.0 0 1

BitmapAnd (cost=248.03..248.03 rows=1 width=0) (actual time=0.621..0.621 rows=0 loops=1)

12. 0.038 0.038 ↑ 2.0 221 1

Bitmap Index Scan on alerts_alert_type_3021f46f_like (cost=0.00..55.90 rows=446 width=0) (actual time=0.038..0.038 rows=221 loops=1)

  • Index Cond: ((type)::text = 'exchange_latency'::text)
13. 0.556 0.556 ↓ 1.1 1,993 1

Bitmap Index Scan on alerts_alert_9ed39e2e (cost=0.00..190.53 rows=1,881 width=0) (actual time=0.556..0.556 rows=1,993 loops=1)

  • Index Cond: ((state)::text = 'NEW'::text)
14. 0.000 0.553 ↓ 0.0 0 1

BitmapOr (cost=10.23..10.23 rows=3 width=0) (actual time=0.553..0.553 rows=0 loops=1)

15. 0.552 0.552 ↓ 996.5 1,993 1

Bitmap Index Scan on alerts_alert_9ed39e2e (cost=0.00..4.45 rows=2 width=0) (actual time=0.552..0.552 rows=1,993 loops=1)

  • Index Cond: (((state)::text = 'NEW'::text) AND ((state)::text = 'NEW'::text))
16. 0.001 0.001 ↓ 0.0 0 1

Bitmap Index Scan on alerts_alert_9ed39e2e (cost=0.00..4.44 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (((state)::text = 'ACK'::text) AND ((state)::text = 'NEW'::text))
17. 0.039 0.802 ↓ 0.0 0 1

BitmapAnd (cost=248.03..248.03 rows=1 width=0) (actual time=0.802..0.802 rows=0 loops=1)

18. 0.199 0.199 ↓ 1.2 537 1

Bitmap Index Scan on alerts_alert_type_3021f46f_like (cost=0.00..55.90 rows=446 width=0) (actual time=0.199..0.199 rows=537 loops=1)

  • Index Cond: ((type)::text = 'nw_bridge_not_running'::text)
19. 0.564 0.564 ↓ 1.1 1,993 1

Bitmap Index Scan on alerts_alert_9ed39e2e (cost=0.00..190.53 rows=1,881 width=0) (actual time=0.564..0.564 rows=1,993 loops=1)

  • Index Cond: ((state)::text = 'NEW'::text)
20. 0.482 0.482 ↓ 1.1 1,993 1

Bitmap Index Scan on alerts_alert_9ed39e2e (cost=0.00..190.53 rows=1,881 width=0) (actual time=0.482..0.482 rows=1,993 loops=1)

  • Index Cond: ((state)::text = 'NEW'::text)
21. 0.192 0.192 ↓ 1.3 1,097 1

Bitmap Index Scan on alerts_alert_9ed39e2e (cost=0.00..82.52 rows=813 width=0) (actual time=0.192..0.192 rows=1,097 loops=1)

  • Index Cond: ((state)::text = 'ACK'::text)
22. 0.004 0.008 ↓ 1.0 30 1

Hash (cost=1.29..1.29 rows=29 width=10) (actual time=0.008..0.008 rows=30 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
23. 0.004 0.004 ↓ 1.0 30 1

Seq Scan on auth_group gp (cost=0.00..1.29 rows=29 width=10) (actual time=0.002..0.004 rows=30 loops=1)