explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XEsB

Settings
# exclusive inclusive rows x rows loops node
1. 2.153 2,399.288 ↑ 11.0 2 1

Nested Loop (cost=1,030.59..33,109.07 rows=22 width=68) (actual time=1,650.711..2,399.288 rows=2 loops=1)

2. 119.436 1,042.830 ↑ 1.8 2,397 1

HashAggregate (cost=1,030.16..1,073.43 rows=4,327 width=29) (actual time=1,040.475..1,042.830 rows=2,397 loops=1)

  • Group Key: messages_on_plbwx5xygq2b3gp7in8q_partitioned_2019_07_p0.customer_id
3. 43.788 923.394 ↓ 13.6 58,812 1

Append (cost=0.14..1,008.53 rows=4,327 width=29) (actual time=0.049..923.394 rows=58,812 loops=1)

  • Subplans Removed: 19
4. 467.497 467.497 ↓ 13.6 19,587 1

Index Scan using messages_on_plbwx5xygq2b3gp7in8q_partitioned_creation_time_idx5 on messages_on_plbwx5xygq2b3gp7in8q_partitioned_2019_07_p0 (cost=0.44..310.56 rows=1,436 width=29) (actual time=0.048..467.497 rows=19,587 loops=1)

  • Index Cond: ((creation_time < (now() - '24:00:00'::interval)) AND (creation_time > (now() - '27:00:00'::interval)))
5. 175.177 175.177 ↓ 13.9 20,041 1

Index Scan using messages_on_plbwx5xygq2b3gp7in8q_partitioned_creation_time_idx6 on messages_on_plbwx5xygq2b3gp7in8q_partitioned_2019_07_p1 (cost=0.44..315.62 rows=1,446 width=29) (actual time=0.032..175.177 rows=20,041 loops=1)

  • Index Cond: ((creation_time < (now() - '24:00:00'::interval)) AND (creation_time > (now() - '27:00:00'::interval)))
6. 236.932 236.932 ↓ 13.5 19,184 1

Index Scan using messages_on_plbwx5xygq2b3gp7in8q_partitioned_creation_time_idx7 on messages_on_plbwx5xygq2b3gp7in8q_partitioned_2019_07_p2 (cost=0.44..312.25 rows=1,426 width=29) (actual time=0.045..236.932 rows=19,184 loops=1)

  • Index Cond: ((creation_time < (now() - '24:00:00'::interval)) AND (creation_time > (now() - '27:00:00'::interval)))
7. 7.191 1,354.305 ↓ 0.0 0 2,397

Append (cost=0.42..7.36 rows=3 width=68) (actual time=0.565..0.565 rows=0 loops=2,397)

8. 402.696 402.696 ↓ 0.0 0 2,397

Index Scan using customers_on_plbwx5xygq2b3gp7in8q_partitioned2_p0_id_idx on customers_on_plbwx5xygq2b3gp7in8q_partitioned2_p0 cust (cost=0.42..2.45 rows=1 width=68) (actual time=0.168..0.168 rows=0 loops=2,397)

  • Index Cond: ((id)::text = (messages_on_plbwx5xygq2b3gp7in8q_partitioned_2019_07_p0.customer_id)::text)
  • Filter: (has_talked AND ((chat_platform_id)::text = 'whatsapp'::text) AND (last_seen > (now() - '14 days'::interval)) AND (last_message_creation_time < (now() - '24:00:00'::interval)) AND (last_message_creation_time > (now() - '27:00:00'::interval)) AND (((last_message)::json ->> 'FROM'::text) = 'me'::text) AND (((user_last_msg_received)::bigint)::double precision < (date_part('epoch'::text, last_message_creation_time) * '1000'::double precision)) AND (((user_last_msg_received)::bigint)::double precision < (date_part('epoch'::text, (min(messages_on_plbwx5xygq2b3gp7in8q_partitioned_2019_07_p0.creation_time))) * '1000'::double precision)))
  • Rows Removed by Filter: 0
9. 465.018 465.018 ↓ 0.0 0 2,397

Index Scan using customers_on_plbwx5xygq2b3gp7in8q_partitioned2_p1_id_idx on customers_on_plbwx5xygq2b3gp7in8q_partitioned2_p1 cust_1 (cost=0.42..2.45 rows=1 width=68) (actual time=0.194..0.194 rows=0 loops=2,397)

  • Index Cond: ((id)::text = (messages_on_plbwx5xygq2b3gp7in8q_partitioned_2019_07_p0.customer_id)::text)
  • Filter: (has_talked AND ((chat_platform_id)::text = 'whatsapp'::text) AND (last_seen > (now() - '14 days'::interval)) AND (last_message_creation_time < (now() - '24:00:00'::interval)) AND (last_message_creation_time > (now() - '27:00:00'::interval)) AND (((last_message)::json ->> 'FROM'::text) = 'me'::text) AND (((user_last_msg_received)::bigint)::double precision < (date_part('epoch'::text, last_message_creation_time) * '1000'::double precision)) AND (((user_last_msg_received)::bigint)::double precision < (date_part('epoch'::text, (min(messages_on_plbwx5xygq2b3gp7in8q_partitioned_2019_07_p0.creation_time))) * '1000'::double precision)))
  • Rows Removed by Filter: 0
10. 479.400 479.400 ↓ 0.0 0 2,397

Index Scan using customers_on_plbwx5xygq2b3gp7in8q_partitioned2_p2_id_idx on customers_on_plbwx5xygq2b3gp7in8q_partitioned2_p2 cust_2 (cost=0.42..2.45 rows=1 width=69) (actual time=0.200..0.200 rows=0 loops=2,397)

  • Index Cond: ((id)::text = (messages_on_plbwx5xygq2b3gp7in8q_partitioned_2019_07_p0.customer_id)::text)
  • Filter: (has_talked AND ((chat_platform_id)::text = 'whatsapp'::text) AND (last_seen > (now() - '14 days'::interval)) AND (last_message_creation_time < (now() - '24:00:00'::interval)) AND (last_message_creation_time > (now() - '27:00:00'::interval)) AND (((last_message)::json ->> 'FROM'::text) = 'me'::text) AND (((user_last_msg_received)::bigint)::double precision < (date_part('epoch'::text, last_message_creation_time) * '1000'::double precision)) AND (((user_last_msg_received)::bigint)::double precision < (date_part('epoch'::text, (min(messages_on_plbwx5xygq2b3gp7in8q_partitioned_2019_07_p0.creation_time))) * '1000'::double precision)))
  • Rows Removed by Filter: 0
Planning time : 5.091 ms
Execution time : 2,399.767 ms