explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 28abf

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 946.778 ↑ 1.0 1 1

Limit (cost=40,062.66..40,062.67 rows=1 width=8) (actual time=946.777..946.778 rows=1 loops=1)

2. 19.023 946.775 ↑ 1.0 1 1

Aggregate (cost=40,062.66..40,062.67 rows=1 width=8) (actual time=946.775..946.775 rows=1 loops=1)

3. 94.230 927.752 ↓ 79.1 70,094 1

Nested Loop Left Join (cost=2,219.82..40,060.44 rows=886 width=0) (actual time=14.766..927.752 rows=70,094 loops=1)

4. 45.632 342.864 ↓ 79.1 70,094 1

Hash Left Join (cost=2,219.40..34,079.96 rows=886 width=27) (actual time=14.745..342.864 rows=70,094 loops=1)

  • Hash Cond: ((sf_opps.travel_country_primary_c)::text = sf_country.name)
5. 38.016 297.067 ↓ 79.1 70,094 1

Hash Left Join (cost=2,210.82..34,059.23 rows=886 width=36) (actual time=14.564..297.067 rows=70,094 loops=1)

  • Hash Cond: ((sf_opps.id)::text = (sf_nps_trip.opportunity_c)::text)
6. 42.799 255.922 ↓ 79.1 70,094 1

Hash Left Join (cost=1,169.90..33,012.61 rows=886 width=55) (actual time=11.422..255.922 rows=70,094 loops=1)

  • Hash Cond: ((sf_opps.id)::text = (sf_nps_call.opportunity_c)::text)
7. 201.774 201.774 ↓ 79.1 70,093 1

Seq Scan on opportunity sf_opps (cost=0.00..31,836.22 rows=886 width=74) (actual time=0.014..201.774 rows=70,093 loops=1)

  • Filter: ((is_deleted IS NOT TRUE) AND ((tps_lead_c IS TRUE) OR ((nezasa_template_id_c IS NOT NULL) AND (initial_inquiry_profile_c IS NULL))) AND ((strpos((loss_reason_c)::text, 'Testanfrage'::text) IS NULL) OR (strpos((loss_reason_c)::text, 'Testanfrage'::text) = 0)))
  • Rows Removed by Filter: 43797
8. 4.295 11.349 ↑ 1.0 12,250 1

Hash (cost=1,016.74..1,016.74 rows=12,253 width=19) (actual time=11.348..11.349 rows=12,250 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 739kB
9. 7.054 7.054 ↑ 1.0 12,253 1

Seq Scan on net_promoter_score_c sf_nps_call (cost=0.00..1,016.74 rows=12,253 width=19) (actual time=0.006..7.054 rows=12,253 loops=1)

  • Filter: ((name)::text = 'Closed opportunity'::text)
  • Rows Removed by Filter: 1966
10. 0.687 3.129 ↑ 1.0 1,935 1

Hash (cost=1,016.74..1,016.74 rows=1,935 width=19) (actual time=3.128..3.129 rows=1,935 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 113kB
11. 2.442 2.442 ↑ 1.0 1,935 1

Seq Scan on net_promoter_score_c sf_nps_trip (cost=0.00..1,016.74 rows=1,935 width=19) (actual time=0.007..2.442 rows=1,935 loops=1)

  • Filter: ((name)::text = 'End of trip'::text)
  • Rows Removed by Filter: 12284
12. 0.090 0.165 ↑ 1.0 248 1

Hash (cost=5.48..5.48 rows=248 width=11) (actual time=0.164..0.165 rows=248 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
13. 0.075 0.075 ↑ 1.0 248 1

Seq Scan on countries sf_country (cost=0.00..5.48 rows=248 width=11) (actual time=0.006..0.075 rows=248 loops=1)

14. 490.658 490.658 ↑ 1.0 1 70,094

Index Scan using opp_nr_idx on opportunity sf_opps_1 (cost=0.42..6.74 rows=1 width=27) (actual time=0.007..0.007 rows=1 loops=70,094)

  • Index Cond: ((opportunity_nr_c)::text = (sf_opps.opportunity_nr_c)::text)
  • Filter: ((account_id)::text = (sf_opps.account_id)::text)
Planning time : 7.639 ms
Execution time : 946.906 ms