explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QeCQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 71.938 ↑ 33.0 3 1

Gather Merge (cost=8,903.51..8,914.89 rows=99 width=61) (actual time=70.987..71.938 rows=3 loops=1)

  • Workers Planned: 1
  • Params Evaluated: $1
  • Workers Launched: 1
2.          

Initplan (forGather Merge)

3. 0.000 41.638 ↑ 1.0 1 1

Finalize Aggregate (cost=4,271.66..4,271.67 rows=1 width=32) (actual time=41.638..41.638 rows=1 loops=1)

4. 1.821 41.694 ↓ 2.0 2 1

Gather (cost=4,271.55..4,271.66 rows=1 width=32) (actual time=41.572..41.694 rows=2 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
5. 25.705 39.873 ↑ 1.0 1 2

Partial Aggregate (cost=3,271.55..3,271.56 rows=1 width=32) (actual time=39.872..39.873 rows=1 loops=2)

6. 14.168 14.168 ↑ 1.2 111,218 2

Parallel Seq Scan on product_price (cost=0.00..2,944.44 rows=130,844 width=5) (actual time=0.007..14.168 rows=111,218 loops=2)

7. 0.038 53.792 ↑ 49.5 2 2

Sort (cost=3,631.83..3,632.07 rows=99 width=61) (actual time=26.896..26.896 rows=2 loops=2)

  • Sort Key: w.scrape_date DESC
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
8. 0.009 53.754 ↑ 49.5 2 2

Nested Loop (cost=0.85..3,628.54 rows=99 width=61) (actual time=15.964..26.877 rows=2 loops=2)

  • Join Filter: (w.product_id = x.id)
9. 0.004 53.706 ↑ 49.5 2 2

Nested Loop (cost=0.56..3,592.97 rows=99 width=40) (actual time=15.948..26.853 rows=2 loops=2)

10. 0.011 53.684 ↑ 49.5 2 2

Nested Loop (cost=0.29..3,563.42 rows=99 width=30) (actual time=15.941..26.842 rows=2 loops=2)

11. 53.646 53.646 ↑ 47.0 2 2

Parallel Seq Scan on product_price w (cost=0.00..3,271.55 rows=94 width=22) (actual time=15.932..26.823 rows=2 loops=2)

  • Filter: (price = $1)
  • Rows Removed by Filter: 111216
12. 0.027 0.027 ↑ 1.0 1 3

Index Scan using fki_product_brand_product_id_fk on product_brand u (cost=0.29..3.09 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=3)

  • Index Cond: (product_id = w.product_id)
13. 0.018 0.018 ↑ 1.0 1 3

Index Scan using brand_pkey on brand t (cost=0.28..0.30 rows=1 width=18) (actual time=0.006..0.006 rows=1 loops=3)

  • Index Cond: (id = u.brand_id)
14. 0.039 0.039 ↑ 1.0 1 3

Index Scan using product_pkey on product x (cost=0.29..0.35 rows=1 width=37) (actual time=0.013..0.013 rows=1 loops=3)

  • Index Cond: (id = u.product_id)
Planning time : 0.573 ms