explain.depesz.com

PostgreSQL's explain analyze made readable

Result: O0nY

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 72.822 ↓ 1.5 3 1

Sort (cost=2,438.22..2,438.23 rows=2 width=57) (actual time=72.821..72.822 rows=3 loops=1)

  • Sort Key: city."usageCount" DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.009 72.808 ↓ 1.5 3 1

Nested Loop Left Join (cost=0.70..2,438.21 rows=2 width=57) (actual time=18.598..72.808 rows=3 loops=1)

3. 0.007 72.748 ↓ 1.5 3 1

Nested Loop (cost=0.42..2,404.12 rows=2 width=22) (actual time=18.567..72.748 rows=3 loops=1)

4. 0.007 72.714 ↓ 1.5 3 1

Nested Loop (cost=0.00..2,389.09 rows=2 width=14) (actual time=18.550..72.714 rows=3 loops=1)

  • Join Filter: ("languageData"."languageId" = language.id)
5. 72.698 72.698 ↑ 137.3 3 1

Seq Scan on "languageData" (cost=0.00..2,353.82 rows=412 width=18) (actual time=18.540..72.698 rows=3 loops=1)

  • Filter: ((value ~~* 'balb%'::citext) AND (("tableName")::text = 'cities'::text))
  • Rows Removed by Filter: 89360
6. 0.004 0.009 ↑ 3.0 1 3

Materialize (cost=0.00..16.77 rows=3 width=4) (actual time=0.003..0.003 rows=1 loops=3)

7. 0.005 0.005 ↑ 3.0 1 1

Seq Scan on languages language (cost=0.00..16.75 rows=3 width=4) (actual time=0.005..0.005 rows=1 loops=1)

  • Filter: ((code)::text = 'en-US'::text)
8. 0.027 0.027 ↑ 1.0 1 3

Index Scan using "PK_4762ffb6e5d198cfec5606bc11e" on cities city (cost=0.42..7.51 rows=1 width=12) (actual time=0.009..0.009 rows=1 loops=3)

  • Index Cond: (id = "languageData"."fkId")
9. 0.015 0.015 ↑ 1.0 1 3

Index Scan using "PK_09ab30ca0975c02656483265f4f" on states state (cost=0.28..0.30 rows=1 width=7) (actual time=0.005..0.005 rows=1 loops=3)

  • Index Cond: (id = city."stateId")
10.          

SubPlan (for Nested Loop Left Join)

11. 0.009 0.036 ↑ 1.0 1 3

Limit (cost=0.70..16.75 rows=1 width=10) (actual time=0.010..0.012 rows=1 loops=3)

12. 0.003 0.027 ↑ 1.0 1 3

Nested Loop (cost=0.70..16.75 rows=1 width=10) (actual time=0.009..0.009 rows=1 loops=3)

13. 0.009 0.009 ↑ 1.0 1 3

Index Only Scan using "PK_09ab30ca0975c02656483265f4f" on states "stateSub" (cost=0.28..8.30 rows=1 width=4) (actual time=0.002..0.003 rows=1 loops=3)

  • Index Cond: (id = city."stateId")
  • Heap Fetches: 3
14. 0.015 0.015 ↑ 1.0 1 3

Index Scan using "IDX_LANGUAGEDATA_FKID" on "languageData" sld (cost=0.42..8.44 rows=1 width=14) (actual time=0.005..0.005 rows=1 loops=3)

  • Index Cond: ("fkId" = city."stateId")
  • Filter: (("tableName")::text = 'states'::text)
Planning time : 0.725 ms
Execution time : 72.914 ms