explain.depesz.com

PostgreSQL's explain analyze made readable

Result: S2Qt

Settings
# exclusive inclusive rows x rows loops node
1. 0.337 4,611.865 ↑ 1.0 10 1

Limit (cost=18.43..21.04 rows=10 width=160) (actual time=5.842..4,611.865 rows=10 loops=1)

2. 35.573 4,611.528 ↑ 2,150.0 10 1

Nested Loop (cost=18.43..5,621.20 rows=21,500 width=160) (actual time=5.819..4,611.528 rows=10 loops=1)

3. 0.065 0.065 ↑ 107.5 2 1

Index Scan using audit_operation_created_idx on audit (cost=0.27..49.47 rows=215 width=56) (actual time=0.035..0.065 rows=2 loops=1)

  • Index Cond: ((operation)::text = 'availabilityRequest'::text)
4. 2,356.334 4,575.890 ↑ 20.0 5 2

HashAggregate (cost=18.16..21.66 rows=100 width=40) (actual time=2,287.856..2,287.945 rows=5 loops=2)

  • Group Key: date_trunc('day'::text, timezone((((audit.data -> 'req'::text) -> 'query'::text) ->> 'timezone'::text), (((q1.item -> 'time_range'::text) ->> 0))::timestamp with time zone))
5. 2,194.604 2,219.556 ↓ 7.7 769 2

Subquery Scan on q1 (cost=0.14..11.91 rows=100 width=40) (actual time=2.842..1,109.778 rows=769 loops=2)

6. 24.952 24.952 ↓ 7.7 769 2

Index Only Scan using audit_pkey on audit availability (cost=0.14..8.66 rows=100 width=32) (actual time=2.129..12.476 rows=769 loops=2)

  • Index Cond: (uid = audit.uid)
  • Heap Fetches: 2