explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 620G

Settings
# exclusive inclusive rows x rows loops node
1. 0.187 12.819 ↑ 1.0 50 1

Limit (cost=4,381.70..4,425.50 rows=50 width=126) (actual time=12.709..12.819 rows=50 loops=1)

2. 3.998 12.632 ↑ 3.8 5,050 1

Nested Loop (cost=1.42..16,755.08 rows=19,124 width=126) (actual time=0.048..12.632 rows=5,050 loops=1)

  • Join Filter: (p.id = v."phraseId")
3. 1.074 3.694 ↑ 4.4 4,940 1

Nested Loop (cost=1.14..8,037.36 rows=21,947 width=86) (actual time=0.044..3.694 rows=4,940 loops=1)

4. 0.211 1.585 ↑ 4.9 207 1

Nested Loop Left Join (cost=0.85..4,861.26 rows=1,013 width=68) (actual time=0.040..1.585 rows=207 loops=1)

5. 0.169 0.960 ↑ 4.9 207 1

Nested Loop Left Join (cost=0.56..3,060.30 rows=1,013 width=37) (actual time=0.038..0.960 rows=207 loops=1)

6. 0.170 0.170 ↑ 4.9 207 1

Index Scan using "phrases_projectId_key_path_deleted" on phrases p (cost=0.28..91.44 rows=1,013 width=29) (actual time=0.026..0.170 rows=207 loops=1)

  • Index Cond: ("projectId" = '-3000000'::integer)
7. 0.621 0.621 ↑ 1.0 1 207

Index Scan using phrases_translations_pkey on phrases_translations ts (cost=0.29..2.93 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=207)

  • Index Cond: ((p.id = "phraseId") AND ("langId" = 85))
8. 0.414 0.414 ↑ 1.0 1 207

Index Scan using phrases_versions_pkey on phrases_versions vs (cost=0.29..1.78 rows=1 width=47) (actual time=0.002..0.002 rows=1 loops=207)

  • Index Cond: (ts."currentVersion" = id)
9. 1.035 1.035 ↓ 1.1 24 207

Index Scan using "phrases_translations_phraseId" on phrases_translations t (cost=0.29..2.92 rows=22 width=18) (actual time=0.002..0.005 rows=24 loops=207)

  • Index Cond: ("phraseId" = p.id)
10. 4.940 4.940 ↑ 1.0 1 4,940

Index Scan using "phrases_versions_phraseId_langId" on phrases_versions v (cost=0.29..0.38 rows=1 width=65) (actual time=0.001..0.001 rows=1 loops=4,940)

  • Index Cond: (("phraseId" = t."phraseId") AND ("langId" = t."langId"))
  • Filter: ("userId" = '-1000000'::integer)