explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a4NK

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 1,026.704 ↑ 400.0 5 1

Unique (cost=49,256.62..49,266.62 rows=2,000 width=657) (actual time=1,026.701..1,026.704 rows=5 loops=1)

  • "value": "8888"}]'::jsonb)) OR (related_identifier_list @> '[{"key": "status", "value": "Done"}]'::jsonb) OR ((event_info @> '[{"key": "status", "value": "Inprogress"}]'::jsonb) AND (event_info @> '[{"key": "hostname", "value": "Sony"}]'::jsonb) AND (related_identifier_list @> '[{"key": "port", "value": "7777"}]'::jsonb) AND ((related_identifier_list @> '[{"key": "hostname", "value": "Zalo"}]'::jsonb) OR (related_identifier_list @> '[{"key": "status", "value": "Done"}]'::jsonb))))
2. 0.011 1,026.701 ↑ 400.0 5 1

Sort (cost=49,256.62..49,261.62 rows=2,000 width=657) (actual time=1,026.700..1,026.701 rows=5 loops=1)

  • Sort Key: event_id
  • Sort Method: quicksort Memory: 30kB
3. 0.037 1,026.690 ↑ 400.0 5 1

Bitmap Heap Scan on event_status_info (cost=4.50..49,146.96 rows=2,000 width=657) (actual time=1,026.682..1,026.690 rows=5 loops=1)

  • Recheck Cond: (((event_additional_param @> '[{"key": "hostname", "value": "Sony"}]'::jsonb) AND (event_additional_param @> '[{"key": "status", "value": "Completed"}]'::jsonb)) OR (event_info @> '[{"key": "port, "value": "8888"}]'::jsonb) OR ((event_info @> '[{"key": "port", "value": "8888"}]'::jsonb) AND (event_additional_param @> '[{"key": "hostname", "value": "Zalo"}]'::jsonb)) OR (related_identifier_list @> '[{"key": "status, "value": "Done"}]'::jsonb) OR ((event_info @> '[{"key": "status", "value": "Inprogress"}]'::jsonb) AND (event_info @> '[{"key": "hostname", "value": "Sony"}]'::jsonb) AND (related_identifier_list @> '[{"key": "port", "value": "7777"}]'::jsonb)))
  • Filter: (((event_additional_param @> '[{"key": "hostname", "value": "Sony"}]'::jsonb) AND (event_additional_param @> '[{"key": "status", "value": "Completed"}]'::jsonb)) OR ((NOT (event_additional_param @> '[{"key": "port", "value": "1111"}]'::jsonb)) AND (event_info @> '[{"key": "port", "value": "8888"}]'::jsonb)) OR ((event_additional_param @> '[{"key": "hostname", "value": "Zalo"}]'::jsonb) AND (event_info @> '[{"key": "port",
  • Heap Blocks: exact=2
4. 0.011 1,026.653 ↓ 0.0 0 1

BitmapOr (cost=4.50..4.50 rows=20,201 width=0) (actual time=1,026.653..1,026.653 rows=0 loops=1)

5. 134.937 134.937 ↓ 0.0 0 1

Bitmap Index Scan on event_additional_param_index (cost=0.00..0.00 rows=100 width=0) (actual time=134.937..134.937 rows=0 loops=1)

  • Index Cond: ((event_additional_param @> '[{"key": "hostname", "value": "Sony"}]'::jsonb) AND (event_additional_param @> '[{"key": "status", "value": "Completed"}]'::jsonb))
6. 133.313 133.313 ↑ 2,000.0 5 1

Bitmap Index Scan on event_info_index (cost=0.00..0.00 rows=10,000 width=0) (actual time=133.313..133.313 rows=5 loops=1)

  • Index Cond: (event_info @> '[{"key": "port", "value": "8888"}]'::jsonb)
7. 0.005 267.652 ↓ 0.0 0 1

BitmapAnd (cost=1.25..1.25 rows=100 width=0) (actual time=267.652..267.652 rows=0 loops=1)

8. 133.228 133.228 ↑ 2,000.0 5 1

Bitmap Index Scan on event_info_index (cost=0.00..0.00 rows=10,000 width=0) (actual time=133.228..133.228 rows=5 loops=1)

  • Index Cond: (event_info @> '[{"key": "port", "value": "8888"}]'::jsonb)
9. 134.419 134.419 ↑ 3,333.3 3 1

Bitmap Index Scan on event_additional_param_index (cost=0.00..0.00 rows=10,000 width=0) (actual time=134.419..134.419 rows=3 loops=1)

  • Index Cond: (event_additional_param @> '[{"key": "hostname", "value": "Zalo"}]'::jsonb)
10. 131.116 131.116 ↑ 2,000.0 5 1

Bitmap Index Scan on related_identifier_list_index (cost=0.00..0.00 rows=10,000 width=0) (actual time=131.116..131.116 rows=5 loops=1)

  • Index Cond: (related_identifier_list @> '[{"key": "status", "value": "Done"}]'::jsonb)
11. 0.004 359.624 ↓ 0.0 0 1

BitmapAnd (cost=1.25..1.25 rows=1 width=0) (actual time=359.624..359.624 rows=0 loops=1)

12. 228.076 228.076 ↑ 33.3 3 1

Bitmap Index Scan on event_info_index (cost=0.00..0.00 rows=100 width=0) (actual time=228.076..228.076 rows=3 loops=1)

  • Index Cond: ((event_info @> '[{"key": "status", "value": "Inprogress"}]'::jsonb) AND (event_info @> '[{"key": "hostname", "value": "Sony"}]'::jsonb))
13. 131.544 131.544 ↑ 2,000.0 5 1

Bitmap Index Scan on related_identifier_list_index (cost=0.00..0.00 rows=10,000 width=0) (actual time=131.544..131.544 rows=5 loops=1)

  • Index Cond: (related_identifier_list @> '[{"key": "port", "value": "7777"}]'::jsonb)
Planning time : 7.531 ms
Execution time : 1,038.439 ms