explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FngB

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.78..277.75 rows=1 width=53) (actual rows= loops=)

  • -> Index Scan using m_data_field_pkey on m_data_field (cost=0.14..0.36 rows=1 width=25)" Index Cond: (id = 153)
2.          

CTE timestamps

3. 0.000 0.000 ↓ 0.0

Values Scan on "*VALUES*" (cost=0.00..0.54 rows=43 width=8) (actual rows= loops=)

4.          

CTE unfiltered_revision_days

5. 0.000 0.000 ↓ 0.0

WindowAgg (cost=2.37..2.65 rows=14 width=24) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Sort (cost=2.37..2.40 rows=14 width=16) (actual rows= loops=)

  • Sort Key: timestamps.ts, its_universe_component_1."timestamp" DESC
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.68..2.10 rows=14 width=16) (actual rows= loops=)

  • Join Filter: (its_universe_component_1."timestamp" <= timestamps.ts)
8. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.68..0.69 rows=1 width=8) (actual rows= loops=)

  • Group Key: its_universe_component_1."timestamp
9. 0.000 0.000 ↓ 0.0

Index Only Scan using its_universe_component_idx_universe_covering_2 on its_universe_component its_universe_component_1 (cost=0.56..0.68 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (m_universe_id = 1,093)
10. 0.000 0.000 ↓ 0.0

CTE Scan on timestamps (cost=0.00..0.86 rows=43 width=8) (actual rows= loops=)

11.          

CTE revision_days

12. 0.000 0.000 ↓ 0.0

CTE Scan on unfiltered_revision_days (cost=0.00..0.32 rows=1 width=16) (actual rows= loops=)

  • Filter: (distance = 1)
13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.14..273.88 rows=1 width=36) (actual rows= loops=)

  • Join Filter: (ft_security_data.from_to @> revision_days."timestamp")
14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..0.71 rows=1 width=24) (actual rows= loops=)

  • Join Filter: (revision_days.revision_date = its_universe_component."timestamp")
15. 0.000 0.000 ↓ 0.0

CTE Scan on revision_days (cost=0.00..0.02 rows=1 width=16) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Index Only Scan using its_universe_component_idx_universe_covering_2 on its_universe_component (cost=0.56..0.68 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (m_universe_id = 1,093)
17. 0.000 0.000 ↓ 0.0

Index Only Scan using ft_security_data_idx_secid_covering on ft_security_data (cost=0.57..272.91 rows=20 width=41) (actual rows= loops=)

  • Index Cond: (security_id = its_universe_component.m_security_id)
  • Filter: (m_data_field_id = 153)