explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qyPU

Settings
# exclusive inclusive rows x rows loops node
1. 4.949 519.228 ↑ 1.0 1 1

Aggregate (cost=75,945.08..75,945.09 rows=1 width=8) (actual time=519.228..519.228 rows=1 loops=1)

2.          

CTE created_records

3. 364.061 496.310 ↓ 33,821.0 33,821 1

Insert on project_features (cost=0.87..75,945.06 rows=1 width=52) (actual time=0.127..496.310 rows=33,821 loops=1)

  • Conflict Resolution: NOTHING
  • Conflict Arbiter Indexes: index_project_features_on_project_id
  • Tuples Inserted: 33821
  • Conflicting Tuples: 0
4. 47.882 132.249 ↓ 33,821.0 33,821 1

Nested Loop Anti Join (cost=0.87..75,945.06 rows=1 width=52) (actual time=0.080..132.249 rows=33,821 loops=1)

5. 16.725 16.725 ↓ 1.0 33,821 1

Index Only Scan using projects_pkey on projects (cost=0.43..2,173.74 rows=33,192 width=4) (actual time=0.025..16.725 rows=33,821 loops=1)

  • Index Cond: ((id >= 1100000) AND (id <= 1150000))
  • Heap Fetches: 245
6. 67.642 67.642 ↓ 0.0 0 33,821

Index Only Scan using index_project_features_on_project_id on project_features project_features_1 (cost=0.43..2.21 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=33,821)

  • Index Cond: (project_id = projects.id)
  • Heap Fetches: 33821
7. 514.279 514.279 ↓ 33,821.0 33,821 1

CTE Scan on created_records (cost=0.00..0.02 rows=1 width=0) (actual time=0.130..514.279 rows=33,821 loops=1)

Planning time : 0.647 ms
Execution time : 2,853.455 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint fk_18513d9b92 2,328.832 ms 33821 0.069 ms