explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W3Zw : Optimization for: plan #lFxu

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.037 433.261 ↓ 1.6 221 1

Limit (cost=5,961.71..5,962.96 rows=136 width=3,018) (actual time=432.812..433.261 rows=221 loops=1)

2. 0.354 433.224 ↓ 1.6 221 1

Unique (cost=5,961.71..5,962.96 rows=136 width=3,018) (actual time=432.810..433.224 rows=221 loops=1)

3. 2.046 432.870 ↑ 1.0 250 1

Sort (cost=5,961.71..5,962.33 rows=250 width=3,018) (actual time=432.808..432.870 rows=250 loops=1)

  • Sort Key: person.id
  • Sort Method: quicksort Memory: 599kB
4. 0.940 430.824 ↑ 1.0 250 1

Nested Loop Left Join (cost=10.27..5,951.75 rows=250 width=3,018) (actual time=0.314..430.824 rows=250 loops=1)

5. 0.105 429.384 ↑ 1.0 250 1

Limit (cost=9.84..5,280.98 rows=250 width=2,442) (actual time=0.298..429.384 rows=250 loops=1)

6. 15.663 429.279 ↑ 11.1 250 1

Nested Loop Semi Join (cost=9.84..58,582.77 rows=2,778 width=2,442) (actual time=0.298..429.279 rows=250 loops=1)

7. 38.777 94.056 ↓ 1.4 31,956 1

Nested Loop (cost=8.98..8,350.16 rows=22,723 width=642) (actual time=0.119..94.056 rows=31,956 loops=1)

8. 0.003 0.094 ↑ 3.0 1 1

HashAggregate (cost=8.42..8.45 rows=3 width=4) (actual time=0.094..0.094 rows=1 loops=1)

  • Group Key: data_models_region.id
9. 0.004 0.091 ↑ 1.0 3 1

Nested Loop (cost=0.61..8.41 rows=3 width=4) (actual time=0.062..0.091 rows=3 loops=1)

10. 0.031 0.033 ↑ 1.0 3 1

HashAggregate (cost=0.05..0.08 rows=3 width=32) (actual time=0.032..0.033 rows=3 loops=1)

  • Group Key: "*VALUES*".column1
11. 0.002 0.002 ↑ 1.0 3 1

Values Scan on "*VALUES*" (cost=0.00..0.04 rows=3 width=32) (actual time=0.001..0.002 rows=3 loops=1)

12. 0.054 0.054 ↑ 1.0 1 3

Index Scan using data_models_region_name_30ddeac3_like on data_models_region (cost=0.56..2.78 rows=1 width=36) (actual time=0.018..0.018 rows=1 loops=3)

  • Index Cond: (name = "*VALUES*".column1)
13. 55.185 55.185 ↓ 4.2 31,956 1

Index Scan using view_person_experience_current_region_id_idx on view_person_experience_current person (cost=0.57..2,704.83 rows=7,574 width=646) (actual time=0.022..55.185 rows=31,956 loops=1)

  • Index Cond: (region_id = data_models_region.id)
14. 0.000 319.560 ↓ 0.0 0 31,956

Nested Loop (cost=0.85..2.20 rows=1 width=4) (actual time=0.010..0.010 rows=0 loops=31,956)

15. 31.956 319.560 ↓ 0.0 0 31,956

Nested Loop Semi Join (cost=0.72..2.04 rows=1 width=8) (actual time=0.010..0.010 rows=0 loops=31,956)

16. 191.736 191.736 ↑ 1.0 1 31,956

Index Scan using view_organization_domains_employees_id_idx on view_organization_domains_employees orgs_1 (cost=0.43..1.12 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=31,956)

  • Index Cond: (id = person.organization_id)
17. 32.862 95.868 ↓ 0.0 0 31,956

Nested Loop Semi Join (cost=0.28..0.90 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=31,956)

  • Join Filter: (data_models_industry.name = "*VALUES*_1".column1)
  • Rows Removed by Join Filter: 2
18. 31.956 31.956 ↑ 1.0 1 31,956

Index Scan using data_models_industry_pkey on data_models_industry (cost=0.28..0.85 rows=1 width=26) (actual time=0.001..0.001 rows=1 loops=31,956)

  • Index Cond: (id = orgs_1.industry_id)
19. 31.050 31.050 ↑ 1.0 2 31,050

Values Scan on "*VALUES*_1" (cost=0.00..0.03 rows=2 width=32) (actual time=0.000..0.001 rows=2 loops=31,050)

20. 0.822 0.822 ↓ 0.0 0 822

Index Scan using data_models_organizationsize_pkey on data_models_organizationsize (cost=0.14..0.16 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=822)

  • Index Cond: (id = orgs_1.li_size_id)
  • Filter: ((size_min >= 10) AND (size_max <= 1000))
  • Rows Removed by Filter: 1
21. 0.500 0.500 ↑ 1.0 1 250

Index Scan using view_organization_domains_employees_id_idx on view_organization_domains_employees orgs (cost=0.43..2.65 rows=1 width=2,302) (actual time=0.002..0.002 rows=1 loops=250)

  • Index Cond: (person.organization_id = id)
Planning time : 2.993 ms
Execution time : 433.657 ms