explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oQL3

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 0.447 ↑ 1.0 1 1

Limit (cost=1,897.69..1,907.82 rows=1 width=27) (actual time=0.445..0.447 rows=1 loops=1)

2. 0.019 0.444 ↑ 441.0 1 1

Result (cost=1,897.69..6,364.58 rows=441 width=27) (actual time=0.444..0.444 rows=1 loops=1)

3. 0.046 0.404 ↑ 441.0 1 1

Sort (cost=1,897.69..1,898.79 rows=441 width=34) (actual time=0.404..0.404 rows=1 loops=1)

  • Sort Key: ull.id DESC, e.effective_time DESC
  • Sort Method: top-N heapsort Memory: 25kB
4. 0.082 0.358 ↑ 10.8 41 1

Nested Loop Left Join (cost=18.99..1,895.49 rows=441 width=34) (actual time=0.086..0.358 rows=41 loops=1)

5. 0.031 0.194 ↓ 41.0 41 1

Nested Loop Left Join (cost=0.58..32.35 rows=1 width=32) (actual time=0.053..0.194 rows=41 loops=1)

6. 0.008 0.122 ↓ 41.0 41 1

Nested Loop Left Join (cost=0.29..24.03 rows=1 width=32) (actual time=0.050..0.122 rows=41 loops=1)

7. 0.077 0.077 ↑ 1.0 1 1

Seq Scan on user_load_link ull (cost=0.00..13.91 rows=1 width=24) (actual time=0.030..0.077 rows=1 loops=1)

  • Filter: (load_id = '2267857113533383784'::bigint)
  • Rows Removed by Filter: 392
8. 0.037 0.037 ↓ 41.0 41 1

Index Scan using idx_event_load_id on event e (cost=0.29..10.11 rows=1 width=32) (actual time=0.018..0.037 rows=41 loops=1)

  • Index Cond: ((load_id = ull.load_id) AND (load_id = '2267857113533383784'::bigint))
  • Filter: ((event_type = 4402) AND (event_code = 4302) AND (created_by_user_id = ull.user_id))
  • Rows Removed by Filter: 3
9. 0.041 0.041 ↑ 1.0 1 41

Index Scan using idx_location_id on location l (cost=0.29..8.31 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=41)

  • Index Cond: (e.location_id = id)
10. 0.041 0.082 ↑ 772.0 1 41

Bitmap Heap Scan on user_security_logs usl (cost=18.40..1,844.39 rows=772 width=16) (actual time=0.002..0.002 rows=1 loops=41)

  • Recheck Cond: (ull.user_id = user_id)
  • Heap Blocks: exact=41
11. 0.041 0.041 ↑ 772.0 1 41

Bitmap Index Scan on idx_user_security_logs_user_id (cost=0.00..18.21 rows=772 width=0) (actual time=0.001..0.001 rows=1 loops=41)

  • Index Cond: (ull.user_id = user_id)
12.          

SubPlan (for Nested Loop Left Join)

13. 0.000 0.000 ↑ 1.0 1 41

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=41)

  • One-Time Filter: (ull.id > 0)
14. 0.000 0.000 ↑ 1.0 1 41

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=41)

  • One-Time Filter: (usl.id > 0)
15.          

SubPlan (for Result)

16. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_event_load_id on event e_1 (cost=0.29..10.09 rows=1 width=0) (never executed)

  • Index Cond: (load_id = '2267857113533383784'::bigint)
  • Filter: ((ull.user_id = created_by_user_id) AND (event_code = 250))
17. 0.021 0.021 ↑ 1.0 1 1

Index Scan using idx_event_load_id on event e_2 (cost=0.29..10.08 rows=1 width=8) (actual time=0.019..0.021 rows=1 loops=1)

  • Index Cond: (load_id = '2267857113533383784'::bigint)
  • Filter: (event_code = 250)
  • Rows Removed by Filter: 43
Planning time : 0.619 ms
Execution time : 0.578 ms