explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bh6t

Settings
# exclusive inclusive rows x rows loops node
1. 15.863 2,398.491 ↑ 1.0 1 1

Aggregate (cost=395,181.75..395,181.76 rows=1 width=8) (actual time=2,398.491..2,398.491 rows=1 loops=1)

  • Buffers: shared hit=545718 dirtied=824
2. 118.796 2,382.628 ↑ 1.3 146,708 1

Unique (cost=391,317.23..392,766.43 rows=193,226 width=2,983) (actual time=2,227.998..2,382.628 rows=146,708 loops=1)

  • Buffers: shared hit=545718 dirtied=824
3. 599.267 2,263.832 ↓ 1.5 292,115 1

Sort (cost=391,317.23..391,800.3 rows=193,226 width=2,983) (actual time=2,227.992..2,263.832 rows=292,115 loops=1)

  • Sort Key: books_book.is_readable_from DESC NULLS LAST, books_book.id DESC
  • Sort Method: quicksort Memory: 35110kB
  • Buffers: shared hit=545718 dirtied=824
4. 470.140 1,664.565 ↓ 1.5 292,115 1

Hash Join (cost=64,281.28..126,023.56 rows=193,226 width=2,983) (actual time=968.528..1,664.565 rows=292,115 loops=1)

  • Buffers: shared hit=545712 dirtied=824
5. 227.575 227.575 ↑ 1.0 507,552 1

Index Only Scan using one_book_in_one_region on regions_regionbook regions_regionbook (cost=0.42..57,904.3 rows=508,305 width=4) (actual time=0.062..227.575 rows=507,552 loops=1)

  • Index Cond: (regions_regionbook.region_id = 1)
  • Heap Fetches: 39258
  • Buffers: shared hit=161032 dirtied=10
6. 120.830 966.850 ↓ 1.5 292,115 1

Hash (cost=61,810.86..61,810.86 rows=197,600 width=16) (actual time=966.85..966.85 rows=292,115 loops=1)

  • Buffers: shared hit=384680 dirtied=814
7. 237.492 846.020 ↓ 1.5 292,115 1

Hash Join (cost=24,895.21..61,810.86 rows=197,600 width=16) (actual time=415.928..846.02 rows=292,115 loops=1)

  • Buffers: shared hit=384680 dirtied=814
8. 194.239 194.239 ↓ 1.2 476,762 1

Index Only Scan using regions_regionbook_active_readable_idx1 on regions_regionbook t4 (cost=0.42..35,865.27 rows=400,302 width=4) (actual time=0.044..194.239 rows=476,762 loops=1)

  • Heap Fetches: 21531
  • Buffers: shared hit=189469 dirtied=31
9. 81.339 414.289 ↑ 1.2 215,072 1

Hash (cost=21,687.36..21,687.36 rows=256,594 width=12) (actual time=414.289..414.289 rows=215,072 loops=1)

  • Buffers: shared hit=195211 dirtied=783
10. 332.950 332.950 ↑ 1.2 215,072 1

Index Only Scan using books_book_admin_count_list_idx on books_book books_book (cost=0.42..21,687.36 rows=256,594 width=12) (actual time=0.158..332.95 rows=215,072 loops=1)

  • Heap Fetches: 38474
  • Buffers: shared hit=195211 dirtied=783
Planning time : 8.475 ms
Execution time : 2,399.265 ms