explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SYTm

Settings
# exclusive inclusive rows x rows loops node
1. 0.063 11,338.251 ↑ 63.6 12 1

Merge Left Join (cost=120,507.64..120,530.67 rows=763 width=1,181) (actual time=11,338.210..11,338.251 rows=12 loops=1)

  • Merge Cond: (proposition.proposition_id = anon_2.proposition_id)
2.          

CTE anon_1

3. 35.408 11,337.599 ↑ 1.8 12 1

HashAggregate (cost=90,444.62..90,445.00 rows=22 width=28) (actual time=11,337.593..11,337.599 rows=12 loops=1)

  • Group Key: adset_proposition_stat.proposition_id
4. 11,292.661 11,302.191 ↓ 1.0 32,727 1

Bitmap Heap Scan on adset_proposition_stat (cost=827.80..90,125.12 rows=31,950 width=28) (actual time=14.565..11,302.191 rows=32,727 loops=1)

  • Recheck Cond: ((dynamicinput_id = 4506) AND (hour >= 385703) AND (hour <= 436257))
  • Heap Blocks: exact=27847
5. 9.530 9.530 ↓ 1.0 32,727 1

Bitmap Index Scan on adset_proposition_stat_input_hour (cost=0.00..819.81 rows=31,950 width=0) (actual time=9.530..9.530 rows=32,727 loops=1)

  • Index Cond: ((dynamicinput_id = 4506) AND (hour >= 385703) AND (hour <= 436257))
6.          

CTE anon_2

7. 0.003 0.028 ↓ 0.0 0 1

HashAggregate (cost=489.10..489.12 rows=2 width=4) (actual time=0.028..0.028 rows=0 loops=1)

  • Group Key: dynamicinputerror.proposition_id
8. 0.001 0.025 ↓ 0.0 0 1

Bitmap Heap Scan on dynamicinputerror (cost=17.39..488.47 rows=126 width=4) (actual time=0.025..0.025 rows=0 loops=1)

  • Recheck Cond: (dynamicinput_id = 4506)
  • Filter: (("time" >= '2013-12-31 23:00:00'::timestamp without time zone) AND ("time" <= '2019-10-08 09:59:59'::timestamp without time zone))
9. 0.024 0.024 ↓ 0.0 0 1

Bitmap Index Scan on ix_dynamicinputerror_dynamicinput_id (cost=0.00..17.36 rows=126 width=0) (actual time=0.024..0.024 rows=0 loops=1)

  • Index Cond: (dynamicinput_id = 4506)
10. 0.020 11,338.147 ↑ 63.6 12 1

Merge Left Join (cost=29,573.46..29,577.40 rows=763 width=1,173) (actual time=11,338.127..11,338.147 rows=12 loops=1)

  • Merge Cond: (proposition.proposition_id = anon_1.proposition_id)
11. 0.031 0.490 ↑ 63.6 12 1

Sort (cost=29,572.53..29,574.44 rows=763 width=1,077) (actual time=0.486..0.490 rows=12 loops=1)

  • Sort Key: proposition.proposition_id
  • Sort Method: quicksort Memory: 26kB
12. 0.021 0.459 ↑ 63.6 12 1

Hash Left Join (cost=13.28..29,536.00 rows=763 width=1,077) (actual time=0.234..0.459 rows=12 loops=1)

  • Hash Cond: (proposition.proposition_id = dynamicinputpriority.proposition_id)
13. 0.009 0.305 ↑ 63.6 12 1

Nested Loop (cost=5.25..29,525.10 rows=763 width=1,073) (actual time=0.089..0.305 rows=12 loops=1)

14. 0.002 0.065 ↑ 1.0 1 1

Nested Loop (cost=4.69..18.50 rows=1 width=4) (actual time=0.057..0.065 rows=1 loops=1)

15. 0.005 0.037 ↑ 1.0 1 1

Nested Loop (cost=4.69..16.73 rows=1 width=8) (actual time=0.035..0.037 rows=1 loops=1)

16. 0.006 0.014 ↑ 1.0 1 1

Bitmap Heap Scan on dynamicinput (cost=4.42..8.43 rows=1 width=8) (actual time=0.013..0.014 rows=1 loops=1)

  • Recheck Cond: (dynamicinput_id = 4506)
  • Heap Blocks: exact=1
17. 0.008 0.008 ↑ 1.0 1 1

Bitmap Index Scan on dynamicinput_pkey (cost=0.00..4.42 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (dynamicinput_id = 4506)
18. 0.018 0.018 ↑ 1.0 1 1

Index Scan using advertiser_pkey on advertiser (cost=0.27..8.29 rows=1 width=8) (actual time=0.017..0.018 rows=1 loops=1)

  • Index Cond: (advertiser_id = dynamicinput.advertiser_id)
  • Filter: (agency_id = 2)
19. 0.026 0.026 ↑ 1.0 1 1

Seq Scan on agency (cost=0.00..1.76 rows=1 width=4) (actual time=0.020..0.026 rows=1 loops=1)

  • Filter: (agency_id = 2)
  • Rows Removed by Filter: 60
20. 0.231 0.231 ↑ 606.6 12 1

Index Scan using dynamicinput_id_key_index on proposition (cost=0.56..29,433.81 rows=7,279 width=1,073) (actual time=0.031..0.231 rows=12 loops=1)

  • Index Cond: (dynamicinput_id = 4506)
21. 0.055 0.133 ↑ 1.0 179 1

Hash (cost=5.79..5.79 rows=179 width=8) (actual time=0.133..0.133 rows=179 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
22. 0.078 0.078 ↑ 1.0 179 1

Seq Scan on dynamicinputpriority (cost=0.00..5.79 rows=179 width=8) (actual time=0.002..0.078 rows=179 loops=1)

23. 0.022 11,337.637 ↑ 1.8 12 1

Sort (cost=0.93..0.99 rows=22 width=100) (actual time=11,337.633..11,337.637 rows=12 loops=1)

  • Sort Key: anon_1.proposition_id
  • Sort Method: quicksort Memory: 25kB
24. 11,337.615 11,337.615 ↑ 1.8 12 1

CTE Scan on anon_1 (cost=0.00..0.44 rows=22 width=100) (actual time=11,337.599..11,337.615 rows=12 loops=1)

25. 0.013 0.041 ↓ 0.0 0 1

Sort (cost=0.05..0.06 rows=2 width=12) (actual time=0.041..0.041 rows=0 loops=1)

  • Sort Key: anon_2.proposition_id
  • Sort Method: quicksort Memory: 25kB
26. 0.028 0.028 ↓ 0.0 0 1

CTE Scan on anon_2 (cost=0.00..0.04 rows=2 width=12) (actual time=0.028..0.028 rows=0 loops=1)