explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UgJM

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 2.470 ↓ 0.0 0 1

Limit (cost=48.31..48.32 rows=1 width=16) (actual time=2.470..2.470 rows=0 loops=1)

2. 0.017 2.469 ↓ 0.0 0 1

Sort (cost=48.31..48.81 rows=200 width=16) (actual time=2.469..2.469 rows=0 loops=1)

  • Sort Key: (count(*)) DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.002 2.452 ↓ 0.0 0 1

HashAggregate (cost=41.81..47.31 rows=200 width=16) (actual time=2.452..2.452 rows=0 loops=1)

  • Group Key: (date_trunc('hour'::text, x.entry) + ((((date_part('minute'::text, x.entry))::integer / 30))::double precision * '00:30:00'::interval))
4. 0.001 2.450 ↓ 0.0 0 1

Subquery Scan on x (cost=0.29..36.81 rows=1,000 width=8) (actual time=2.450..2.450 rows=0 loops=1)

5. 0.000 2.449 ↓ 0.0 0 1

ProjectSet (cost=0.29..9.32 rows=1,000 width=8) (actual time=2.449..2.449 rows=0 loops=1)

6. 2.449 2.449 ↓ 0.0 0 1

Index Scan using checkin_fk_organization_unit_idx on checkin c (cost=0.29..4.31 rows=1 width=16) (actual time=2.449..2.449 rows=0 loops=1)

  • Index Cond: (fk_organization_unit = 1,210,001,590)
  • Filter: ((checkin_time >= '2020-01-28 00:00:00+00'::timestamp with time zone) AND (checkin_time <= '2020-01-29 00:00:00+00'::timestamp with time zone))
Planning time : 0.653 ms
Execution time : 2.538 ms