explain.depesz.com

A tool for finding a real cause for slow queries.

Result: lJc

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.001 0.825 ↓ 0.0 0 1

HashAggregate (cost=10000006408.52..10000006408.56 rows=4 width=1072) (actual time=0.825..0.825 rows=0 loops=1)

2. 0.006 0.824 ↓ 0.0 0 1

Hash Join (cost=10000003199.32..10000006408.45 rows=4 width=1072) (actual time=0.824..0.824 rows=0 loops=1)

  • Hash Cond: (o.market_id = m.id)
3. 0.000 0.000 ↓ 0.0 0

Seq Scan on outcomes o (cost=10000000000.00..10000003014.97 rows=51766 width=4) (actual time=.. rows= loops=0)

  • Filter: (active AND displayed)
4. 0.001 0.818 ↓ 0.0 0 1

Hash (cost=3199.30..3199.30 rows=1 width=1076) (actual time=0.818..0.818 rows=0 loops=1)

5. 0.000 0.817 ↓ 0.0 0 1

Nested Loop (cost=467.16..3199.30 rows=1 width=1076) (actual time=0.817..0.817 rows=0 loops=1)

6. 0.001 0.817 ↓ 0.0 0 1

Nested Loop (cost=467.16..3198.98 rows=1 width=724) (actual time=0.817..0.817 rows=0 loops=1)

7. 0.005 0.816 ↓ 0.0 0 1

Hash Join (cost=467.16..3198.58 rows=1 width=732) (actual time=0.816..0.816 rows=0 loops=1)

  • Hash Cond: (m.event_id = e.id)
8. 0.032 0.032 ↑ 11878.0 1 1

Index Scan using markets_pkey on markets m (cost=0.00..2686.80 rows=11878 width=8) (actual time=0.032..0.032 rows=1 loops=1)

  • Filter: (active AND displayed)
9. 0.000 0.779 ↓ 0.0 0 1

Hash (cost=467.15..467.15 rows=1 width=724) (actual time=0.779..0.779 rows=0 loops=1)

10. 0.001 0.779 ↓ 0.0 0 1

Nested Loop (cost=0.00..467.15 rows=1 width=724) (actual time=0.779..0.779 rows=0 loops=1)

11. 0.001 0.778 ↓ 0.0 0 1

Nested Loop (cost=0.00..458.14 rows=28 width=372) (actual time=0.778..0.778 rows=0 loops=1)

12. 0.000 0.777 ↓ 0.0 0 1

Nested Loop (cost=0.00..455.04 rows=7 width=364) (actual time=0.777..0.777 rows=0 loops=1)

13. 0.777 0.777 ↓ 0.0 0 1

Nested Loop (cost=0.00..452.33 rows=7 width=360) (actual time=0.777..0.777 rows=0 loops=1)

  • -> Index Scan using keywords_pkey on keywords l (cost=0.00..262.82 rows=1 width=360) (actual time=0.776..0.776 r
  • Filter: ((type_cname)::text = ''::text)
  • -> Index Scan using events_keywords_event_id_key on events_keywords ekl (cost=0.00..189.42 rows=7 width=8) (neve
  • Index Cond: (ekl.keyword_id = l.id)
14. 0.000 0.000 ↓ 0.0 0

Index Scan using events_pkey on events e (cost=0.00..0.37 rows=1 width=4) (actual time=.. rows= loops=0)

  • Index Cond: (e.id = ekl.event_id)
  • Filter: (e.active AND e.displayed)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using events_keywords_event_id_key on events_keywords eks (cost=0.00..0.38 rows=5 width=8) (actual time=.. rows= loops=0)

  • Index Cond: (eks.event_id = e.id)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using keywords_pkey on keywords s (cost=0.00..0.31 rows=1 width=360) (actual time=.. rows= loops=0)

  • Index Cond: (s.id = eks.keyword_id)
  • Filter: ((s.type_cname)::text = ''::text)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using events_keywords_event_id_key on events_keywords ekc (cost=0.00..0.34 rows=5 width=8) (actual time=.. rows= loops=0)

  • Index Cond: (ekc.event_id = e.id)
18. 0.000 0.000 ↓ 0.0 0

Index Scan using keywords_pkey on keywords c (cost=0.00..0.31 rows=1 width=360) (actual time=.. rows= loops=0)

  • Index Cond: (c.id = ekc.keyword_id)
  • Filter: ((c.type_cname)::text = ''::text)