explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 60eD

Settings
# exclusive inclusive rows x rows loops node
1. 0.760 50,143.978 ↑ 7.8 1,602 1

Unique (cost=397,056.22..397,336.14 rows=12,441 width=138) (actual time=50,142.901..50,143.978 rows=1,602 loops=1)

2.          

Initplan (for Unique)

3. 0.006 0.006 ↑ 1.0 1 1

Seq Scan on record (cost=0.00..1.24 rows=1 width=32) (actual time=0.003..0.006 rows=1 loops=1)

  • Filter: ((record_id IS NULL) AND (feature_id = 9))
  • Rows Removed by Filter: 23
4. 0.006 0.006 ↑ 1.0 1 1

Seq Scan on record record_1 (cost=0.00..1.24 rows=1 width=32) (actual time=0.003..0.006 rows=1 loops=1)

  • Filter: ((record_id IS NULL) AND (feature_id = 9))
  • Rows Removed by Filter: 23
5. 7.522 50,143.206 ↑ 7.8 1,602 1

Sort (cost=397,053.74..397,084.84 rows=12,441 width=138) (actual time=50,142.900..50,143.206 rows=1,602 loops=1)

  • Sort Key: d.label, fc.system_label, fc.id, fca.name, ((fc.input_config)::jsonb), ((fc.options)::jsonb), (count(f.id)), fc.context_filter
  • Sort Method: quicksort Memory: 594kB
6. 36.354 50,135.684 ↑ 7.8 1,602 1

GroupAggregate (cost=395,803.25..396,207.58 rows=12,441 width=138) (actual time=50,086.272..50,135.684 rows=1,602 loops=1)

  • Group Key: fc.id, fca.name, d.label
7. 5,271.381 50,099.330 ↓ 9.1 113,538 1

Sort (cost=395,803.25..395,834.35 rows=12,441 width=163) (actual time=50,086.178..50,099.330 rows=113,538 loops=1)

  • Sort Key: fc.id, fca.name, d.label
  • Sort Method: quicksort Memory: 41,012kB
8. 56.142 44,827.949 ↓ 9.1 113,538 1

Nested Loop (cost=263.29..394,957.08 rows=12,441 width=163) (actual time=3.516..44,827.949 rows=113,538 loops=1)

9. 46.035 44,090.579 ↓ 9.1 113,538 1

Merge Join (cost=263.15..392,617.36 rows=12,441 width=147) (actual time=3.497..44,090.579 rows=113,538 loops=1)

  • Merge Cond: (fcc.field_config_id = fc.id)
10. 3.791 4.359 ↑ 1.1 3,026 1

Sort (cost=259.98..268.14 rows=3,262 width=8) (actual time=1.293..4.359 rows=3,026 loops=1)

  • Sort Key: fcc.field_config_id
  • Sort Method: quicksort Memory: 239kB
11. 0.568 0.568 ↑ 1.1 3,050 1

Seq Scan on field_config_class fcc (cost=0.00..69.62 rows=3,262 width=8) (actual time=0.008..0.568 rows=3,050 loops=1)

12. 495.047 44,040.185 ↓ 9.5 113,538 1

Materialize (cost=3.17..578,906.52 rows=11,987 width=143) (actual time=2.156..44,040.185 rows=113,538 loops=1)

13. 28,758.306 43,545.138 ↓ 9.5 113,538 1

Nested Loop Left Join (cost=3.17..578,876.55 rows=11,987 width=143) (actual time=2.154..43,545.138 rows=113,538 loops=1)

  • Join Filter: ((f.field_config_id = fc.id) OR (fc.id IS NULL))
  • Rows Removed by Join Filter: 253,294,102
14. 17.401 66.054 ↓ 6.7 1,602 1

