explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wgsY : new

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 2,726.747 ↓ 2.9 40 1

Limit (cost=594,420.46..594,420.49 rows=14 width=830) (actual time=2,726.722..2,726.747 rows=40 loops=1)

  • Buffers: shared hit=233100, temp read=19937 written=19840
2. 0.076 2,726.732 ↓ 2.9 40 1

Sort (cost=594,420.46..594,420.49 rows=14 width=830) (actual time=2,726.721..2,726.732 rows=40 loops=1)

  • Sort Key: wow.m_created DESC
  • Sort Method: quicksort Memory: 76kB
  • Buffers: shared hit=233100, temp read=19937 written=19840
3. 0.029 2,726.656 ↓ 2.9 40 1

Subquery Scan on wow (cost=594,419.27..594,420.19 rows=14 width=830) (actual time=2,726.607..2,726.656 rows=40 loops=1)

  • Filter: (wow.m_created < '2019-09-06 08:03:39.71'::timestamp without time zone)
  • Buffers: shared hit=233097, temp read=19937 written=19840
4. 0.173 2,726.627 ↑ 1.0 40 1

Aggregate (cost=594,419.27..594,419.68 rows=41 width=830) (actual time=2,726.599..2,726.627 rows=40 loops=1)

  • Buffers: shared hit=233097, temp read=19937 written=19840
5. 0.023 2,726.454 ↑ 1.0 40 1

Append (cost=594,384.31..594,412.4 rows=41 width=830) (actual time=2,726.365..2,726.454 rows=40 loops=1)

  • Buffers: shared hit=233097, temp read=19937 written=19840
6. 0.015 2,726.397 ↑ 1.0 40 1

Limit (cost=594,384.31..594,384.41 rows=40 width=2,380) (actual time=2,726.363..2,726.397 rows=40 loops=1)

  • Buffers: shared hit=233090, temp read=19937 written=19840
7. 40.114 2,726.382 ↑ 1,163.2 40 1

Sort (cost=594,384.31..594,500.63 rows=46,528 width=2,380) (actual time=2,726.362..2,726.382 rows=40 loops=1)

  • Sort Key: c.created DESC
  • Sort Method: top-N heapsort Memory: 76kB
  • Buffers: shared hit=233090, temp read=19937 written=19840
8. 28.399 2,686.268 ↑ 1.1 41,514 1

Hash Join (cost=120,956.7..592,913.58 rows=46,528 width=2,380) (actual time=2,141.53..2,686.268 rows=41,514 loops=1)

  • Buffers: shared hit=233090, temp read=19937 written=19840
9. 52.821 2,657.708 ↑ 1.1 41,514 1

Nested Loop (cost=120,947.82..592,264.93 rows=46,528 width=2,338) (actual time=2,141.349..2,657.708 rows=41,514 loops=1)

  • Buffers: shared hit=233086, temp read=19937 written=19840
10. 23.281 2,521.859 ↑ 1.1 41,514 1

Nested Loop (cost=120,947.38..218,417.73 rows=46,528 width=1,048) (actual time=2,141.33..2,521.859 rows=41,514 loops=1)

  • Buffers: shared hit=66184, temp read=19937 written=19840
11. 0.007 0.048 ↑ 1.0 1 1

Nested Loop (cost=0.86..16.91 rows=1 width=435) (actual time=0.044..0.048 rows=1 loops=1)

  • Buffers: shared hit=8
12. 0.022 0.022 ↑ 1.0 1 1

Index Scan using conversation_pkey on conversation c (cost=0.43..8.45 rows=1 width=435) (actual time=0.021..0.022 rows=1 loops=1)

  • Index Cond: (c.conversation_id = '137134998004934'::bigint)
  • Filter: (c.created < '2019-09-06 08:03:39.71'::timestamp without time zone)
  • Buffers: shared hit=4
13. 0.019 0.019 ↑ 1.0 1 1

Index Scan using conversation_participant_conversation_id_idx on conversation_participant cp (cost=0.43..8.45 rows=1 width=8) (actual time=0.018..0.019 rows=1 loops=1)

  • Index Cond: (cp.conversation_id = '137134998004934'::bigint)
  • Buffers: shared hit=4
14. 294.447 2,498.530 ↑ 1.1 41,514 1

