explain.depesz.com

PostgreSQL's explain analyze made readable

Result: g8J

Settings
# exclusive inclusive rows x rows loops node
1. 4.752 572.301 ↑ 1.0 1 1

Aggregate (cost=79,372.54..79,372.55 rows=1 width=8) (actual time=572.301..572.301 rows=1 loops=1)

2.          

CTE created_records

3. 391.818 549.984 ↓ 35,550.0 35,550 1

Insert on project_features (cost=0.87..79,372.52 rows=1 width=52) (actual time=7.396..549.984 rows=35,550 loops=1)

  • Conflict Resolution: NOTHING
  • Conflict Arbiter Indexes: index_project_features_on_project_id
  • Tuples Inserted: 35550
  • Conflicting Tuples: 0
4. 37.094 158.166 ↓ 35,550.0 35,550 1

Nested Loop Anti Join (cost=0.87..79,372.52 rows=1 width=52) (actual time=0.780..158.166 rows=35,550 loops=1)

5. 14.422 14.422 ↓ 1.0 35,550 1

Index Only Scan using projects_pkey on projects (cost=0.43..2,293.58 rows=35,042 width=4) (actual time=0.031..14.422 rows=35,550 loops=1)

  • Index Cond: ((id >= 2100000) AND (id <= 2150000))
  • Heap Fetches: 326
6. 106.650 106.650 ↓ 0.0 0 35,550

Index Only Scan using index_project_features_on_project_id on project_features project_features_1 (cost=0.43..2.19 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=35,550)

  • Index Cond: (project_id = projects.id)
  • Heap Fetches: 35550
7. 567.549 567.549 ↓ 35,550.0 35,550 1

CTE Scan on created_records (cost=0.00..0.02 rows=1 width=0) (actual time=7.400..567.549 rows=35,550 loops=1)

Planning time : 0.655 ms
Execution time : 5,653.433 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint fk_18513d9b92 5,072.614 ms 35550 0.143 ms