Nested Loop (cost=3.17..2,792.90 rows=238 width=139) (actual time=2.131..66.054 rows=1,602 loops=1)

  • Join Filter: ((d.fieldset_id = fs.id) AND (((fe.id <> 9) AND (((fc.input_config ->> 'linked_record'::text) = $0) OR ((fc.input_config ->> 'filter_record'::text) = $1))) OR (fe.id = 9)))
  • Rows Removed by Join Filter: 79,822
15. 6.710 39.929 ↑ 1.0 2,908 1

Nested Loop (cost=0.43..911.63 rows=2,979 width=143) (actual time=0.025..39.929 rows=2,908 loops=1)

16. 9.587 9.587 ↑ 1.0 2,954 1

Index Scan using field_config_pkey on field_config fc (cost=0.28..369.53 rows=3,012 width=128) (actual time=0.016..9.587 rows=2,954 loops=1)

  • Filter: (status = 'active'::status)
  • Rows Removed by Filter: 96
17. 23.632 23.632 ↑ 1.0 1 2,954

Index Scan using dataset_pkey on dataset d (cost=0.14..0.17 rows=1 width=23) (actual time=0.006..0.008 rows=1 loops=2,954)

  • Index Cond: (id = fc.dataset_id)
  • Filter: ((name)::text <> ALL ('{roles_permission,roles_filter}'::text[]))
  • Rows Removed by Filter: 0
18. 8.663 8.724 ↓ 1.3 28 2,908

Materialize (cost=2.74..4.55 rows=21 width=8) (actual time=0.000..0.003 rows=28 loops=2,908)

19. 0.011 0.061 ↓ 1.3 28 1

Hash Join (cost=2.74..4.45 rows=21 width=8) (actual time=0.046..0.061 rows=28 loops=1)

  • Hash Cond: (r.feature_id = fe.id)
20. 0.009 0.031 ↓ 1.3 28 1

Hash Join (cost=1.43..2.91 rows=21 width=8) (actual time=0.023..0.031 rows=28 loops=1)

  • Hash Cond: (fs.record_id = r.id)
21. 0.008 0.008 ↓ 1.3 28 1

Seq Scan on fieldset fs (cost=0.00..1.21 rows=21 width=8) (actual time=0.004..0.008 rows=28 loops=1)

22. 0.004 0.014 ↓ 1.3 24 1

Hash (cost=1.19..1.19 rows=19 width=8) (actual time=0.013..0.014 rows=24 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
23. 0.010 0.010 ↓ 1.3 24 1

Seq Scan on record r (cost=0.00..1.19 rows=19 width=8) (actual time=0.004..0.010 rows=24 loops=1)

24. 0.008 0.019 ↓ 1.4 19 1

Hash (cost=1.14..1.14 rows=14 width=4) (actual time=0.018..0.019 rows=19 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
25. 0.011 0.011 ↓ 1.4 19 1

Seq Scan on feature fe (cost=0.00..1.14 rows=14 width=4) (actual time=0.006..0.011 rows=19 loops=1)

26. 14,666.762 14,720.778 ↓ 1.0 158,182 1,602

Materialize (cost=0.00..12,347.30 rows=158,020 width=8) (actual time=0.000..9.189 rows=158,182 loops=1,602)

27. 54.016 54.016 ↓ 1.0 158,182 1

Seq Scan on field f (cost=0.00..11,557.20 rows=158,020 width=8) (actual time=0.007..54.016 rows=158,182 loops=1)

28. 681.228 681.228 ↑ 1.0 1 113,538

Index Scan using field_class_pkey on field_class fca (cost=0.14..0.18 rows=1 width=24) (actual time=0.005..0.006 rows=1 loops=113,538)

  • Index Cond: (id = fcc.field_class_id)
  • Filter: (((name !~ 'Module%'::text) OR (name = 'Module\Sdsa'::text) OR (name ~~ '%Module\\Feature\\Linker%'::text)) AND ((name !~ 'Impotent%'::text) OR (name = 'Impotent\RecordCreator'::text) OR (name = 'Text\LicenseId'::text)))
Planning time : 2.751 ms
Execution time : 50,150.348 ms