explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GCOZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.051 63.150 ↑ 33,333.6 30 1

Result (cost=4.32..583,266.94 rows=1,000,008 width=296) (actual time=27.536..63.150 rows=30 loops=1)

2. 0.004 63.009 ↑ 33,333.6 30 1

Append (cost=4.32..58,262.74 rows=1,000,008 width=296) (actual time=27.513..63.009 rows=30 loops=1)

3. 0.141 61.629 ↓ 2.1 17 1

Subquery Scan on *SELECT* 1 (cost=4.32..552.41 rows=8 width=296) (actual time=27.513..61.629 rows=17 loops=1)

  • Filter: (("*SELECT* 1".tenant_key)::text = 'f8792720e1184218e31f7bbc41246beea02d629588d604a786c8db87dde3e602'::text)
  • Rows Removed by Filter: 982
4. 3.148 61.488 ↓ 2.5 999 1

WindowAgg (cost=4.32..547.41 rows=400 width=812) (actual time=0.279..61.488 rows=999 loops=1)

5. 0.312 58.340 ↓ 2.5 999 1

Nested Loop (cost=4.32..531.41 rows=400 width=99) (actual time=0.259..58.340 rows=999 loops=1)

6. 0.341 56.030 ↓ 2.5 999 1

Nested Loop (cost=4.32..27.41 rows=400 width=99) (actual time=0.250..56.030 rows=999 loops=1)

7. 0.537 0.571 ↓ 54.2 217 1

Bitmap Heap Scan on templates (cost=4.29..19.38 rows=4 width=427) (actual time=0.062..0.571 rows=217 loops=1)

  • Recheck Cond: (((template_type)::text = 'Survey'::text) AND (back_content ~ 'questions'::text))
  • Filter: (back_content <> ''::text)
  • Heap Blocks: exact=182
8. 0.034 0.034 ↓ 54.2 217 1

Bitmap Index Scan on ix_templates_tenant_key_template_id_type (cost=0.00..4.29 rows=4 width=0) (actual time=0.034..0.034 rows=217 loops=1)

9. 55.118 55.118 ↑ 20.0 5 217

Function Scan on jsonb_array_elements pages (cost=0.03..1.03 rows=100 width=32) (actual time=0.254..0.254 rows=5 loops=217)

10. 1.998 1.998 ↑ 1.0 1 999

Function Scan on jsonb_array_elements questions (cost=0.01..1.25 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=999)

  • Filter: ((value ->> 'visibleIf'::text) IS NULL)
  • Rows Removed by Filter: 0
11. 0.002 1.376 ↑ 76,923.1 13 1

Subquery Scan on *SELECT* 2 (cost=0.31..57,710.33 rows=1,000,000 width=296) (actual time=0.394..1.376 rows=13 loops=1)

12. 0.037 1.374 ↑ 76,923.1 13 1

Nested Loop (cost=0.31..47,710.33 rows=1,000,000 width=812) (actual time=0.394..1.374 rows=13 loops=1)

13. 0.008 1.307 ↑ 333.3 30 1

Nested Loop (cost=0.30..210.32 rows=10,000 width=99) (actual time=0.051..1.307 rows=30 loops=1)

14. 0.007 1.265 ↑ 5.9 17 1

Nested Loop (cost=0.30..10.32 rows=100 width=99) (actual time=0.048..1.265 rows=17 loops=1)

15. 0.018 0.018 ↓ 5.0 5 1

Index Scan using ix_templates_tenant_key_template_id_type on templates templates_1 (cost=0.27..8.29 rows=1 width=427) (actual time=0.009..0.018 rows=5 loops=1)

  • Index Cond: ((tenant_key)::text = 'f8792720e1184218e31f7bbc41246beea02d629588d604a786c8db87dde3e602'::text)
  • Filter: (back_content <> ''::text)
16. 1.240 1.240 ↑ 33.3 3 5

Function Scan on jsonb_array_elements pages_1 (cost=0.03..1.03 rows=100 width=32) (actual time=0.248..0.248 rows=3 loops=5)

17. 0.034 0.034 ↑ 50.0 2 17

Function Scan on jsonb_array_elements questions_1 (cost=0.01..1.00 rows=100 width=32) (actual time=0.002..0.002 rows=2 loops=17)

18. 0.030 0.030 ↓ 0.0 0 30

Function Scan on jsonb_array_elements childquestions (cost=0.01..1.00 rows=100 width=32) (actual time=0.001..0.001 rows=0 loops=30)

19.          

SubPlan (forResult)

20. 0.090 0.090 ↑ 25.0 4 30

Result (cost=0.00..0.51 rows=100 width=32) (actual time=0.002..0.003 rows=4 loops=30)