explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DSDr : 1

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 17,457.304 ↑ 40.0 1 1

Limit (cost=1.28..260,838.91 rows=40 width=16) (actual time=10,340.132..17,457.304 rows=1 loops=1)

2. 0.002 17,457.303 ↑ 161.0 1 1

Subquery Scan on base_alias (cost=1.28..1,049,872.73 rows=161 width=16) (actual time=10,340.131..17,457.303 rows=1 loops=1)

3. 0.006 17,457.301 ↑ 161.0 1 1

Nested Loop Left Join (cost=1.28..1,049,871.12 rows=161 width=705) (actual time=10,340.130..17,457.301 rows=1 loops=1)

4. 2,100.443 17,457.235 ↑ 161.0 1 1

Nested Loop Left Join (cost=0.85..1,049,796.96 rows=161 width=27) (actual time=10,340.066..17,457.235 rows=1 loops=1)

  • Filter: ((lower((reg_event.email)::text) ~~ '%nata.kirillova.1970%'::text) OR ((bc.company)::text = 'natakirillova1970'::text))
  • Rows Removed by Filter: 1602866
5. 2,533.856 2,533.856 ↑ 1.0 1,602,867 1

Index Scan using billingaccount_company_key on billingaccount bc (cost=0.43..99,034.13 rows=1,603,419 width=43) (actual time=0.057..2,533.856 rows=1,602,867 loops=1)

6. 12,822.936 12,822.936 ↑ 1.0 1 1,602,867

Index Scan using account_event_account_index on event reg_event (cost=0.43..0.58 rows=1 width=36) (actual time=0.008..0.008 rows=1 loops=1,602,867)

  • Index Cond: (bc.id = account_id)
  • Filter: (ntype = 1)
7. 0.060 0.060 ↑ 1.0 1 1

Index Only Scan using i_moyskladserviceaccount_billingaccount_id on moyskladserviceaccount serv_acc (cost=0.43..0.45 rows=1 width=16) (actual time=0.060..0.060 rows=1 loops=1)

  • Index Cond: (billingaccount_id = bc.id)
  • Heap Fetches: 1
Planning time : 0.544 ms
Execution time : 17,457.387 ms