explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WwDL : Query Plan

Settings
# exclusive inclusive rows x rows loops node
1. 1,482.550 9,465,317.301 ↓ 7.4 2,193,127 1

Unique (cost=73,543,296.670..73,568,468.310 rows=296,137 width=307) (actual time=9,460,847.883..9,465,317.301 rows=2,193,127 loops=1)

  • Output: (golf_two(xray_november((quebec_three.two)::text))), (golf_two(xray_november((quebec_three.xray_lima)::text))), quebec_three.romeo_six, quebec_three.victor_mike, quebec_three.sierra_sierra, quebec_three.zulu_yankee, quebec_three.seven_golf, quebec_three.papa_sierra, (CASE WHEN ((quebec_three.victor_hotel + quebec_three.delta_mike) <= 'november'::double precision) THEN NULL::double precision WHEN ((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) < 'november'::double precision) THEN 'november'::double precision WHEN (((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) / (quebec_three.victor_hotel + quebec_three.delta_mike)) > 'four'::double precision) THEN 'four'::double precision ELSE ((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) / (quebec_three.victor_hotel + quebec_three.delta_mike)) END), quebec_three.delta_uniform, quebec_three.victor_hotel, quebec_three.delta_mike, (((quebec_three.echo + quebec_three.sierra_xray) + quebec_three.alpha)), quebec_three.xray_romeo, (CASE WHEN (quebec_three.zulu_yankee > 'november'::double precision) THEN ((((quebec_three.echo + quebec_three.sierra_xray) + quebec_three.delta_mike) + quebec_three.alpha) / quebec_three.zulu_yankee) ELSE NULL::double precision END), quebec_three.whiskey_four, quebec_three.kilo, (((quebec_three.zulu_echo + quebec_three.lima_five) + quebec_three.papa_india)), quebec_three.victor_six, (CASE WHEN (quebec_three.seven_golf > 'november'::double precision) THEN ((((quebec_three.zulu_echo + quebec_three.lima_five) + quebec_three.papa_india) + quebec_three.whiskey_four) / quebec_three.seven_golf) ELSE NULL::double precision END), quebec_three.quebec_papa, quebec_three.seven_oscar, quebec_three.delta_oscar, quebec_three.golf_oscar, quebec_three.foxtrot_two, ((quebec_three.foxtrot_two - quebec_three.quebec_papa)), (CASE WHEN (quebec_three.seven_oscar > 'november'::double precision) THEN ((quebec_three.golf_oscar - quebec_three.seven_oscar) / quebec_three.seven_oscar) ELSE NULL::double precision END), ((quebec_three.delta_oscar - quebec_three.quebec_papa)), ((quebec_three.delta_oscar - quebec_three.foxtrot_two)), (CASE WHEN (quebec_three.whiskey_india > 'november'::double precision) THEN ((quebec_three.papa_sierra - quebec_three.whiskey_india) / quebec_three.whiskey_india) ELSE NULL::double precision END), ((quebec_three.papa_sierra - quebec_three.seven_oscar)), quebec_three.whiskey_india, quebec_three.foxtrot_india
  • Buffers: shared hit=8699 read=68394204 written=70687, temp read=347495 written=347664
  • I/O Timings: read=45251958.490 write=17629.133
2. 19,977.528 9,463,834.751 ↓ 7.4 2,193,127 1

