explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G1HC

Settings
# exclusive inclusive rows x rows loops node
1. 0.494 3.442 ↑ 3,320.0 1 1

HashAggregate (cost=8,332,693.39..8,332,751.49 rows=3,320 width=245) (actual time=3.439..3.442 rows=1 loops=1)

  • Group Key: ogo_requests_archive.sessionid, ogo_requests_archive.portalcodeid
  • Planning time: 1.971 ms
  • Execution time: 3.591 ms
2. 0.089 2.948 ↑ 12,544.2 233 1

Nested Loop (cost=45.13..8,223,088.01 rows=2,922,810 width=79) (actual time=2.499..2.948 rows=233 loops=1)

3. 0.107 1.359 ↑ 1.0 100 1

Nested Loop (cost=44.57..554.27 rows=100 width=84) (actual time=0.448..1.359 rows=100 loops=1)

4. 0.107 0.452 ↑ 1.0 100 1

HashAggregate (cost=44.02..45.02 rows=100 width=42) (actual time=0.422..0.452 rows=100 loops=1)

  • Group Key: sessions.sessionid
5. 0.021 0.345 ↑ 1.0 100 1

Limit (cost=0.29..42.77 rows=100 width=50) (actual time=0.016..0.345 rows=100 loops=1)

6. 0.324 0.324 ↑ 1,844.6 100 1

Index Scan Backward using sessions_id_idx on sessions (cost=0.29..78,352.11 rows=184,462 width=50) (actual time=0.015..0.324 rows=100 loops=1)

7. 0.800 0.800 ↑ 1.0 1 100

Index Only Scan using idx_sessions on sessions s (cost=0.55..5.08 rows=1 width=42) (actual time=0.007..0.008 rows=1 loops=100)

  • Index Cond: (sessionid = sessions.sessionid)
  • Heap Fetches: 100
8. 1.500 1.500 ↑ 14,614.0 2 100

Index Scan using idx_ogoarch_sessionid on ogo_requests_archive (cost=0.57..81,933.06 rows=29,228 width=79) (actual time=0.013..0.015 rows=2 loops=100)

  • Index Cond: (sessionid = s.sessionid)
  • Filter: ((name !~ 'authenticate'::text) AND (state >= 1000) AND (state <= 1999))
  • Rows Removed by Filter: 1