explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jc2K : Survey production

Settings
# exclusive inclusive rows x rows loops node
1. 0.075 17.242 ↑ 1.1 90 1

Hash Left Join (cost=2,278.66..2,295.53 rows=100 width=193) (actual time=17.148..17.242 rows=90 loops=1)

  • Hash Cond: (s.id_survey = sa.fk_survey)
2. 0.060 1.335 ↑ 1.1 90 1

Hash Left Join (cost=172.49..189.08 rows=100 width=185) (actual time=1.260..1.335 rows=90 loops=1)

  • Hash Cond: (s.id_survey = sr.fk_survey)
3. 0.021 0.104 ↑ 1.1 90 1

Hash Left Join (cost=17.43..33.75 rows=100 width=177) (actual time=0.047..0.104 rows=90 loops=1)

  • Hash Cond: (s.fk_place = p.id_place)
4. 0.066 0.066 ↑ 1.1 90 1

Seq Scan on surveys s (cost=0.00..16.06 rows=100 width=145) (actual time=0.020..0.066 rows=90 loops=1)

  • Filter: (deletedat IS NULL)
  • Rows Removed by Filter: 6
5. 0.007 0.017 ↑ 110.0 3 1

Hash (cost=13.30..13.30 rows=330 width=64) (actual time=0.017..0.017 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.010 0.010 ↑ 110.0 3 1

Seq Scan on places p (cost=0.00..13.30 rows=330 width=64) (actual time=0.010..0.010 rows=3 loops=1)

7. 0.071 1.171 ↑ 1.0 39 1

Hash (cost=154.57..154.57 rows=39 width=13) (actual time=1.171..1.171 rows=39 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
8. 0.001 1.100 ↑ 1.0 39 1

Subquery Scan on sr (cost=153.79..154.57 rows=39 width=13) (actual time=1.093..1.100 rows=39 loops=1)

9. 0.705 1.099 ↑ 1.0 39 1

HashAggregate (cost=153.79..154.18 rows=39 width=13) (actual time=1.093..1.099 rows=39 loops=1)

  • Group Key: sr_1.fk_survey
10. 0.394 0.394 ↓ 1.0 2,260 1

Seq Scan on survey_responses sr_1 (cost=0.00..142.53 rows=2,253 width=5) (actual time=0.009..0.394 rows=2,260 loops=1)

11. 0.010 15.832 ↓ 1.2 35 1

Hash (cost=2,105.80..2,105.80 rows=30 width=13) (actual time=15.832..15.832 rows=35 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
12. 0.005 15.822 ↓ 1.2 35 1

Subquery Scan on sa (cost=2,105.20..2,105.80 rows=30 width=13) (actual time=15.815..15.822 rows=35 loops=1)

13. 8.328 15.817 ↓ 1.2 35 1

HashAggregate (cost=2,105.20..2,105.50 rows=30 width=13) (actual time=15.814..15.817 rows=35 loops=1)

  • Group Key: sa_1.fk_survey
14. 7.489 7.489 ↓ 1.0 34,324 1

Seq Scan on survey_audiences sa_1 (cost=0.00..1,937.50 rows=33,540 width=5) (actual time=0.030..7.489 rows=34,324 loops=1)

  • Filter: (deletedat IS NULL)
  • Rows Removed by Filter: 14
Planning time : 2,149.353 ms
Execution time : 17.525 ms