Sort (cost=73,543,296.670..73,544,037.010 rows=296,137 width=307) (actual time=9,460,847.881..9,463,834.751 rows=2,193,127 loops=1)

  • Output: (golf_two(xray_november((quebec_three.two)::text))), (golf_two(xray_november((quebec_three.xray_lima)::text))), quebec_three.romeo_six, quebec_three.victor_mike, quebec_three.sierra_sierra, quebec_three.zulu_yankee, quebec_three.seven_golf, quebec_three.papa_sierra, (CASE WHEN ((quebec_three.victor_hotel + quebec_three.delta_mike) <= 'november'::double precision) THEN NULL::double precision WHEN ((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) < 'november'::double precision) THEN 'november'::double precision WHEN (((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) / (quebec_three.victor_hotel + quebec_three.delta_mike)) > 'four'::double precision) THEN 'four'::double precision ELSE ((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) / (quebec_three.victor_hotel + quebec_three.delta_mike)) END), quebec_three.delta_uniform, quebec_three.victor_hotel, quebec_three.delta_mike, (((quebec_three.echo + quebec_three.sierra_xray) + quebec_three.alpha)), quebec_three.xray_romeo, (CASE WHEN (quebec_three.zulu_yankee > 'november'::double precision) THEN ((((quebec_three.echo + quebec_three.sierra_xray) + quebec_three.delta_mike) + quebec_three.alpha) / quebec_three.zulu_yankee) ELSE NULL::double precision END), quebec_three.whiskey_four, quebec_three.kilo, (((quebec_three.zulu_echo + quebec_three.lima_five) + quebec_three.papa_india)), quebec_three.victor_six, (CASE WHEN (quebec_three.seven_golf > 'november'::double precision) THEN ((((quebec_three.zulu_echo + quebec_three.lima_five) + quebec_three.papa_india) + quebec_three.whiskey_four) / quebec_three.seven_golf) ELSE NULL::double precision END), quebec_three.quebec_papa, quebec_three.seven_oscar, quebec_three.delta_oscar, quebec_three.golf_oscar, quebec_three.foxtrot_two, ((quebec_three.foxtrot_two - quebec_three.quebec_papa)), (CASE WHEN (quebec_three.seven_oscar > 'november'::double precision) THEN ((quebec_three.golf_oscar - quebec_three.seven_oscar) / quebec_three.seven_oscar) ELSE NULL::double precision END), ((quebec_three.delta_oscar - quebec_three.quebec_papa)), ((quebec_three.delta_oscar - quebec_three.foxtrot_two)), (CASE WHEN (quebec_three.whiskey_india > 'november'::double precision) THEN ((quebec_three.papa_sierra - quebec_three.whiskey_india) / quebec_three.whiskey_india) ELSE NULL::double precision END), ((quebec_three.papa_sierra - quebec_three.seven_oscar)), quebec_three.whiskey_india, quebec_three.foxtrot_india
  • Sort Key: (golf_two(xray_november((quebec_three.two)::text))), (golf_two(xray_november((quebec_three.xray_lima)::text))), quebec_three.romeo_six, quebec_three.victor_mike, quebec_three.sierra_sierra, quebec_three.zulu_yankee, quebec_three.seven_golf, quebec_three.papa_sierra, (CASE WHEN ((quebec_three.victor_hotel + quebec_three.delta_mike) <= 'november'::double precision) THEN NULL::double precision WHEN ((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) < 'november'::double precision) THEN 'november'::double precision WHEN (((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) / (quebec_three.victor_hotel + quebec_three.delta_mike)) > 'four'::double precision) THEN 'four'::double precision ELSE ((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) / (quebec_three.victor_hotel + quebec_three.delta_mike)) END), quebec_three.delta_uniform, quebec_three.victor_hotel, quebec_three.delta_mike, (((quebec_three.echo + quebec_three.sierra_xray) + quebec_three.alpha)), quebec_three.xray_romeo, (CASE WHEN (quebec_three.zulu_yankee > 'november'::double precision) THEN ((((quebec_three.echo + quebec_three.sierra_xray) + quebec_three.delta_mike) + quebec_three.alpha) / quebec_three.zulu_yankee) ELSE NULL::double precision END), quebec_three.whiskey_four, quebec_three.kilo, (((quebec_three.zulu_echo + quebec_three.lima_five) + quebec_three.papa_india)), quebec_three.victor_six, (CASE WHEN (quebec_three.seven_golf > 'november'::double precision) THEN ((((quebec_three.zulu_echo + quebec_three.lima_five) + quebec_three.papa_india) + quebec_three.whiskey_four) / quebec_three.seven_golf) ELSE NULL::double precision END), quebec_three.quebec_papa, quebec_three.seven_oscar, quebec_three.delta_oscar, quebec_three.golf_oscar, quebec_three.foxtrot_two, ((quebec_three.foxtrot_two - quebec_three.quebec_papa)), (CASE WHEN (quebec_three.seven_oscar > 'november'::double precision) THEN ((quebec_three.golf_oscar - quebec_three.seven_oscar) / quebec_three.seven_oscar) ELSE NULL::double precision END), ((quebec_three.delta_oscar - quebec_three.quebec_papa)), ((quebec_three.delta_oscar - quebec_three.foxtrot_two)), (CASE WHEN (quebec_three.whiskey_india > 'november'::double precision) THEN ((quebec_three.papa_sierra - quebec_three.whiskey_india) / quebec_three.whiskey_india) ELSE NULL::double precision END), ((quebec_three.papa_sierra - quebec_three.seven_oscar)), quebec_three.whiskey_india, quebec_three.foxtrot_india
  • Sort Method: external merge Disk: 565888kB
  • Buffers: shared hit=8699 read=68394204 written=70687, temp read=347495 written=347664
  • I/O Timings: read=45251958.490 write=17629.133
