explain.depesz.com

PostgreSQL's explain analyze made readable

Result: m9jX

Settings
# exclusive inclusive rows x rows loops node
1. 6.406 35.630 ↓ 3,984.0 3,984 1

Nested Loop (cost=100.19..129.59 rows=1 width=215) (actual time=6.041..35.630 rows=3,984 loops=1)

  • Join Filter: ((c.knowledge_begin_date <= milestone.knowledge_begin_date) AND (c.knowledge_end_date > milestone.knowledge_begin_date))
2.          

CTE union_parser_mode

3. 0.061 0.737 ↓ 1.1 792 1

Append (cost=23.27..61.62 rows=754 width=17) (actual time=0.293..0.737 rows=792 loops=1)

4. 0.218 0.357 ↑ 1.1 474 1

HashAggregate (cost=23.27..28.35 rows=508 width=17) (actual time=0.292..0.357 rows=474 loops=1)

  • Group Key: etl_to_cocoa_mapping.etl_parser_id, etl_to_cocoa_mapping.in_cocoa_mode, etl_to_cocoa_mapping.etl_dataset_type_id, etl_to_cocoa_mapping.effective_begin_date, etl_to_cocoa_mapping.effective_end_date
5. 0.139 0.139 ↑ 1.1 476 1

Seq Scan on etl_to_cocoa_mapping (cost=0.00..16.92 rows=508 width=17) (actual time=0.010..0.139 rows=476 loops=1)

  • Filter: (knowledge_end_date > now())
  • Rows Removed by Filter: 18
6. 0.197 0.319 ↓ 1.3 318 1

HashAggregate (cost=23.27..25.73 rows=246 width=17) (actual time=0.265..0.319 rows=318 loops=1)

  • Group Key: etl_to_cocoa_mapping_1.cocoa_parser_id, etl_to_cocoa_mapping_1.in_cocoa_mode, etl_to_cocoa_mapping_1.etl_dataset_type_id, etl_to_cocoa_mapping_1.effective_begin_date, etl_to_cocoa_mapping_1.effective_end_date
7. 0.122 0.122 ↑ 1.1 476 1

Seq Scan on etl_to_cocoa_mapping etl_to_cocoa_mapping_1 (cost=0.00..16.92 rows=508 width=17) (actual time=0.005..0.122 rows=476 loops=1)

  • Filter: (knowledge_end_date > now())
  • Rows Removed by Filter: 18
8. 0.060 21.256 ↓ 3,984.0 3,984 1

Nested Loop (cost=38.57..63.61 rows=1 width=163) (actual time=6.017..21.256 rows=3,984 loops=1)

  • Join Filter: ((b.knowledge_begin_date <= milestone.knowledge_begin_date) AND (b.knowledge_end_date > milestone.knowledge_begin_date))
9. 3.162 9.244 ↓ 3,984.0 3,984 1

Hash Right Join (cost=38.57..59.33 rows=1 width=121) (actual time=6.000..9.244 rows=3,984 loops=1)

  • Hash Cond: ((d.parser_id = a.parser_id) AND (d.etl_dataset_type_id = a.dataset_type_id))
  • Join Filter: ((d.effective_begin_date <= a.effective_begin_date) AND (d.effective_end_date > a.effective_begin_date))
  • Rows Removed by Join Filter: 3984
  • Filter: ((d.parser_id IS NULL) OR ((d.parser_id > 0) AND d.in_cocoa_mode) OR ((d.parser_id < 0) AND (NOT d.in_cocoa_mode)))
10. 0.946 0.946 ↓ 1.1 792 1

CTE Scan on union_parser_mode d (cost=0.00..15.08 rows=754 width=17) (actual time=0.296..0.946 rows=792 loops=1)

11. 1.430 5.136 ↓ 3,984.0 3,984 1

Hash (cost=38.56..38.56 rows=1 width=121) (actual time=5.136..5.136 rows=3,984 loops=1)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 671kB
12. 0.494 3.706 ↓ 3,984.0 3,984 1

