explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 71gM

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 18.427 ↑ 1.0 10 1

Limit (cost=0.85..3,886.61 rows=10 width=340) (actual time=0.573..18.427 rows=10 loops=1)

2. 0.124 18.415 ↑ 35.4 10 1

Nested Loop Left Join (cost=0.85..137,556.49 rows=354 width=340) (actual time=0.572..18.415 rows=10 loops=1)

  • Join Filter: (aps_last.id = a.m_lst_state_id)
  • Rows Removed by Join Filter: 131
3. 0.021 18.251 ↑ 35.4 10 1

Nested Loop Left Join (cost=0.85..137,459.43 rows=354 width=245) (actual time=0.537..18.251 rows=10 loops=1)

  • Join Filter: (a.application_state_id = aps.id)
  • Rows Removed by Join Filter: 41
4. 0.025 18.200 ↑ 35.4 10 1

Nested Loop Left Join (cost=0.85..137,383.32 rows=354 width=206) (actual time=0.525..18.200 rows=10 loops=1)

5. 13.385 13.385 ↑ 35.4 10 1

Index Scan Backward using application_pkey on application a (cost=0.42..134,420.90 rows=354 width=198) (actual time=0.511..13.385 rows=10 loops=1)

  • Filter: ((m_telephone ~~ '%09800%'::text) OR (m_cl_inn ~~ '%09800%'::text) OR (m_cl_full_name ~~ '%09800%'::text) OR (m_email ~~ '%09800%'::text))
  • Rows Removed by Filter: 4986
6. 4.790 4.790 ↑ 1.0 1 10

Index Scan using application_state_changes_pkey on application_state_changes ac (cost=0.43..8.37 rows=1 width=16) (actual time=0.479..0.479 rows=1 loops=10)

  • Index Cond: (id = a.app_state_last_id)
7. 0.022 0.030 ↑ 3.0 5 10

Materialize (cost=0.00..1.22 rows=15 width=43) (actual time=0.001..0.003 rows=5 loops=10)

8. 0.008 0.008 ↑ 1.5 10 1

Seq Scan on application_state aps (cost=0.00..1.15 rows=15 width=43) (actual time=0.004..0.008 rows=10 loops=1)

9. 0.034 0.040 ↑ 1.2 13 10

Materialize (cost=0.00..1.22 rows=15 width=43) (actual time=0.000..0.004 rows=13 loops=10)

10. 0.006 0.006 ↑ 1.0 15 1

Seq Scan on application_state aps_last (cost=0.00..1.15 rows=15 width=43) (actual time=0.001..0.006 rows=15 loops=1)