explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PKWq

Settings
# exclusive inclusive rows x rows loops node
1. 15,327.459 297,986.882 ↑ 51,668.6 21 1

GroupAggregate (cost=3,215,482.40..3,296,165.73 rows=1,085,040 width=64) (actual time=285,008.246..297,986.882 rows=21 loops=1)

  • Group Key: (date_part('year'::text, timezone('America/Bogota'::text, timezone('utc'::text, submit_time)))), (date_part('month'::text, timezone('America/Bogota'::text, timezone('utc'::text, submit_time)))), (date_part('day'::text, timezone('America/Bogota'::text, timezone('utc'::text, submit_time)))), (date_part('hour'::text, timezone('America/Bogota'::text, timezone('utc'::text, submit_time))))
2. 3,547.850 282,659.423 ↓ 1.2 1,352,342 1

Sort (cost=3,215,482.40..3,218,350.23 rows=1,147,130 width=59) (actual time=282,086.007..282,659.423 rows=1,352,342 loops=1)

  • Sort Key: (date_part('year'::text, timezone('America/Bogota'::text, timezone('utc'::text, submit_time)))) DESC, (date_part('month'::text, timezone('America/Bogota'::text, timezone('utc'::text, submit_time)))) DESC, (date_part('day'::text, timezone('America/Bogota'::text, timezone('utc'::text, submit_time)))) DESC, (date_part('hour'::text, timezone('America/Bogota'::text, timezone('utc'::text, submit_time)))) DESC
  • Sort Method: external sort Disk: 92,632kB
3. 279,111.573 279,111.573 ↓ 1.2 1,352,342 1

Index Scan using messages_submit_time_date_ix on messages (cost=0.58..3,013,765.08 rows=1,147,130 width=59) (actual time=0.041..279,111.573 rows=1,352,342 loops=1)

  • Index Cond: ((submit_time)::date >= (timezone('America/Bogota'::text, timezone('utc'::text, ((now())::date)::timestamp with time zone)) - '1 day'::interval))
Planning time : 5.654 ms
Execution time : 297,997.073 ms