explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NybA

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

Nested Loop (cost=7,337.82..7,369.07 rows=5 width=99) (actual time=38.064..38.064 rows=0 loops=1)

2.          

CTE org_v

3. 0.859 37.162 ↑ 1.0 896 1

Nested Loop (cost=0.69..7,328.80 rows=915 width=12) (actual time=0.048..37.162 rows=896 loops=1)

4. 1.457 1.457 ↓ 1.0 917 1

Seq Scan on organisations o (cost=0.00..170.57 rows=915 width=17) (actual time=0.011..1.457 rows=917 loops=1)

  • Filter: active
  • Rows Removed by Filter: 2,042
5. 34.846 34.846 ↑ 1.0 1 917

Index Only Scan using cloudscans_hostname_by_hostname_vendorid on cloudscans_hostnames h (cost=0.69..7.81 rows=1 width=42) (actual time=0.038..0.038 rows=1 loops=917)

  • Index Cond: (hostname = o.primary_hostname)
  • Heap Fetches: 896
6.          

CTE host_v

7. 0.055 0.055 ↑ 1.0 1 1

Index Only Scan using cloudscans_hostname_by_hostname_vendorid on cloudscans_hostnames (cost=0.69..8.71 rows=1 width=8) (actual time=0.054..0.055 rows=1 loops=1)

  • Index Cond: (hostname = 'abgabas11.tripod.com'::text)
  • Heap Fetches: 1
8. 0.244 38.063 ↓ 0.0 0 1

Hash Join (cost=0.03..21.81 rows=5 width=4) (actual time=38.063..38.063 rows=0 loops=1)

  • Hash Cond: (org_v.datastore_vendor_id = host_v.datastore_vendor_id)
9. 37.761 37.761 ↑ 1.0 896 1

CTE Scan on org_v (cost=0.00..18.30 rows=915 width=12) (actual time=0.051..37.761 rows=896 loops=1)

10. 0.001 0.058 ↑ 1.0 1 1

Hash (cost=0.02..0.02 rows=1 width=8) (actual time=0.058..0.058 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
11. 0.057 0.057 ↑ 1.0 1 1

CTE Scan on host_v (cost=0.00..0.02 rows=1 width=8) (actual time=0.056..0.057 rows=1 loops=1)

12. 0.000 0.000 ↓ 0.0 0

Index Scan using notifications_definitions_org_type on notifications_definitions ad (cost=0.29..1.94 rows=1 width=99) (never executed)

  • Index Cond: ((organisation_id = org_v.organisation_id) AND (notification_type_id = 5) AND (enabled = true) AND (deleted_at IS NULL))
  • Filter: enabled
Planning time : 1.818 ms
Execution time : 38.333 ms