3. 1,869.733 9,443,857.223 ↓ 7.4 2,193,127 1

Gather (cost=73,400,110.900..73,491,482.530 rows=296,137 width=307) (actual time=9,420,163.350..9,443,857.223 rows=2,193,127 loops=1)

  • Output: (golf_two(xray_november((quebec_three.two)::text))), (golf_two(xray_november((quebec_three.xray_lima)::text))), quebec_three.romeo_six, quebec_three.victor_mike, quebec_three.sierra_sierra, quebec_three.zulu_yankee, quebec_three.seven_golf, quebec_three.papa_sierra, (CASE WHEN ((quebec_three.victor_hotel + quebec_three.delta_mike) <= 'november'::double precision) THEN NULL::double precision WHEN ((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) < 'november'::double precision) THEN 'november'::double precision WHEN (((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) / (quebec_three.victor_hotel + quebec_three.delta_mike)) > 'four'::double precision) THEN 'four'::double precision ELSE ((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) / (quebec_three.victor_hotel + quebec_three.delta_mike)) END), quebec_three.delta_uniform, quebec_three.victor_hotel, quebec_three.delta_mike, (((quebec_three.echo + quebec_three.sierra_xray) + quebec_three.alpha)), quebec_three.xray_romeo, (CASE WHEN (quebec_three.zulu_yankee > 'november'::double precision) THEN ((((quebec_three.echo + quebec_three.sierra_xray) + quebec_three.delta_mike) + quebec_three.alpha) / quebec_three.zulu_yankee) ELSE NULL::double precision END), quebec_three.whiskey_four, quebec_three.kilo, (((quebec_three.zulu_echo + quebec_three.lima_five) + quebec_three.papa_india)), quebec_three.victor_six, (CASE WHEN (quebec_three.seven_golf > 'november'::double precision) THEN ((((quebec_three.zulu_echo + quebec_three.lima_five) + quebec_three.papa_india) + quebec_three.whiskey_four) / quebec_three.seven_golf) ELSE NULL::double precision END), quebec_three.quebec_papa, quebec_three.seven_oscar, quebec_three.delta_oscar, quebec_three.golf_oscar, quebec_three.foxtrot_two, ((quebec_three.foxtrot_two - quebec_three.quebec_papa)), (CASE WHEN (quebec_three.seven_oscar > 'november'::double precision) THEN ((quebec_three.golf_oscar - quebec_three.seven_oscar) / quebec_three.seven_oscar) ELSE NULL::double precision END), ((quebec_three.delta_oscar - quebec_three.quebec_papa)), ((quebec_three.delta_oscar - quebec_three.foxtrot_two)), (CASE WHEN (quebec_three.whiskey_india > 'november'::double precision) THEN ((quebec_three.papa_sierra - quebec_three.whiskey_india) / quebec_three.whiskey_india) ELSE NULL::double precision END), ((quebec_three.papa_sierra - quebec_three.seven_oscar)), quebec_three.whiskey_india, quebec_three.foxtrot_india
  • Workers Planned: 4
  • Workers Launched: 4
  • Buffers: shared hit=8693 read=68394204 written=70687, temp read=276759 written=276902
  • I/O Timings: read=45251958.490 write=17629.133
4. 1,845.603 9,441,987.490 ↓ 5.9 438,625 5

