explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HP0B

Settings
# exclusive inclusive rows x rows loops node
1. 11.054 1,346.998 ↑ 1.0 1 1

Aggregate (cost=122,749.47..122,749.48 rows=1 width=8) (actual time=1,346.998..1,346.998 rows=1 loops=1)

2.          

CTE created_records

3. 842.999 1,298.552 ↓ 5,664.2 67,970 1

Insert on project_features (cost=0.87..122,749.20 rows=12 width=52) (actual time=15.409..1,298.552 rows=67,970 loops=1)

  • Conflict Resolution: NOTHING
  • Conflict Arbiter Indexes: index_project_features_on_project_id
  • Tuples Inserted: 67970
  • Conflicting Tuples: 0
4. 141.631 455.553 ↓ 5,664.2 67,970 1

Nested Loop Anti Join (cost=0.87..122,749.20 rows=12 width=52) (actual time=2.907..455.553 rows=67,970 loops=1)

5. 42.042 42.042 ↓ 1.0 67,970 1

Index Only Scan using projects_pkey on projects (cost=0.43..4,270.54 rows=66,544 width=4) (actual time=0.065..42.042 rows=67,970 loops=1)

  • Index Cond: ((id >= 1100000) AND (id <= 1200000))
  • Heap Fetches: 556
6. 271.880 271.880 ↓ 0.0 0 67,970

Index Only Scan using index_project_features_on_project_id on project_features project_features_1 (cost=0.43..1.77 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=67,970)

  • Index Cond: (project_id = projects.id)
  • Heap Fetches: 67970
7. 1,335.944 1,335.944 ↓ 5,664.2 67,970 1

CTE Scan on created_records (cost=0.00..0.24 rows=12 width=0) (actual time=15.415..1,335.944 rows=67,970 loops=1)

Planning time : 2.869 ms
Execution time : 13,024.069 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint fk_18513d9b92 11,659.511 ms 67970 0.172 ms