explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h1j3 : Optimization for: tag show video existing query

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.031 7,990.455 ↑ 1.0 51 1

Limit (cost=1,000.88..9,060.35 rows=51 width=1,521) (actual time=2,631.500..7,990.455 rows=51 loops=1)

2. 1,269.702 7,990.424 ↑ 60.5 51 1

Gather Merge (cost=1,000.88..488,203.56 rows=3,083 width=1,521) (actual time=2,631.499..7,990.424 rows=51 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 69.001 6,720.722 ↑ 64.2 20 3 / 3

Nested Loop Semi Join (cost=0.85..486,847.68 rows=1,285 width=1,521) (actual time=2,241.217..6,720.722 rows=20 loops=3)

4. 6,224.393 6,224.393 ↑ 3.9 53,416 3 / 3

Parallel Index Scan Backward using index_videos_on_publish_date_not_deleted on videos (cost=0.42..308,252.41 rows=210,159 width=1,521) (actual time=0.056..6,224.393 rows=53,416 loops=3)

  • Index Cond: (publish_date <= '2020-02-04 03:59:59.999999'::timestamp without time zone)
  • Filter: (NOT private)
  • Rows Removed by Filter: 4610
5. 427.328 427.328 ↓ 0.0 0 160,248 / 3

Index Scan using index_taggings_on_taggable_id_and_taggable_type_and_context on taggings (cost=0.43..0.85 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=160,248)

  • Index Cond: ((taggable_id = videos.id) AND ((taggable_type)::text = 'Video'::text))
  • Filter: (tag_id = 1719)
  • Rows Removed by Filter: 2
Planning time : 3.087 ms
Execution time : 7,990.664 ms