Nested Loop (cost=0.00..38.56 rows=1 width=121) (actual time=0.030..3.706 rows=3,984 loops=1)

13. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on test milestone (cost=0.00..31.75 rows=1 width=28) (actual time=0.009..0.010 rows=1 loops=1)

  • Filter: ((dataset_source_id = 1) AND (effective_begin_date = '2019-01-11'::date))
14. 0.270 3.202 ↓ 1,992.0 3,984 1

Append (cost=0.00..6.79 rows=2 width=109) (actual time=0.019..3.202 rows=3,984 loops=1)

15. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on processed_feed_data_keys a (cost=0.00..0.00 rows=1 width=588) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((dataset_source_id = 1) AND (effective_begin_date = '2019-01-11'::date) AND (available = 'Y'::bpchar) AND ((bucket_type)::text = 'REGULAR'::text) AND (knowledge_begin_date <= milestone.knowl
16. 2.931 2.931 ↓ 3,984.0 3,984 1

Index Scan using idx_data_keys_date_book_knw_2019_01_1 on processed_feed_data_keys_2019_01_1 a_1 (cost=0.56..6.79 rows=1 width=109) (actual time=0.017..2.931 rows=3,984 loops=1)

  • Index Cond: ((effective_begin_date = '2019-01-11'::date) AND (dataset_source_id = 1) AND (dataset_type_id = milestone.dataset_type_id) AND (dataset_level_id = milestone.dataset_level_id) AND (book_id
  • Filter: ((available = 'Y'::bpchar) AND ((bucket_type)::text = 'REGULAR'::text) AND (knowledge_begin_date <= milestone.knowledge_begin_date))
17. 3.984 11.952 ↑ 2.0 1 3,984

Append (cost=0.00..4.25 rows=2 width=62) (actual time=0.002..0.003 rows=1 loops=3,984)

18. 0.000 0.000 ↓ 0.0 0 3,984

Seq Scan on processed_feed_data b (cost=0.00..0.00 rows=1 width=190) (actual time=0.000..0.000 rows=0 loops=3,984)

  • Filter: ((dataset_source_id = 1) AND (effective_begin_date = '2019-01-11'::date) AND (available = 'Y'::bpchar) AND (a.raw_record_id = raw_record_id) AND (a.parser_id = parser_id))
19. 7.968 7.968 ↑ 1.0 1 3,984

Index Scan using idx_feed_data_rwid_2019_01_1 on processed_feed_data_2019_01_1 b_1 (cost=0.43..4.25 rows=1 width=62) (actual time=0.002..0.002 rows=1 loops=3,984)

  • Index Cond: (raw_record_id = a.raw_record_id)
  • Filter: ((dataset_source_id = 1) AND (effective_begin_date = '2019-01-11'::date) AND (available = 'Y'::bpchar) AND (a.parser_id = parser_id))
20. 0.000 7.968 ↑ 2.0 1 3,984

Append (cost=0.00..4.32 rows=2 width=1,401) (actual time=0.002..0.002 rows=1 loops=3,984)

21. 0.000 0.000 ↓ 0.0 0 3,984

Seq Scan on processed_feed_records c (cost=0.00..0.00 rows=1 width=64) (actual time=0.000..0.000 rows=0 loops=3,984)

  • Filter: ((dataset_source_id = 1) AND (effective_begin_date = '2019-01-11'::date) AND (available = 'Y'::bpchar) AND (a.raw_record_id = raw_record_id) AND (a.parser_id = parser_id))
22. 7.968 7.968 ↑ 1.0 1 3,984

Index Scan using idx_records_rwid_2019_01_1 on processed_feed_records_2019_01_1 c_1 (cost=0.43..4.32 rows=1 width=1,401) (actual time=0.002..0.002 rows=1 loops=3,984)

  • Index Cond: (raw_record_id = a.raw_record_id)
  • Filter: ((dataset_source_id = 1) AND (effective_begin_date = '2019-01-11'::date) AND (available = 'Y'::bpchar) AND (a.parser_id = parser_id))