Hash Join (cost=120,946.52..217,935.54 rows=46,528 width=613) (actual time=2,141.282..2,498.53 rows=41,514 loops=1)

  • Buffers: shared hit=66176, temp read=19937 written=19840
15. 63.062 63.062 ↑ 1.1 41,514 1

Index Scan using message_conversation_id_idx on message m (cost=0.57..60,672.16 rows=46,528 width=572) (actual time=0.019..63.062 rows=41,514 loops=1)

  • Index Cond: (m.conversation_id = '137134998004934'::bigint)
  • Buffers: shared hit=35611
16. 1,139.590 2,141.021 ↓ 1.1 2,898,301 1

Hash (cost=57,753.42..57,753.42 rows=2,718,842 width=57) (actual time=2,141.021..2,141.021 rows=2,898,301 loops=1)

  • Buffers: shared hit=30565, temp written=19587
17. 1,001.431 1,001.431 ↓ 1.1 2,898,301 1

Seq Scan on csat_response cr (cost=0..57,753.42 rows=2,718,842 width=57) (actual time=0.004..1,001.431 rows=2,898,301 loops=1)

  • Buffers: shared hit=30565
18. 83.028 83.028 ↑ 1.0 1 41,514

Index Scan using user_pkey on konotor_user ku (cost=0.43..8.02 rows=1 width=1,298) (actual time=0.002..0.002 rows=1 loops=41,514)

  • Index Cond: (ku.user_id = m.message_user_id)
  • Buffers: shared hit=166902
19. 0.083 0.161 ↓ 1.0 227 1

Hash (cost=6.17..6.17 rows=217 width=42) (actual time=0.161..0.161 rows=227 loops=1)

  • Buffers: shared hit=4
20. 0.078 0.078 ↓ 1.0 227 1

Seq Scan on csat cs (cost=0..6.17 rows=217 width=42) (actual time=0.008..0.078 rows=227 loops=1)

  • Buffers: shared hit=4
21. 0.002 0.034 ↓ 0.0 0 1

Limit (cost=27.57..27.58 rows=1 width=1,331) (actual time=0.034..0.034 rows=0 loops=1)

  • Buffers: shared hit=7
22. 0.009 0.032 ↓ 0.0 0 1

Sort (cost=27.57..27.58 rows=1 width=1,331) (actual time=0.032..0.032 rows=0 loops=1)

  • Sort Key: ma.created DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=7
23. 0.001 0.023 ↓ 0.0 0 1

Nested Loop (cost=1.43..27.56 rows=1 width=1,331) (actual time=0.023..0.023 rows=0 loops=1)

  • Buffers: shared hit=7
24. 0.001 0.022 ↓ 0.0 0 1

Nested Loop (cost=1..22.04 rows=1 width=790) (actual time=0.022..0.022 rows=0 loops=1)

  • Buffers: shared hit=7
25. 0.002 0.021 ↓ 0.0 0 1

Nested Loop (cost=0.85..21.85 rows=1 width=425) (actual time=0.021..0.021 rows=0 loops=1)

  • Buffers: shared hit=7
26. 0.013 0.013 ↑ 1.0 1 1

Index Scan using conversation_pkey on conversation c_1 (cost=0.43..8.45 rows=1 width=417) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: (c_1.conversation_id = '137134998004934'::bigint)
  • Buffers: shared hit=4
27. 0.006 0.006 ↓ 0.0 0 1

Index Scan using marketing_user_user_id_idx on marketing_user mu (cost=0.42..13.37 rows=3 width=16) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: (mu.user_id = c_1.user_id)
  • Buffers: shared hit=3
28. 0.000 0.000 ↓ 0.0 0 0

Index Scan using marketing_pkey on marketing ma (cost=0.14..0.17 rows=1 width=389) (never executed)

  • Index Cond: (ma.marketing_id = mu.marketing_id)
  • Filter: ((ma.created > '1969-12-31 23:59:59.999'::timestamp without time zone) AND (ma.created < '2019-09-06 08:03:39.71'::timestamp without time zone))
29. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using user_pkey on konotor_user ku_1 (cost=0.43..5.52 rows=1 width=8) (never executed)

  • Index Cond: (ku_1.user_id = ma.started_by_user_id)