explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nRTK

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.148 ↑ 4.0 1 1

Unique (cost=38.12..38.12 rows=4 width=1,146) (actual time=0.144..0.148 rows=1 loops=1)

2. 0.016 0.146 ↑ 2.0 2 1

Sort (cost=38.12..38.12 rows=4 width=1,146) (actual time=0.143..0.146 rows=2 loops=1)

  • Sort Key: md.micro_category_id, ((ll.nr)::integer) DESC
  • Sort Method: quicksort Memory: 28kB
3. 0.009 0.130 ↑ 2.0 2 1

Nested Loop (cost=1.35..38.11 rows=4 width=1,146) (actual time=0.092..0.130 rows=2 loops=1)

4. 0.009 0.105 ↑ 2.0 2 1

Nested Loop (cost=1.32..36.33 rows=4 width=1,150) (actual time=0.077..0.105 rows=2 loops=1)

5. 0.015 0.015 ↑ 1.0 1 1

Index Scan using locations_id_pkey on locations l (cost=0.03..4.04 rows=1 width=32) (actual time=0.013..0.015 rows=1 loops=1)

  • Index Cond: (id = 637640)
6. 0.003 0.081 ↑ 2.0 2 1

Nested Loop (cost=1.28..32.29 rows=4 width=1,150) (actual time=0.060..0.081 rows=2 loops=1)

7. 0.005 0.020 ↑ 1.0 1 1

Limit (cost=1.00..1.00 rows=1 width=16) (actual time=0.015..0.020 rows=1 loops=1)

8. 0.007 0.015 ↑ 1.0 1 1

Sort (cost=1.00..1.00 rows=1 width=16) (actual time=0.013..0.015 rows=1 loops=1)

  • Sort Key: tariff.user_segment_id
  • Sort Method: quicksort Memory: 25kB
9. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on tariff (cost=0.00..1.00 rows=1 width=16) (actual time=0.006..0.008 rows=1 loops=1)

  • Filter: ((user_segment_id = ANY ('{29731777}'::integer[])) OR is_default)
10. 0.025 0.058 ↑ 2.5 2 1

Hash Join (cost=0.28..31.29 rows=5 width=1,150) (actual time=0.043..0.058 rows=2 loops=1)

  • Hash Cond: (md.location_id = ll.elem)
11. 0.020 0.020 ↑ 4.0 2 1

Index Scan using matrix_data_index_reversed_ver1 on matrix_data md (cost=0.05..31.05 rows=8 width=1,142) (actual time=0.011..0.020 rows=2 loops=1)

  • Index Cond: ((matrix_id = tariff.package_matrix_id) AND (location_id = ANY (l.tree)) AND (micro_category_id = ANY ('{37}'::integer[])))
12. 0.006 0.013 ↑ 50.0 2 1

Hash (cost=0.10..0.10 rows=100 width=12) (actual time=0.012..0.013 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 0.007 0.007 ↑ 50.0 2 1

Function Scan on unnest ll (cost=0.00..0.10 rows=100 width=12) (actual time=0.005..0.007 rows=2 loops=1)

14. 0.016 0.016 ↑ 1.0 1 2

Index Only Scan using micro_categories_id_pkey on micro_categories mc (cost=0.03..0.44 rows=1 width=4) (actual time=0.006..0.008 rows=1 loops=2)

  • Index Cond: (id = md.micro_category_id)
  • Heap Fetches: 2
Planning time : 1.126 ms
Execution time : 0.248 ms