explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LEko

Settings
# exclusive inclusive rows x rows loops node
1. 2,826.785 159,398.342 ↑ 2.3 2,945,819 1

Unique (cost=2,755,814.96..2,858,790.17 rows=6,865,014 width=68) (actual time=150,206.790..159,398.342 rows=2,945,819 loops=1)

2. 11,218.388 156,571.557 ↑ 1.2 5,891,638 1

Sort (cost=2,755,814.96..2,772,977.49 rows=6,865,014 width=68) (actual time=150,206.789..156,571.557 rows=5,891,638 loops=1)

  • Sort Key: user_has_review.id, user_has_review.id_brand, user_has_review.created_at, user_has_review.updated_at, user_has_review.stats
  • Sort Method: external merge Disk: 718144kB
3. 491.052 145,353.169 ↑ 1.2 5,891,638 1

Append (cost=0.00..1,811,341.58 rows=6,865,014 width=68) (actual time=0.010..145,353.169 rows=5,891,638 loops=1)

4. 1,352.600 1,352.600 ↑ 1.1 2,945,819 1

Seq Scan on user_has_review (cost=0.00..466,947.16 rows=3,125,311 width=103) (actual time=0.009..1,352.600 rows=2,945,819 loops=1)

  • Filter: (active AND (updated_at > '1970-01-01 00:00:00'::timestamp without time zone) AND (id_brand = 'AC'::bpchar))
  • Rows Removed by Filter: 513499
5. 0.000 143,509.517 ↑ 1.3 2,945,819 1

Gather (cost=1,000.57..1,275,744.29 rows=3,739,703 width=103) (actual time=0.420..143,509.517 rows=2,945,819 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
6. 143,290.055 143,754.332 ↑ 1.5 420,831 7

Nested Loop (cost=0.56..900,773.99 rows=623,284 width=103) (actual time=3.375..143,754.332 rows=420,831 loops=7)

7. 463.937 463.937 ↑ 1.2 420,831 7

Parallel Seq Scan on user_has_review user_has_review_1 (cost=0.00..419,505.83 rows=520,934 width=103) (actual time=0.027..463.937 rows=420,831 loops=7)

  • Filter: (active AND (id_brand = 'AC'::bpchar))
  • Rows Removed by Filter: 73357
8. 0.340 0.340 ↑ 1.0 1 2,945,819

Index Scan using user_has_rating_pkey on user_has_rating (cost=0.56..0.92 rows=1 width=11) (actual time=0.340..0.340 rows=1 loops=2,945,819)

  • Index Cond: ((id = user_has_review_1.id) AND (id_brand = 'AC'::bpchar))
  • Filter: (active AND (updated_at > '1970-01-01 00:00:00'::timestamp without time zone))