explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GNi0

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 0.031 ↓ 0.0 0 1

Limit (cost=27.80..27.80 rows=1 width=410) (actual time=0.031..0.031 rows=0 loops=1)

2. 0.012 0.030 ↓ 0.0 0 1

Sort (cost=27.80..27.80 rows=1 width=410) (actual time=0.030..0.030 rows=0 loops=1)

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

GroupAggregate (cost=27.76..27.79 rows=1 width=410) (actual time=0.018..0.018 rows=0 loops=1)

  • Group Key: thread.id
4. 0.009 0.017 ↓ 0.0 0 1

Sort (cost=27.76..27.76 rows=1 width=410) (actual time=0.017..0.017 rows=0 loops=1)

  • Sort Key: thread.id DESC NULLS LAST
  • Sort Method: quicksort Memory: 25kB
5. 0.000 0.008 ↓ 0.0 0 1

Nested Loop Semi Join (cost=0.90..27.75 rows=1 width=410) (actual time=0.008..0.008 rows=0 loops=1)

  • Join Filter: (thread.id = sub_thread_participant.thread_id)
6. 0.002 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.75..27.42 rows=1 width=442) (actual time=0.008..0.008 rows=0 loops=1)

7. 0.000 0.006 ↓ 0.0 0 1

Nested Loop (cost=0.60..19.24 rows=1 width=386) (actual time=0.006..0.006 rows=0 loops=1)

8. 0.001 0.006 ↓ 0.0 0 1

Nested Loop (cost=0.45..19.00 rows=1 width=322) (actual time=0.006..0.006 rows=0 loops=1)

9. 0.001 0.005 ↓ 0.0 0 1

Nested Loop (cost=0.30..17.61 rows=1 width=241) (actual time=0.005..0.005 rows=0 loops=1)

10. 0.004 0.004 ↓ 0.0 0 1

Index Scan using idx_thread_entity_entity_id_entity_type on thread_entity (cost=0.15..8.17 rows=1 width=80) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((entity_id = '41413c6286-A'::text) AND (entity_type = 'MMP_ORDER'::text))
11. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_thread_id on thread (cost=0.15..9.43 rows=1 width=161) (never executed)

  • Index Cond: (id = thread_entity.thread_id)
  • Filter: ((SubPlan 1) && '{ROLE_MPS_OFFER_READ,ROLE_MPS_LOCATION_READ,ROLE_MPS_CATALOG_SEARCH,ROLE_MPS_ORDER_CUSTOM_ATTRIBUTE_EDIT,ROLE_MPS_LOCATION_WRITE,ROLE_MPS_ORDER_READ,ROLE_MPS_OFFER_MESSAGE_WRITE,ROLE_SHOP_ADMIN,ROLE_SHOP_INVENTORY,ROLE_SHOP_SALES,ROLE_MPS_DASHBOARD,ROLE_MPS_ORDER_MESSAGE_WRITE,ROLE_MPS_ORDER_WRITE,ROLE_MPS_CATEGORY_SEARCH,ROLE_MPS_OFFER_WRITE,ROLE_MPS_ORDER_EXPORT,ROLE_SHOP_SUPPORT,ROLE_MPS_MODEL_SEARCH,ROLE_SHOP_ACCOUNTANCY}'::text[])
12.          

SubPlan (forIndex Scan)

13. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.25..1.26 rows=1 width=32) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Function Scan on jsonb_array_elements_text x (cost=0.00..1.00 rows=100 width=32) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_thread_participant_thread_id on thread_participant_organization (cost=0.15..1.35 rows=4 width=81) (never executed)

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

Index Scan using pk_participant_id_participant_type on organization (cost=0.15..0.23 rows=1 width=128) (never executed)

  • Index Cond: ((id = thread_participant_organization.organization_id) AND (type = thread_participant_organization.organization_type))
17. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_entity_id_type on entity ent (cost=0.15..8.17 rows=1 width=184) (never executed)

  • Index Cond: ((id = '41413c6286-A'::text) AND (type = 'MMP_ORDER'::text))
18. 0.000 0.000 ↓ 0.0 0

Index Scan using uniq_thread_participant_thread_id_participant_id_participant_ty on thread_participant_organization sub_thread_participant (cost=0.15..0.23 rows=1 width=16) (never executed)

  • Index Cond: ((thread_id = thread_participant_organization.thread_id) AND (organization_id = '47949'::text) AND (organization_type = 'SHOP'::text))
  • Filter: has_contributed