explain.depesz.com

PostgreSQL's explain analyze made readable

Result: U6Pk

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 1,310.689 ↓ 0.0 0 1

Limit (cost=803,012.47..803,012.73 rows=101 width=24) (actual time=1,310.689..1,310.689 rows=0 loops=1)

2. 0.083 1,310.688 ↓ 0.0 0 1

Sort (cost=803,012.47..803,019.55 rows=2,831 width=24) (actual time=1,310.688..1,310.688 rows=0 loops=1)

  • Sort Key: thread.date_updated DESC NULLS LAST, thread.id DESC NULLS LAST
  • Sort Method: quicksort Memory: 25kB
3. 0.005 1,310.605 ↓ 0.0 0 1

HashAggregate (cost=802,875.76..802,904.07 rows=2,831 width=24) (actual time=1,310.605..1,310.605 rows=0 loops=1)

  • Group Key: thread.id
4. 0.001 1,310.600 ↓ 0.0 0 1

Nested Loop (cost=1.27..802,868.61 rows=2,862 width=24) (actual time=1,310.600..1,310.600 rows=0 loops=1)

5. 0.000 1,310.599 ↓ 0.0 0 1

Nested Loop (cost=0.85..798,890.61 rows=8,493 width=57) (actual time=1,310.599..1,310.599 rows=0 loops=1)

6. 0.001 1,310.599 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.42..760,954.80 rows=2,831 width=24) (actual time=1,310.599..1,310.599 rows=0 loops=1)

7. 178.160 1,310.598 ↓ 0.0 0 1

Seq Scan on thread (cost=0.00..743,565.77 rows=2,831 width=24) (actual time=1,310.598..1,310.598 rows=0 loops=1)

  • Filter: ((NOT anonymized) AND ((SubPlan 1) && '{"ROLE_MPS_OFFER_READ,ROLE_MPS_MODEL_READ,ROLE_MPS_MODEL_WRITE,ROLE_OP_TECHNICAL_SETTING_READ,ROLE_MPS_CATALOG_SEARCH,ROLE_OP_ORDER_DOCUMENT_WRITE,ROLE_OP_SHOP_WRITE,ROLE_ (...)
  • Rows Removed by Filter: 566219
8.          

SubPlan (forSeq Scan)

9. 566.219 1,132.438 ↑ 1.0 1 566,219

Aggregate (cost=1.25..1.26 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=566,219)

10. 566.219 566.219 ↑ 25.0 4 566,219

Function Scan on jsonb_array_elements_text x (cost=0.00..1.00 rows=100 width=32) (actual time=0.001..0.001 rows=4 loops=566,219)

11. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_thread_entity_thread_id on thread_entity (cost=0.42..6.13 rows=1 width=57) (never executed)

  • Index Cond: (thread.id = thread_id)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_thread_participant_thread_id on thread_participant_organization (cost=0.43..13.37 rows=3 width=49) (never executed)

  • Index Cond: (thread_id = thread.id)
13. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_participant_id_participant_type on organization (cost=0.42..0.46 rows=1 width=44) (never executed)

  • Index Cond: ((id = thread_participant_organization.organization_id) AND (type = thread_participant_organization.organization_type))
  • Heap Fetches: 0