explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tMK

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

CTE Scan on b (cost=119.27..119.29 rows=1 width=32) (actual time=0.759..0.760 rows=1 loops=1)

2.          

CTE number_departures

3. 0.004 0.472 ↑ 1.0 1 1

Nested Loop (cost=43.25..55.30 rows=1 width=41) (actual time=0.465..0.472 rows=1 loops=1)

4. 0.037 0.037 ↑ 1.0 1 1

Index Scan using raw_preorder_data_download_code__header_unique_index on raw_preorder_data rpd (cost=0.55..8.57 rows=1 width=53) (actual time=0.031..0.037 rows=1 loops=1)

  • Index Cond: ((download_code = 'fd1027b3-96c3-4a87-bc30-1e568bd34bbc'::text) AND (line_number = 53))
  • Filter: (preorder_field_code = '1'::text)
  • Rows Removed by Filter: 24
5. 0.009 0.431 ↑ 1.0 1 1

Bitmap Heap Scan on raw_preorder_data rpd2 (cost=42.70..46.71 rows=1 width=57) (actual time=0.429..0.431 rows=1 loops=1)

  • Recheck Cond: ((value = rpd.value) AND (download_code = 'fd1027b3-96c3-4a87-bc30-1e568bd34bbc'::text))
  • Filter: (preorder_field_code = '1'::text)
  • Heap Blocks: exact=1
6. 0.010 0.422 ↓ 0.0 0 1

BitmapAnd (cost=42.70..42.70 rows=1 width=0) (actual time=0.422..0.422 rows=0 loops=1)

7. 0.038 0.038 ↑ 4.0 38 1

Bitmap Index Scan on raw_preorder_data_value_index (cost=0.00..5.69 rows=151 width=0) (actual time=0.038..0.038 rows=38 loops=1)

  • Index Cond: (value = rpd.value)
8. 0.374 0.374 ↓ 2.8 1,572 1

Bitmap Index Scan on raw_preorder_data_download_code__header_unique_index (cost=0.00..36.76 rows=561 width=0) (actual time=0.374..0.374 rows=1,572 loops=1)

  • Index Cond: (download_code = 'fd1027b3-96c3-4a87-bc30-1e568bd34bbc'::text)
9.          

CTE package_numbers

10. 0.004 0.244 ↑ 1.0 1 1

Nested Loop (cost=43.25..55.30 rows=1 width=4) (actual time=0.231..0.244 rows=1 loops=1)

11. 0.030 0.030 ↑ 1.0 1 1

Index Scan using raw_preorder_data_download_code__header_unique_index on raw_preorder_data rpd_1 (cost=0.55..8.57 rows=1 width=53) (actual time=0.018..0.030 rows=1 loops=1)

  • Index Cond: ((download_code = 'fd1027b3-96c3-4a87-bc30-1e568bd34bbc'::text) AND (line_number = 53))
  • Filter: (preorder_field_code = '55'::text)
  • Rows Removed by Filter: 24
12. 0.004 0.210 ↑ 1.0 1 1

Bitmap Heap Scan on raw_preorder_data rpd2_1 (cost=42.70..46.71 rows=1 width=57) (actual time=0.210..0.210 rows=1 loops=1)

  • Recheck Cond: ((value = rpd_1.value) AND (download_code = 'fd1027b3-96c3-4a87-bc30-1e568bd34bbc'::text))
  • Filter: (preorder_field_code = '55'::text)
  • Heap Blocks: exact=1
13. 0.005 0.206 ↓ 0.0 0 1

BitmapAnd (cost=42.70..42.70 rows=1 width=0) (actual time=0.206..0.206 rows=0 loops=1)

14. 0.034 0.034 ↑ 3.8 40 1

Bitmap Index Scan on raw_preorder_data_value_index (cost=0.00..5.69 rows=151 width=0) (actual time=0.034..0.034 rows=40 loops=1)

  • Index Cond: (value = rpd_1.value)
15. 0.167 0.167 ↓ 2.8 1,572 1

Bitmap Index Scan on raw_preorder_data_download_code__header_unique_index (cost=0.00..36.76 rows=561 width=0) (actual time=0.167..0.167 rows=1,572 loops=1)

  • Index Cond: (download_code = 'fd1027b3-96c3-4a87-bc30-1e568bd34bbc'::text)
16.          

CTE a

17. 0.008 0.732 ↑ 1.0 1 1

Nested Loop (cost=0.00..0.05 rows=1 width=4) (actual time=0.712..0.732 rows=1 loops=1)

  • Join Filter: (nd.line_number = pn.line_number)
18. 0.474 0.474 ↑ 1.0 1 1

CTE Scan on number_departures nd (cost=0.00..0.02 rows=1 width=4) (actual time=0.467..0.474 rows=1 loops=1)

19. 0.250 0.250 ↑ 1.0 1 1

CTE Scan on package_numbers pn (cost=0.00..0.02 rows=1 width=4) (actual time=0.237..0.250 rows=1 loops=1)

20.          

CTE b

21. 0.002 0.757 ↑ 1.0 1 1

Nested Loop (cost=0.57..8.62 rows=1 width=37) (actual time=0.756..0.757 rows=1 loops=1)

22. 0.006 0.741 ↑ 1.0 1 1

HashAggregate (cost=0.02..0.03 rows=1 width=4) (actual time=0.741..0.741 rows=1 loops=1)

  • Group Key: a.line_number
23. 0.735 0.735 ↑ 1.0 1 1

CTE Scan on a (cost=0.00..0.02 rows=1 width=4) (actual time=0.715..0.735 rows=1 loops=1)

24. 0.014 0.014 ↑ 1.0 1 1

Index Scan using raw_preorder_data_download_code__header_unique_index on raw_preorder_data rpd_2 (cost=0.55..8.57 rows=1 width=41) (actual time=0.014..0.014 rows=1 loops=1)

  • Index Cond: ((download_code = 'fd1027b3-96c3-4a87-bc30-1e568bd34bbc'::text) AND (line_number = a.line_number) AND (header = 'Вес места'::text))
Planning time : 3.095 ms
Execution time : 1.214 ms