explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 79qz

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=522,680.34..522,680.59 rows=100 width=52) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=522,680.34..522,680.60 rows=101 width=52) (actual rows= loops=)

  • Sort Key: t.priority, t.updated_at
3. 0.000 0.000 ↓ 0.0

Subquery Scan on t (cost=522,674.96..522,676.98 rows=101 width=52) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

HashAggregate (cost=522,674.96..522,675.97 rows=101 width=52) (actual rows= loops=)

  • Group Key: search_phrase_relevance.sku, (array_agg(search_phrase_relevance.normalized_phrase)), (1), (min(search_phrase_relevance.updated_at))
5. 0.000 0.000 ↓ 0.0

Append (cost=1.94..522,673.95 rows=101 width=52) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Limit (cost=1.94..1.94 rows=1 width=52) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=1.94..1.94 rows=1 width=52) (actual rows= loops=)

  • Sort Key: (min(search_phrase_relevance.updated_at))
8. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1.90..1.93 rows=1 width=52) (actual rows= loops=)

  • Group Key: search_phrase_relevance.sku
9. 0.000 0.000 ↓ 0.0

Sort (cost=1.90..1.91 rows=1 width=49) (actual rows= loops=)

  • Sort Key: search_phrase_relevance.sku
10. 0.000 0.000 ↓ 0.0

Index Scan using search_phrase_relevance_status_idx on search_phrase_relevance (cost=0.56..1.89 rows=1 width=49) (actual rows= loops=)

  • Index Cond: (relevance_status = '1'::smallint)
11. 0.000 0.000 ↓ 0.0

Limit (cost=522,670.75..522,671.00 rows=100 width=52) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Sort (cost=522,670.75..522,970.68 rows=119,973 width=52) (actual rows= loops=)

  • Sort Key: (min(search_phrase_relevance_1.updated_at))
13. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=494,679.97..518,085.46 rows=119,973 width=52) (actual rows= loops=)

  • Group Key: search_phrase_relevance_1.sku
14. 0.000 0.000 ↓ 0.0

Sort (cost=494,679.97..500,156.43 rows=2,190,583 width=49) (actual rows= loops=)

  • Sort Key: search_phrase_relevance_1.sku
15. 0.000 0.000 ↓ 0.0

Seq Scan on search_phrase_relevance search_phrase_relevance_1 (cost=0.00..221,194.00 rows=2,190,583 width=49) (actual rows= loops=)

  • Filter: ((relevance_status > '1'::smallint) AND (age(now(), updated_at) > '01:00:00'::interval))