explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a5se : test

Settings
# exclusive inclusive rows x rows loops node
1. 361.969 120,299.646 ↑ 79.0 100 1

Gather Merge (cost=2,686,003.52..2,686,925.49 rows=7,902 width=483) (actual time=119,951.654..120,299.646 rows=100 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 84.634 119,937.677 ↑ 39.5 100 3 / 3

Sort (cost=2,685,003.50..2,685,013.38 rows=3,951 width=483) (actual time=119,937.668..119,937.677 rows=100 loops=3)

  • Sort Key: (ts_rank_cd(((all_posts.text_idx_col || ''::tsvector) || all_albums.text_idx_col), to_tsquery('nude & in & public'::text), 32)) DESC
  • Sort Method: top-N heapsort Memory: 192kB
  • Worker 0: Sort Method: top-N heapsort Memory: 136kB
  • Worker 1: Sort Method: top-N heapsort Memory: 129kB
3. 1,959.210 119,853.043 ↓ 17.9 70,592 3 / 3

Nested Loop (cost=24,364.10..2,684,852.49 rows=3,951 width=483) (actual time=46,996.851..119,853.043 rows=70,592 loops=3)

4. 91,365.671 113,814.158 ↓ 28.2 36,426 3 / 3

Parallel Hash Join (cost=24,363.42..1,937,434.95 rows=1,293 width=580) (actual time=46,994.105..113,814.158 rows=36,426 loops=3)

  • Hash Cond: (all_posts.reference = all_albums.url)
  • Join Filter: ((all_posts.text_idx_col @@ to_tsquery('nude & in & public'::text)) OR (all_albums.text_idx_col @@ to_tsquery('nude & in & public'::text)))
  • Rows Removed by Join Filter: 2,968,806
5. 22,066.384 22,066.384 ↑ 1.2 3,005,644 3 / 3

Parallel Seq Scan on all_posts (cost=0.00..654,753.55 rows=3,757,055 width=448) (actual time=0.315..22,066.384 rows=3,005,644 loops=3)

6. 251.179 382.103 ↑ 1.2 109,668 3 / 3

Parallel Hash (cost=17,561.85..17,561.85 rows=137,085 width=276) (actual time=382.103..382.103 rows=109,668 loops=3)

  • Buckets: 16,384 Batches: 32 Memory Usage: 3,360kB
7. 130.924 130.924 ↑ 1.2 109,668 3 / 3

Parallel Seq Scan on all_albums (cost=0.00..17,561.85 rows=137,085 width=276) (actual time=0.014..130.924 rows=109,668 loops=3)

8. 4,079.675 4,079.675 ↑ 90.5 2 109,277 / 3

Index Scan using all_images_postlink on all_images (cost=0.69..575.45 rows=181 width=308) (actual time=0.107..0.112 rows=2 loops=109,277)

  • Index Cond: (post_link = all_posts.url)