explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q2Y2

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1.203 ↑ 1.0 1 1

Result (cost=23.18..23.19 rows=1 width=64) (actual time=1.203..1.203 rows=1 loops=1)

  • Output: $1, $2
  • Buffers: shared hit=1,107
  • time=0.061..0.061 rows=1 loops=1)
2.          

Initplan (for Result)

3. 0.019 0.019 ↑ 1.0 1 1

Index Scan using st__server_hosts_name_key on dw.st__server_hosts (cost=0.15..8.17 rows=1 width=4) (actual time=0.017..0.019 rows=1 loops=1)

  • Output: st__server_hosts.id
  • Index Cond: (st__server_hosts.name = 'p40rmisdb01'::text)
  • Buffers: shared hit=2
4. 0.063 0.063 ↑ 1.0 1 1

Limit (cost=0.42..7.50 rows=1 width=32) (actual time=0.062..0.063 rows=1 loops=1)

  • Output: ((data_import__snapshots.data ->> 'snapshotted_at'::text))
  • Buffers: shared hit=9
  • -> Index Scan using data_import__snapshots__snapshotted_at__idx on dw.data_import__snapshots (cost=0.42..26774.17 rows=3,778 width=32) (actual
  • Output: (data_import__snapshots.data ->> 'snapshotted_at'::text)
  • Index Cond: ((data_import__snapshots.data ->> 'snapshotted_at'::text) IS NOT NULL)
  • Filter: (data_import__snapshots.host_id = $0)
  • Rows Removed by Filter: 3
  • Buffers: shared hit=9
5. 0.002 1.135 ↑ 1.0 1 1

Limit (cost=0.42..7.50 rows=1 width=32) (actual time=1.134..1.135 rows=1 loops=1)

  • Output: ((data_import__snapshots_1.data ->> 'snapshotted_at'::text))
  • Buffers: shared hit=1,098
6. 1.133 1.133 ↑ 3,778.0 1 1

Index Scan Backward using data_import__snapshots__snapshotted_at__idx on dw.data_import__snapshots data_import__snapshots_1 (cost=0.42..26,774.17 rows=3,778 width=32) (actual time=1.133..1.133 rows=1 loops=1)

  • Output: (data_import__snapshots_1.data ->> 'snapshotted_at'::text)
  • Index Cond: ((data_import__snapshots_1.data ->> 'snapshotted_at'::text) IS NOT NULL)
  • Filter: (data_import__snapshots_1.host_id = $0)
  • Rows Removed by Filter: 2,020
  • Buffers: shared hit=1,098
Planning time : 0.320 ms
Execution time : 1.254 ms