explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 48xD

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 742.082 ↑ 1.0 40 1

Limit (cost=647,650.25..647,707.05 rows=40 width=1,145) (actual time=741.282..742.082 rows=40 loops=1)

2. 0.555 742.070 ↑ 1,879.3 40 1

WindowAgg (cost=647,650.25..754,393.07 rows=75,171 width=1,145) (actual time=741.280..742.070 rows=40 loops=1)

3. 0.108 741.315 ↑ 1,879.3 40 1

Group (cost=647,650.25..651,220.87 rows=75,171 width=1,041) (actual time=741.205..741.315 rows=40 loops=1)

  • Group Key: feed.added_at, feed.is_prioritized, feed.id, feed.title, feed.text, feed.uri, feed.uri_hash, feed.source_publication_date, feed.publication_date, feed.is_pinned, feed.is_deleted, feed.related_entities, feed.image_uri, feed.clean_text, feed.updated_at, ((SubPlan 2)), (ROW(feed_source.id, feed_source.name, feed_source.source_type_id, feed_source.added_at, feed_source.updated_at, feed_source.title, feed_source.description, feed_source.image_uri, feed_source.website_uri, feed_source.is_official, feed_source.is_active, feed_source.last_use, feed_source.owner_id, feed_source.owner_type, feed_source_category.id, feed_source_category.name, feed_source_class.id, feed_source_class.name)), feed_source_type.*
4. 207.555 741.207 ↑ 1,879.3 40 1

Sort (cost=647,650.25..647,838.18 rows=75,171 width=1,041) (actual time=741.196..741.207 rows=40 loops=1)

  • Sort Key: feed.added_at DESC, feed.is_prioritized DESC, feed.id, feed.title, feed.text, feed.uri, feed.uri_hash, feed.source_publication_date, feed.publication_date, feed.is_pinned, feed.is_deleted, feed.related_entities, feed.image_uri, feed.clean_text, feed.updated_at, ((SubPlan 2)), (ROW(feed_source.id, feed_source.name, feed_source.source_type_id, feed_source.added_at, feed_source.updated_at, feed_source.title, feed_source.description, feed_source.image_uri, feed_source.website_uri, feed_source.is_official, feed_source.is_active, feed_source.last_use, feed_source.owner_id, feed_source.owner_type, feed_source_category.id, feed_source_category.name, feed_source_class.id, feed_source_class.name)), feed_source_type.*
  • Sort Method: quicksort Memory: 129477kB
5. 32.901 533.652 ↑ 1.0 73,163 1

Hash Left Join (cost=14,153.96..641,562.19 rows=75,171 width=1,041) (actual time=137.917..533.652 rows=73,163 loops=1)

  • Hash Cond: (feed_source.source_type_id = feed_source_type.id)
6. 56.211 500.733 ↑ 1.0 73,163 1

Hash Left Join (cost=14,137.43..641,345.46 rows=75,171 width=773) (actual time=137.880..500.733 rows=73,163 loops=1)

  • Hash Cond: (feed.source_id = feed_source.id)
7. 251.463 440.596 ↑ 1.0 73,163 1

HashAggregate (cost=13,908.29..639,331.01 rows=75,171 width=773) (actual time=133.936..440.596 rows=73,163 loops=1)

  • Group Key: feed.id
8. 42.807 42.807 ↑ 1.0 73,163 1

Seq Scan on feed (cost=0.00..13,720.36 rows=75,171 width=737) (actual time=0.010..42.807 rows=73,163 loops=1)

  • Filter: ((NOT is_pinned) AND (NOT is_deleted))
  • Rows Removed by Filter: 2071
9.          

SubPlan (forHashAggregate)

10. 146.326 146.326 ↑ 1.0 1 73,163

Index Scan using feed_calculated_rating_feed_id_key on feed_calculated_rating (cost=0.29..8.31 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=73,163)

  • Index Cond: (feed_id = feed.id)
11. 1.010 3.926 ↑ 1.0 2,026 1

Hash (cost=203.82..203.82 rows=2,026 width=40) (actual time=3.926..3.926 rows=2,026 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 549kB
12. 1.562 2.916 ↑ 1.0 2,026 1

Hash Left Join (cost=65.90..203.82 rows=2,026 width=40) (actual time=0.058..2.916 rows=2,026 loops=1)

  • Hash Cond: (feed_source.source_class_id = feed_source_class.id)
13. 0.509 1.341 ↑ 1.0 2,026 1

Hash Left Join (cost=32.95..165.53 rows=2,026 width=229) (actual time=0.032..1.341 rows=2,026 loops=1)

  • Hash Cond: (feed_source.source_category_id = feed_source_category.id)
14. 0.822 0.822 ↑ 1.0 2,026 1

Seq Scan on feed_source (cost=0.00..127.26 rows=2,026 width=197) (actual time=0.008..0.822 rows=2,026 loops=1)

15. 0.006 0.010 ↑ 510.0 2 1

Hash (cost=20.20..20.20 rows=1,020 width=36) (actual time=0.010..0.010 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.004 0.004 ↑ 510.0 2 1

Seq Scan on feed_source_category (cost=0.00..20.20 rows=1,020 width=36) (actual time=0.003..0.004 rows=2 loops=1)

17. 0.009 0.013 ↑ 510.0 2 1

Hash (cost=20.20..20.20 rows=1,020 width=36) (actual time=0.012..0.013 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.004 0.004 ↑ 510.0 2 1

Seq Scan on feed_source_class (cost=0.00..20.20 rows=1,020 width=36) (actual time=0.003..0.004 rows=2 loops=1)

19. 0.003 0.018 ↑ 96.7 3 1

Hash (cost=12.90..12.90 rows=290 width=276) (actual time=0.018..0.018 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
20. 0.015 0.015 ↑ 96.7 3 1

Seq Scan on feed_source_type (cost=0.00..12.90 rows=290 width=276) (actual time=0.013..0.015 rows=3 loops=1)

21.          

SubPlan (forWindowAgg)

22. 0.040 0.200 ↑ 1.0 1 40

Aggregate (cost=1.34..1.35 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=40)

23. 0.040 0.160 ↓ 0.0 0 40

Sort (cost=1.31..1.31 rows=2 width=24) (actual time=0.004..0.004 rows=0 loops=40)

  • Sort Key: (count(ffs.*)) DESC
  • Sort Method: quicksort Memory: 25kB
24. 0.040 0.120 ↓ 0.0 0 40

HashAggregate (cost=1.28..1.30 rows=2 width=24) (actual time=0.003..0.003 rows=0 loops=40)

  • Group Key: ffs.type
25. 0.080 0.080 ↓ 0.0 0 40

Seq Scan on feed_feedback ffs (cost=0.00..1.26 rows=2 width=68) (actual time=0.002..0.002 rows=0 loops=40)

  • Filter: (feed_id = feed.id)
  • Rows Removed by Filter: 21
Planning time : 0.950 ms
Execution time : 753.282 ms