explain.depesz.com

PostgreSQL's explain analyze made readable

Result: my27

Settings
# exclusive inclusive rows x rows loops node
1. 0.121 390.771 ↓ 0.0 0 3

> Hash Join (cost=7.06..10,775.08 rows=1 width=4) (actual time=130.257..130.257 rows=0 loops=3)

  • Hash Cond: (tags.root_keyword_id = keywords_1.id)
2. 0.159 389.925 ↑ 94.0 17 3

Nested Loop (cost=1.41..10,765.24 rows=1,598 width=8) (actual time=59.558..129.975 rows=17 loops=3)

3. 0.045 376.014 ↑ 15.2 24 3

Nested Loop (cost=0.85..5,853.05 rows=366 width=8) (actual time=59.551..125.338 rows=24 loops=3)

4. 0.020 317.574 ↑ 17.0 2 3

Nested Loop (cost=0.42..5,230.41 rows=34 width=16) (actual time=58.210..105.858 rows=2 loops=3)

5. 315.369 315.369 ↑ 17.0 2 3

Parallel Seq Scan on authorships (cost=0.00..5,144.76 rows=34 width=8) (actual time=58.056..105.123 rows=2 loops=3)

  • Filter: (user_id = 1)
  • Rows Removed by Filter: 110,511
6. 2.185 2.185 ↑ 1.0 1 5

Index Only Scan using documents_pkey on documents (cost=0.42..2.52 rows=1 width=8) (actual time=0.437..0.437 rows=1 loops=5)

  • Index Cond: (id = authorships.document_id)
  • Heap Fetches: 5
7. 58.395 58.395 ↑ 3.1 14 5

Index Scan using index_pages_on_document_id_and_position on pages (cost=0.43..17.88 rows=43 width=12) (actual time=2.785..11.679 rows=14 loops=5)

  • Index Cond: (document_id = documents.id)
8. 13.752 13.752 ↑ 25.0 1 72

Index Scan using index_tags_on_page_id_and_keyword_id on tags (cost=0.56..13.17 rows=25 width=12) (actual time=0.180..0.191 rows=1 loops=72)

  • Index Cond: (page_id = pages.id)
9. 0.010 0.725 ↑ 1.0 4 1

Hash (cost=5.60..5.60 rows=4 width=8) (actual time=0.725..0.725 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
10. 0.715 0.715 ↑ 1.0 4 1

Index Only Scan using keywords_pkey on keywords keywords_1 (cost=0.28..5.60 rows=4 width=8) (actual time=0.699..0.715 rows=4 loops=1)

  • Index Cond: (id = ANY ('{1,2,3,4}'::bigint[]))
  • Heap Fetches: 2
11. 0.000 0.000 ↓ 0.0 0

Index Scan using keywords_pkey on keywords (cost=0.28..1.06 rows=1 width=73) (never executed)

  • Index Cond: (id = tags.keyword_id)
Planning time : 47.368 ms
Execution time : 317.515 ms