explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MJ6o

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=12,919.24..12,923.11 rows=36 width=1,124) (actual rows= loops=)

  • Group Key: r.id, r.group_id, r.version_id, r.created, r.type, r.parent_id, r.account_id, r.name, r.tags, r.source_id, r.original_source_id, r.move_audit, r.date_updated, r.resource_state, r.storage_modified_date, r.processing_status, r.boundary, r.acc_id (...)
2.          

CTE grower_resources

3. 0.000 0.000 ↓ 0.0

Limit (cost=0.72..12,320.37 rows=101 width=2,646) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.72..6,906,201.13 rows=56,619 width=2,646) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Index Scan using resources_pkey on resources r_1 (cost=0.43..6,276,012.50 rows=108,644 width=2,495) (actual rows= loops=)

  • Index Cond: (id > '0'::bigint)
  • Filter: (is_active_in_group AND ((type)::text = 'season'::text) AND ((processing_status)::text = 'complete'::text) AND (date_part('epoch'::text, date_updated) >= '1571184732'::double precision))
6. 0.000 0.000 ↓ 0.0

Index Scan using accounts_pkey on accounts acc (cost=0.29..5.79 rows=1 width=488) (actual rows= loops=)

  • Index Cond: (id = r_1.account_id)
  • Filter: ((NOT hidden) AND active)
7. 0.000 0.000 ↓ 0.0

Sort (cost=598.87..598.96 rows=36 width=1,028) (actual rows= loops=)

  • Sort Key: r.id, r.group_id, r.version_id, r.created, r.type, r.parent_id, r.account_id, r.name, r.tags, r.source_id, r.original_source_id, r.move_audit, r.date_updated, r.resource_state, r.storage_modified_date, r.processing_status, r.boundary, r.a (...)
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=16.56..597.94 rows=36 width=1,028) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=16.13..580.40 rows=36 width=1,020) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=15.70..562.42 rows=36 width=1,020) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=15.27..544.30 rows=36 width=1,000) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.85..308.67 rows=28 width=996) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.42..295.02 rows=28 width=988) (actual rows= loops=)

  • Join Filter: (aci.ag_identifier_id = ai.id)
14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.99..280.90 rows=28 width=988) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.56..184.48 rows=28 width=972) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=13.28..23.74 rows=28 width=964) (actual rows= loops=)

  • Hash Cond: (orig_sou.id = r.original_source_id)
17. 0.000 0.000 ↓ 0.0

Seq Scan on sources orig_sou (cost=0.00..10.28 rows=28 width=20) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=12.93..12.93 rows=28 width=952) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Hash Join (cost=10.63..12.93 rows=28 width=952) (actual rows= loops=)

  • Hash Cond: (r.source_id = sou.id)
20. 0.000 0.000 ↓ 0.0

CTE Scan on grower_resources r (cost=0.00..2.02 rows=101 width=940) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash (cost=10.28..10.28 rows=28 width=20) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on sources sou (cost=0.00..10.28 rows=28 width=20) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Index Scan using account_identifier_account_id_idx on account_identifier aci (cost=0.29..5.73 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (account_id = r.account_id)
24. 0.000 0.000 ↓ 0.0

Index Scan using ag_unique_identifier_ag_identifier_id_idx on ag_reference_identifier ari (cost=0.43..3.43 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (ag_identifier_id = aci.ag_identifier_id)
25. 0.000 0.000 ↓ 0.0

Index Scan using ag_identifiers_pkey on ag_identifiers ai (cost=0.43..0.49 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = ari.ag_identifier_id)
26. 0.000 0.000 ↓ 0.0

Index Scan using reference_identifiers_pkey on reference_identifiers ri (cost=0.43..0.49 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = ari.reference_identifier_id)
27. 0.000 0.000 ↓ 0.0

Index Scan using resource_identifier_resource_id_idx on resource_identifier rei (cost=0.43..8.41 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (resource_id = r.group_id)
28. 0.000 0.000 ↓ 0.0

Index Scan using ag_identifiers_pkey on ag_identifiers ai2 (cost=0.43..0.50 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = rei.ag_identifier_id)
29. 0.000 0.000 ↓ 0.0

Index Scan using ag_unique_identifier_ag_identifier_id_idx on ag_reference_identifier ari2 (cost=0.43..0.49 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (ag_identifier_id = ai2.id)
30. 0.000 0.000 ↓ 0.0

Index Scan using reference_identifiers_pkey on reference_identifiers ri2 (cost=0.43..0.49 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = ari2.reference_identifier_id)