explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KMDu

Settings
# exclusive inclusive rows x rows loops node
1. 13.902 37,924.938 ↑ 35,393.7 6 1

GroupAggregate (cost=651,946.35..658,848.11 rows=212,362 width=16) (actual time=37,892.796..37,924.938 rows=6 loops=1)

  • Group Key: (timezone('Etc/UTC'::text, (date_trunc('day'::text, timezone('Etc/UTC'::text, ((conversation_sessions.updated_at)::timestamp with time zone - '00:00:00'::interval))) + '00:00:00'::interval)))
2. 106.780 37,911.036 ↑ 1.5 142,455 1

Sort (cost=651,946.35..652,477.25 rows=212,362 width=8) (actual time=37,892.646..37,911.036 rows=142,455 loops=1)

  • Sort Key: (timezone('Etc/UTC'::text, (date_trunc('day'::text, timezone('Etc/UTC'::text, ((conversation_sessions.updated_at)::timestamp with time zone - '00:00:00'::interval))) + '00:00:00'::interval)))
  • Sort Method: external merge Disk: 2504kB
3. 380.294 37,804.256 ↑ 1.5 142,455 1

Nested Loop (cost=6,250.06..631,454.88 rows=212,362 width=8) (actual time=3,113.721..37,804.256 rows=142,455 loops=1)

4. 346.533 3,403.197 ↓ 1.1 141,165 1

Bitmap Heap Scan on conversations (cost=6,249.49..110,637.56 rows=133,398 width=8) (actual time=3,064.242..3,403.197 rows=141,165 loops=1)

  • Recheck Cond: ((remote_page_id)::text = '1916545721965509'::text)
  • Rows Removed by Index Recheck: 687966
  • Heap Blocks: exact=34638 lossy=26868
5. 3,056.664 3,056.664 ↓ 5.5 736,578 1

Bitmap Index Scan on index_conversations_on_remote_page_id (cost=0.00..6,216.14 rows=133,398 width=0) (actual time=3,056.664..3,056.664 rows=736,578 loops=1)

  • Index Cond: ((remote_page_id)::text = '1916545721965509'::text)
6. 34,020.765 34,020.765 ↑ 10.0 1 141,165

Index Scan using index_conversation_sessions_on_conversation_id on conversation_sessions (cost=0.56..3.78 rows=10 width=16) (actual time=0.169..0.241 rows=1 loops=141,165)

  • Index Cond: (conversation_id = conversations.id)
  • Filter: ((updated_at >= '2018-12-27 00:00:00'::timestamp without time zone) AND (updated_at <= '2019-01-02 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 3