explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EMAv

Settings
# exclusive inclusive rows x rows loops node
1. 0.080 11,892.046 ↓ 18.5 500 1

Limit (cost=22,955.97..22,957.05 rows=27 width=1,054) (actual time=11,846.845..11,892.046 rows=500 loops=1)

2. 14.740 11,891.966 ↓ 18.5 500 1

Unique (cost=22,955.97..22,957.05 rows=27 width=1,054) (actual time=11,846.844..11,891.966 rows=500 loops=1)

3. 766.416 11,877.226 ↓ 742.1 20,038 1

Sort (cost=22,955.97..22,956.03 rows=27 width=1,054) (actual time=11,846.843..11,877.226 rows=20,038 loops=1)

  • Sort Key: vulnerability_occurrences.id, vulnerability_occurrences.created_at, vulnerability_occurrences.updated_at, vulnerability_occurrences.severity, vulnerability_occurrences.confidence, vulnerability_occurrences.report_type, vulnerability_occurrences.project_id,
  • Sort Method: external merge Disk: 195760kB
4. 48.363 11,110.810 ↓ 6,267.6 169,225 1

Nested Loop (cost=0.86..22,955.33 rows=27 width=1,054) (actual time=3.874..11,110.810 rows=169,225 loops=1)

5. 2.081 34.739 ↓ 1.0 2,087 1

Nested Loop (cost=0.43..4,238.66 rows=2,085 width=8) (actual time=0.137..34.739 rows=2,087 loops=1)

6. 5.527 5.527 ↓ 1.0 2,087 1

Seq Scan on vulnerability_feedback (cost=0.00..164.85 rows=2,085 width=4) (actual time=0.032..5.527 rows=2,087 loops=1)

7. 27.131 27.131 ↑ 1.0 1 2,087

Index Only Scan using projects_pkey on projects (cost=0.43..1.94 rows=1 width=4) (actual time=0.012..0.013 rows=1 loops=2,087)

  • Index Cond: (id = vulnerability_feedback.project_id)
  • Heap Fetches: 770
8. 11,027.708 11,027.708 ↑ 1.2 81 2,087

Index Scan using index_vulnerability_occurrences_on_unique_keys on vulnerability_occurrences (cost=0.42..8.02 rows=96 width=1,054) (actual time=3.056..5.284 rows=81 loops=2,087)

  • Index Cond: (project_id = projects.id)
  • Filter: (report_type = ANY ('{2,1}'::integer[]))
  • Rows Removed by Filter: 397
Planning time : 12.032 ms
Execution time : 11,944.659 ms