explain.depesz.com

PostgreSQL's explain analyze made readable

Result: X2cu : Optimization for: plan #q5u1

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.011 639,817.802 ↑ 1.0 10 1

Limit (cost=34,564,225.97..34,698,020.05 rows=10 width=16) (actual time=631,734.191..639,817.802 rows=10 loops=1)

2. 1,859.627 639,817.791 ↑ 7.3 10 1

Unique (cost=34,564,225.97..35,540,922.77 rows=73 width=16) (actual time=631,734.190..639,817.791 rows=10 loops=1)

3. 568,901.180 637,958.164 ↑ 9.8 19,861,393 1

Sort (cost=34,564,225.97..35,052,574.37 rows=195,339,360 width=16) (actual time=631,734.189..637,958.164 rows=19,861,393 loops=1)

  • Sort Key: refinitiv_2019_01.code, refinitiv_2019_01.date, refinitiv_2019_01.time_ms DESC
  • Sort Method: external merge Disk: 4966064kB
4. 16,556.120 69,056.984 ↑ 1.0 195,157,221 1

Append (cost=0.00..5,709,319.16 rows=195,339,360 width=16) (actual time=0.010..69,056.984 rows=195,157,221 loops=1)

5. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on refinitiv_2019_01 (cost=0.00..17.50 rows=200 width=44) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (date <= '2019-08-01'::date)
6. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on refinitiv_2019_02 (cost=0.00..17.50 rows=200 width=44) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (date <= '2019-08-01'::date)
7. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on refinitiv_2019_03 (cost=0.00..17.50 rows=200 width=44) (actual time=0.000..0.001 rows=0 loops=1)

  • Filter: (date <= '2019-08-01'::date)
8. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on refinitiv_2019_04 (cost=0.00..17.50 rows=200 width=44) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (date <= '2019-08-01'::date)
9. 12,281.687 12,281.687 ↓ 1.0 43,279,597 1

Seq Scan on refinitiv_2019_05 (cost=0.00..898,784.65 rows=43,279,332 width=16) (actual time=0.007..12,281.687 rows=43,279,597 loops=1)

  • Filter: (date <= '2019-08-01'::date)
10. 18,172.768 18,172.768 ↑ 1.0 69,629,756 1

Seq Scan on refinitiv_2019_06 (cost=0.00..1,446,264.40 rows=69,631,072 width=16) (actual time=0.007..18,172.768 rows=69,629,756 loops=1)

  • Filter: (date <= '2019-08-01'::date)
11. 21,237.692 21,237.692 ↓ 1.0 77,741,511 1

Seq Scan on refinitiv_2019_07 (cost=0.00..1,616,564.60 rows=77,741,330 width=16) (actual time=0.319..21,237.692 rows=77,741,511 loops=1)

  • Filter: (date <= '2019-08-01'::date)
12. 807.173 808.703 ↑ 1.0 4,506,355 1

Bitmap Heap Scan on refinitiv_2019_08 (cost=1,203.03..770,937.68 rows=4,686,824 width=16) (actual time=1.549..808.703 rows=4,506,355 loops=1)

  • Recheck Cond: (date <= '2019-08-01'::date)
  • Rows Removed by Index Recheck: 2002
  • Heap Blocks: lossy=37376
13. 1.530 1.530 ↑ 12.6 373,760 1

Bitmap Index Scan on refinitiv_2019_08_date_idx (cost=0.00..31.33 rows=4,692,452 width=0) (actual time=1.530..1.530 rows=373,760 loops=1)

  • Index Cond: (date <= '2019-08-01'::date)
14. 0.010 0.010 ↑ 1.0 2 1

Seq Scan on refinitiv_default (cost=0.00..1.02 rows=2 width=16) (actual time=0.010..0.010 rows=2 loops=1)

  • Filter: (date <= '2019-08-01'::date)
Planning time : 0.348 ms
Execution time : 640,111.721 ms