Merge Join (cost=73,399,110.900..73,432,550.700 rows=74,034 width=307) (actual time=9,419,951.348..9,441,987.490 rows=438,625 loops=5)

  • Output: (golf_two(xray_november((quebec_three.two)::text))), (golf_two(xray_november((quebec_three.xray_lima)::text))), quebec_three.romeo_six, quebec_three.victor_mike, quebec_three.sierra_sierra, quebec_three.zulu_yankee, quebec_three.seven_golf, quebec_three.papa_sierra, CASE WHEN ((quebec_three.victor_hotel + quebec_three.delta_mike) <= 'november'::double precision) THEN NULL::double precision WHEN ((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) < 'november'::double precision) THEN 'november'::double precision WHEN (((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) / (quebec_three.victor_hotel + quebec_three.delta_mike)) > 'four'::double precision) THEN 'four'::double precision ELSE ((((((quebec_three.papa_sierra + quebec_three.zulu_yankee) - quebec_three.echo) - quebec_three.sierra_xray) - quebec_three.alpha) - quebec_three.lima_quebec) / (quebec_three.victor_hotel + quebec_three.delta_mike)) END, quebec_three.delta_uniform, quebec_three.victor_hotel, quebec_three.delta_mike, ((quebec_three.echo + quebec_three.sierra_xray) + quebec_three.alpha), quebec_three.xray_romeo, CASE WHEN (quebec_three.zulu_yankee > 'november'::double precision) THEN ((((quebec_three.echo + quebec_three.sierra_xray) + quebec_three.delta_mike) + quebec_three.alpha) / quebec_three.zulu_yankee) ELSE NULL::double precision END, quebec_three.whiskey_four, quebec_three.kilo, ((quebec_three.zulu_echo + quebec_three.lima_five) + quebec_three.papa_india), quebec_three.victor_six, CASE WHEN (quebec_three.seven_golf > 'november'::double precision) THEN ((((quebec_three.zulu_echo + quebec_three.lima_five) + quebec_three.papa_india) + quebec_three.whiskey_four) / quebec_three.seven_golf) ELSE NULL::double precision END, quebec_three.quebec_papa, quebec_three.seven_oscar, quebec_three.delta_oscar, quebec_three.golf_oscar, quebec_three.foxtrot_two, (quebec_three.foxtrot_two - quebec_three.quebec_papa), CASE WHEN (quebec_three.seven_oscar > 'november'::double precision) THEN ((quebec_three.golf_oscar - quebec_three.seven_oscar) / quebec_three.seven_oscar) ELSE NULL::double precision END, (quebec_three.delta_oscar - quebec_three.quebec_papa), (quebec_three.delta_oscar - quebec_three.foxtrot_two), CASE WHEN (quebec_three.whiskey_india > 'november'::double precision) THEN ((quebec_three.papa_sierra - quebec_three.whiskey_india) / quebec_three.whiskey_india) ELSE NULL::double precision END, (quebec_three.papa_sierra - quebec_three.seven_oscar), quebec_three.whiskey_india, quebec_three.foxtrot_india
  • Merge Cond: (((golf_two(xray_november((quebec_three.two)::text))) = five.two) AND ((golf_two(xray_november((quebec_three.xray_lima)::text))) = five.romeo_echo))
  • Buffers: shared hit=8693 read=68394204 written=70687, temp read=276759 written=276902
  • I/O Timings: read=45251958.490 write=17629.133
  • Worker 0: actual time=9419882.555..9441691.276 rows=430165 loops=1
  • Buffers: shared hit=2092 read=13425738 written=14174, temp read=54320 written=54348
  • I/O Timings: read=9055873.588 write=2412.987
  • Worker 1: actual time=9419882.184..9442369.838 rows=445338 loops=1
  • Buffers: shared hit=1802 read=13892391 written=14305, temp read=56268 written=56297
  • I/O Timings: read=9047720.107 write=4246.666
  • Worker 2: actual time=9419884.692..9442093.254 rows=439264 loops=1
  • Buffers: shared hit=1271 read=13708818 written=14237, temp read=55440 written=55469
  • I/O Timings: read=9049540.728 write=4266.460
  • Worker 3: actual time=9419950.867..9441704.002 rows=434730 loops=1
  • Buffers: shared hit=1880 read=13556789 written=14227, temp read=54847 written=54875
  • I/O Timings: read=9053318.901 write=2508.949
5. 39,584.936 9,440,141.887 ↓ 1.5 1,754,682 5

Sort (cost=73,385,797.790..73,388,789.450 rows=1,196,666 width=234) (actual time=9,419,764.175..9,440,141.887 rows=1,754,682 loops=5)

  • Output: quebec_three.two, quebec_three.xray_lima, quebec_three.romeo_six, quebec_three.victor_mike, quebec_three.sierra_sierra, quebec_three.zulu_yankee, quebec_three.seven_golf, quebec_three.papa_sierra, quebec_three.victor_hotel, quebec_three.delta_mike, quebec_three.echo, quebec_three.sierra_xray, quebec_three.alpha, quebec_three.lima_quebec, quebec_three.delta_uniform, quebec_three.xray_romeo, quebec_three.whiskey_four, quebec_three.kilo, quebec_three.zulu_echo, quebec_three.lima_five, quebec_three.papa_india, quebec_three.victor_six, quebec_three.quebec_papa, quebec_three.seven_oscar, quebec_three.delta_oscar, quebec_three.golf_oscar, quebec_three.foxtrot_two, quebec_three.whiskey_india, quebec_three.foxtrot_india, (golf_two(xray_november((quebec_three.two)::text))), (golf_two(xray_november((quebec_three.xray_lima)::text)))
  • Sort Key: (golf_two(xray_november((quebec_three.two)::text))), (golf_two(xray_november((quebec_three.xray_lima)::text)))
  • Sort Method: external merge Disk: 447072kB
  • Buffers: shared hit=5825 read=68393487 written=70687, temp read=276759 written=276902
  • I/O Timings: read=45251723.416 write=17629.133
  • Worker 0: actual time=9419749.062..9439946.504 rows=1721972 loops=1
  • Buffers: shared hit=1405 read=13425708 written=14174, temp read=54320 written=54348
  • I/O Timings: read=9055861.206 write=2412.987
  • Worker 1: actual time=9419763.631..9440583.049 rows=1783721 loops=1
  • Buffers: shared hit=1132 read=13892344 written=14305, temp read=56268 written=56297
  • I/O Timings: read=9047710.281 write=4246.666
  • Worker 2: actual time=9419545.644..9440109.677 rows=1757473 loops=1
  • Buffers: shared hit=1028 read=13708344 written=14237, temp read=55440 written=55469
  • I/O Timings: read=9049366.015 write=4266.460
  • Worker 3: actual time=9419876.909..9439983.484 rows=1738738 loops=1
  • Buffers: shared hit=1163 read=13556789 written=14227, temp read=54847 written=54875
  • I/O Timings: read=9053318.901 write=2508.949
6. 4,777.665 9,400,556.951 ↓ 1.5 1,755,052 5

Result (cost=0.000..73,185,932.580 rows=1,196,666 width=234) (actual time=4.904..9,400,556.951 rows=1,755,052 loops=5)

  • Output: quebec_three.two, quebec_three.xray_lima, quebec_three.romeo_six, quebec_three.victor_mike, quebec_three.sierra_sierra, quebec_three.zulu_yankee, quebec_three.seven_golf, quebec_three.papa_sierra, quebec_three.victor_hotel, quebec_three.delta_mike, quebec_three.echo, quebec_three.sierra_xray, quebec_three.alpha, quebec_three.lima_quebec, quebec_three.delta_uniform, quebec_three.xray_romeo, quebec_three.whiskey_four, quebec_three.kilo, quebec_three.zulu_echo, quebec_three.lima_five, quebec_three.papa_india, quebec_three.victor_six, quebec_three.quebec_papa, quebec_three.seven_oscar, quebec_three.delta_oscar, quebec_three.golf_oscar, quebec_three.foxtrot_two, quebec_three.whiskey_india, quebec_three.foxtrot_india, golf_two(xray_november((quebec_three.two)::text)), golf_two(xray_november((quebec_three.xray_lima)::text))
  • Buffers: shared hit=5805 read=68393487 written=70687
  • I/O Timings: read=45251723.416 write=17629.133
  • Worker 0: actual time=1.280..9400623.943 rows=1722328 loops=1
  • Buffers: shared hit=1400 read=13425708 written=14174
  • I/O Timings: read=9055861.206 write=2412.987
  • Worker 1: actual time=1.321..9400328.672 rows=1784107 loops=1
  • Buffers: shared hit=1127 read=13892344 written=14305
  • I/O Timings: read=9047710.281 write=4246.666
  • Worker 2: actual time=6.966..9400504.894 rows=1757849 loops=1
  • Buffers: shared hit=1023 read=13708344 written=14237
  • I/O Timings: read=9049366.015 write=4266.460
  • Worker 3: actual time=1.033..9400748.837 rows=1739058 loops=1
  • Buffers: shared hit=1158 read=13556789 written=14227
  • I/O Timings: read=9053318.901 write=2508.949
7. 9,395,779.286 9,395,779.286 ↓ 1.5 1,755,052 5

Append (cost=0.000..73,185,932.580 rows=1,196,666 width=234) (actual time=4.887..9,395,779.286 rows=1,755,052 loops=5)

  • Buffers: shared hit=5805 read=68393487 written=70687
  • I/O Timings: read=45251723.416 write=17629.133
  • Worker 0: actual time=1.266..9395849.642 rows=1722328 loops=1
  • Buffers: shared hit=1400 read=13425708 written=14174
  • I/O Timings: read=9055861.206 write=2412.987
  • Worker 1: actual time=1.307..9395550.646 rows=1784107 loops=1
  • Buffers: shared hit=1127 read=13892344 written=14305