explain.depesz.com

PostgreSQL's explain analyze made readable

Result: j8Di

Settings
# exclusive inclusive rows x rows loops node
1. 1.449 47,210.623 ↓ 984.0 984 1

Sort (cost=70,098.74..70,098.75 rows=1 width=270) (actual time=47,210.554..47,210.623 rows=984 loops=1)

  • Sort Key: sq.die_id, dc.component_index
  • Sort Method: quicksort Memory: 286kB
2. 36.834 47,209.174 ↓ 984.0 984 1

Merge Join (cost=56,146.27..70,098.73 rows=1 width=270) (actual time=45,093.951..47,209.174 rows=984 loops=1)

  • Merge Cond: (des.hamiltonian_spec_id = qs.hamiltonian_spec_id)
  • Join Filter: (li.logical_index_id = qs.logical_index_id)
  • Rows Removed by Join Filter: 164820
3. 1,125.702 47,126.424 ↓ 2,350.7 21,156 1

Nested Loop (cost=56,145.99..118,542.26 rows=9 width=136) (actual time=45,093.884..47,126.424 rows=21,156 loops=1)

  • Join Filter: (des.hamiltonian_spec_id = hs.hamiltonian_spec_id)
  • Rows Removed by Join Filter: 6172850
4. 0.404 0.404 ↓ 1.2 91 1

Index Only Scan using hamiltonian_spec_pkey on hamiltonian_spec hs (cost=0.14..13.25 rows=74 width=4) (actual time=0.023..0.404 rows=91 loops=1)

  • Heap Fetches: 91
5. 1,013.364 46,000.318 ↓ 7,562.9 68,066 91

Materialize (cost=56,145.85..118,519.04 rows=9 width=132) (actual time=40.004..505.498 rows=68,066 loops=91)

6. 17.145 44,986.954 ↓ 7,562.9 68,066 1

Merge Join (cost=56,145.85..118,519.00 rows=9 width=132) (actual time=3,640.015..44,986.954 rows=68,066 loops=1)

  • Merge Cond: (d.wafer_id = w.wafer_id)
7. 191.815 44,969.498 ↓ 7,562.9 68,066 1

Nested Loop (cost=56,115.13..126,282.34 rows=9 width=131) (actual time=3,639.706..44,969.498 rows=68,066 loops=1)

  • Join Filter: (dc.component_index = li.component_index)
  • Rows Removed by Join Filter: 1342432
8. 1.015 44,610.740 ↓ 3,407.0 3,407 1

Nested Loop (cost=56,115.13..126,270.02 rows=1 width=127) (actual time=3,639.687..44,610.740 rows=3,407 loops=1)

9. 1.987 44,602.911 ↓ 3,407.0 3,407 1

Nested Loop (cost=56,114.85..126,269.71 rows=1 width=127) (actual time=3,639.675..44,602.911 rows=3,407 loops=1)

10. 28,611.187 44,594.110 ↓ 3,407.0 3,407 1

Nested Loop (cost=56,114.57..126,269.40 rows=1 width=125) (actual time=3,639.638..44,594.110 rows=3,407 loops=1)

  • Join Filter: (pc.die_id = d.die_id)
  • Rows Removed by Join Filter: 201094768
11. 46.173 46.173 ↓ 1.0 59,025 1

Index Scan using die_wafer_id_maskset_seat_id_key on die d (cost=0.29..2,850.27 rows=58,499 width=12) (actual time=0.017..46.173 rows=59,025 loops=1)

12. 14,319.401 15,936.750 ↓ 3,407.0 3,407 59,025

Materialize (cost=56,114.28..122,541.65 rows=1 width=121) (actual time=0.012..0.270 rows=3,407 loops=59,025)

13. 1.621 1,617.349 ↓ 3,407.0 3,407 1

Nested Loop (cost=56,114.28..122,541.64 rows=1 width=121) (actual time=718.466..1,617.349 rows=3,407 loops=1)

14. 2.727 1,605.507 ↓ 3,407.0 3,407 1

Nested Loop (cost=56,113.85..122,541.18 rows=1 width=107) (actual time=718.141..1,605.507 rows=3,407 loops=1)

15. 1.254 1,595.966 ↓ 3,407.0 3,407 1

Nested Loop (cost=56,113.72..122,541.02 rows=1 width=79) (actual time=718.126..1,595.966 rows=3,407 loops=1)

16. 2.442 1,587.898 ↓ 3,407.0 3,407 1

Nested Loop (cost=56,113.44..122,540.72 rows=1 width=71) (actual time=718.115..1,587.898 rows=3,407 loops=1)

17. 570.183 1,582.049 ↓ 3,407.0 3,407 1

Hash Join (cost=56,113.30..122,540.56 rows=1 width=43) (actual time=718.093..1,582.049 rows=3,407 loops=1)

  • Hash Cond: ((cm.measurement_session_id = sq.measurement_session_id) AND (cm.physical_component_id = pc.physical_component_id))
18. 300.671 300.671 ↑ 1.0 2,573,345 1

Seq Scan on component_measurements cm (cost=0.00..47,126.43 rows=2,573,443 width=15) (actual time=0.008..300.671 rows=2,573,345 loops=1)

19. 1.323 711.195 ↓ 15.3 3,407 1

Hash (cost=56,109.96..56,109.96 rows=223 width=36) (actual time=711.195..711.195 rows=3,407 loops=1)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 268kB
20. 2.201 709.872 ↓ 15.3 3,407 1

Nested Loop (cost=55,583.72..56,109.96 rows=223 width=36) (actual time=702.754..709.872 rows=3,407 loops=1)

21. 0.121 704.631 ↓ 42.2 380 1

Subquery Scan on sq (cost=55,583.30..55,629.40 rows=9 width=8) (actual time=702.727..704.631 rows=380 loops=1)

  • Filter: (sq.rk = 1)
  • Rows Removed by Filter: 329
22. 1.576 704.510 ↑ 2.6 709 1

Unique (cost=55,583.30..55,606.35 rows=1,844 width=24) (actual time=702.309..704.510 rows=709 loops=1)

23. 5.207 702.934 ↓ 3.5 6,367 1

Sort (cost=55,583.30..55,587.91 rows=1,844 width=24) (actual time=702.308..702.934 rows=6,367 loops=1)

  • Sort Key: ms.measurement_session_id, ms.measurement_session_start_time, d_1.die_id, (rank() OVER (?))
  • Sort Method: quicksort Memory: 690kB
24. 4.774 697.727 ↓ 3.5 6,367 1

WindowAgg (cost=55,446.39..55,483.27 rows=1,844 width=24) (actual time=692.292..697.727 rows=6,367 loops=1)

25. 3.238 692.953 ↓ 3.5 6,367 1

Sort (cost=55,446.39..55,451.00 rows=1,844 width=16) (actual time=692.281..692.953 rows=6,367 loops=1)

  • Sort Key: d_1.die_id, ms.measurement_session_start_time DESC
  • Sort Method: quicksort Memory: 491kB
26. 18.430 689.715 ↓ 3.5 6,367 1

Gather (cost=18,887.36..55,346.37 rows=1,844 width=16) (actual time=19.301..689.715 rows=6,367 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
27. 0.786 671.285 ↓ 2.8 2,122 3 / 3

Hash Join (cost=17,887.36..54,161.97 rows=768 width=16) (actual time=17.455..671.285 rows=2,122 loops=3)

  • Hash Cond: (ms.measurement_method_id = mm.measurement_method_id)
28. 0.903 670.257 ↓ 2.2 2,122 3 / 3

Hash Join (cost=17,880.94..54,152.42 rows=973 width=20) (actual time=17.154..670.257 rows=2,122 loops=3)

  • Hash Cond: (cm_1.measurement_session_id = ms.measurement_session_id)
29. 2.007 668.961 ↓ 2.2 2,122 3 / 3

Hash Join (cost=17,843.52..54,112.44 rows=973 width=8) (actual time=16.745..668.961 rows=2,122 loops=3)

  • Hash Cond: (cm_1.measurement_type_id = mt.measurement_type_id)
30. 1.035 665.597 ↓ 1.1 2,122 3 / 3

Hash Join (cost=17,842.49..54,100.88 rows=1,947 width=12) (actual time=15.375..665.597 rows=2,122 loops=3)

  • Hash Cond: (pc_1.physical_component_type_id = pct_1.physical_component_type_id)
31. 404.239 664.516 ↑ 3.2 2,410 3 / 3

Hash Join (cost=17,840.20..54,053.79 rows=7,791 width=16) (actual time=15.289..664.516 rows=2,410 loops=3)

  • Hash Cond: (cm_1.physical_component_id = pc_1.physical_component_id)
32. 249.342 249.342 ↑ 1.3 857,782 3 / 3

Parallel Seq Scan on component_measurements cm_1 (cost=0.00..32,114.68 rows=1,072,268 width=12) (actual time=0.007..249.342 rows=857,782 loops=3)

33. 1.342 10.935 ↑ 1.1 4,379 3 / 3

Hash (cost=17,778.29..17,778.29 rows=4,953 width=12) (actual time=10.935..10.935 rows=4,379 loops=3)

  • Buckets: 8192 Batches: 1 Memory Usage: 253kB
34. 1.073 9.593 ↑ 1.1 4,379 3 / 3

Nested Loop (cost=0.71..17,778.29 rows=4,953 width=12) (actual time=1.474..9.593 rows=4,379 loops=3)

35. 3.420 3.420 ↑ 1.0 425 3 / 3

Index Only Scan using die_pkey on die d_1 (cost=0.29..1,086.91 rows=425 width=4) (actual time=1.455..3.420 rows=425 loops=3)

  • Index Cond: (die_id = ANY ('{6540,6576,6494,6531,6506,11908,6423,6452,6529,6569,6548,6488,6564,6496,6567,6518,6580,6583,12417,6521,6533,6497,6550,6444,6571,6527,6492,6468,6481,6554,11326,6485,6419,6501,6559,6424,6570,6446,6561,6448,6535,6541,6513,6429,6508,6472,6470,10344,6422,6504,6417,6465,6545,6454,6577,6512,6538,6434,6542,6566,6447,6442,6466,6534,6482,11663,6516,6463,6539,6507,6449,6489,6473,6451,6526,6519,6467,6511,6418,6528,6536,6441,6479,6505,6464,6437,6461,6421,6493,6582,6574,6420,6553,6428,6445,6462,6555,6459,6491,6558,6476,6514,6568,6523,6530,12213,12293,6436,6433,12313,6544,6525,6575,11746,6425,6520,6427,6443,6551,6483,6453,10447,10570,6502,6460,10347,6457,6547,6471,6474,6426,6431,6562,6478,6469,6500,6440,6515,6549,6552,6517,6455,6556,6563,6546,6573,6581,6499,6487,6475,6560,6509,6435,6432,6565,6510,6458,6430,6439,6572,6490,6579,6438,6503,11854,6480,6522,6495,6486,6532,6537,6557,10988,6484,6524,6456,12030,6477,6450,6543,6498,6578,12115,6175,6211,6129,6166,6141,12463,6058,6087,6164,6204,6183,6123,6199,6131,6202,6153,6215,6218,11953,6156,6168,6132,6185,6079,6206,6162,6127,6103,6116,6189,10694,6120,6054,6136,6194,6059,6205,6081,6196,6083,6170,6176,6148,6064,6143,6107,6105,11037,6057,6139,6052,6100,6180,6089,6212,6147,6173,6069,6177,6201,6082,6077,6101,6169,6117,12136,6151,6098,6174,6142,6084,6124,6108,6086,6161,6154,6102,6146,6053,6163,6171,6076,6114,6140,6099,6072,6096,6056,6128,6217,6209,6055,6188,6063,6080,6097,6190,6094,6126,6193,6111,6149,6203,6158,6165,11553,11495,6071,6068,11447,6179,6160,6210,12607,6060,6155,6062,6078,6186,6118,6088,10976,11407,6137,6095,11032,6092,6182,6106,6109,6061,6066,6197,6113,6104,6135,6075,6150,6184,6187,6152,6090,6191,6198,6181,6208,6216,6134,6122,6110,6195,6144,6070,6067,6200,6145,6093,6065,6074,6207,6125,6214,6073,6138,12560,6115,6157,6130,6121,6167,6172,6192,10443,6119,6159,6091,12385,6112,6085,6178,6133,6213,11647,6806,6842,6760,6797,6772,10654,6689,6718,6795,6835,6814,6754,6830,6762,6833,6784,6846,6849,11329,6787,6799,6763,6816,6710,6837,6793,6758,6734,6747,6820,12415,6751,6685,6767,6825,6690,6836,6712,6827,6714,6801,6807,6779,6695,6774,6738,6736,11621,6688,6770,6683,6731,6811,6720,6843,6778,6804,6700,6808}'::integer[]))
  • Heap Fetches: 0
36. 5.100 5.100 ↑ 2.5 10 1,275 / 3

Index Scan using physical_component_die_id_designed_component_id_key on physical_component pc_1 (cost=0.42..39.02 rows=25 width=12) (actual time=0.003..0.012 rows=10 loops=1,275)

  • Index Cond: (die_id = d_1.die_id)
37. 0.003 0.046 ↓ 2.0 4 3 / 3

Hash (cost=2.26..2.26 rows=2 width=4) (actual time=0.046..0.046 rows=4 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
38. 0.015 0.043 ↓ 2.0 4 3 / 3

Hash Join (cost=1.12..2.26 rows=2 width=4) (actual time=0.039..0.043 rows=4 loops=3)

  • Hash Cond: (pct_1.designed_component_type_id = dct_1.designed_component_type_id)
39. 0.012 0.012 ↑ 1.0 10 3 / 3

Seq Scan on physical_component_type pct_1 (cost=0.00..1.10 rows=10 width=8) (actual time=0.011..0.012 rows=10 loops=3)

40. 0.006 0.016 ↑ 1.0 2 3 / 3

Hash (cost=1.10..1.10 rows=2 width=4) (actual time=0.016..0.016 rows=2 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
41. 0.010 0.010 ↑ 1.0 2 3 / 3

Seq Scan on designed_component_type dct_1 (cost=0.00..1.10 rows=2 width=4) (actual time=0.008..0.010 rows=2 loops=3)

  • Filter: ((designed_component_type)::text = ANY ('{junction_fixed,squid_loop}'::text[]))
  • Rows Removed by Filter: 6
42. 0.005 1.357 ↑ 1.0 1 3 / 3

Hash (cost=1.02..1.02 rows=1 width=4) (actual time=1.357..1.357 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
43. 1.352 1.352 ↑ 1.0 1 3 / 3

Seq Scan on measurement_type mt (cost=0.00..1.02 rows=1 width=4) (actual time=1.350..1.352 rows=1 loops=3)

  • Filter: ((measurement_type)::text = 'resistance'::text)
  • Rows Removed by Filter: 6
44. 0.197 0.393 ↓ 1.0 795 3 / 3

Hash (cost=27.74..27.74 rows=774 width=16) (actual time=0.393..0.393 rows=795 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 49kB
45. 0.196 0.196 ↓ 1.0 795 3 / 3

Seq Scan on measurement_session ms (cost=0.00..27.74 rows=774 width=16) (actual time=0.009..0.196 rows=795 loops=3)

46. 0.011 0.242 ↑ 1.0 15 3 / 3

Hash (cost=6.24..6.24 rows=15 width=4) (actual time=0.241..0.242 rows=15 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
47. 0.231 0.231 ↑ 1.0 15 3 / 3

Seq Scan on measurement_method mm (cost=0.00..6.24 rows=15 width=4) (actual time=0.149..0.231 rows=15 loops=3)

  • Filter: (measurement_context = 'room_temperature'::text)
  • Rows Removed by Filter: 4
48. 3.040 3.040 ↑ 2.8 9 380

Index Scan using physical_component_die_id_designed_component_id_key on physical_component pc (cost=0.42..53.15 rows=25 width=28) (actual time=0.003..0.008 rows=9 loops=380)

  • Index Cond: (die_id = sq.die_id)
49. 3.407 3.407 ↑ 1.0 1 3,407

Index Scan using physical_component_type_pkey on physical_component_type pct (cost=0.14..0.15 rows=1 width=36) (actual time=0.001..0.001 rows=1 loops=3,407)

  • Index Cond: (physical_component_type_id = pc.physical_component_type_id)
50. 6.814 6.814 ↑ 1.0 1 3,407

Index Scan using designed_component_pkey on designed_component dc (cost=0.29..0.30 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=3,407)

  • Index Cond: (designed_component_id = pc.designed_component_id)
51. 6.814 6.814 ↑ 1.0 1 3,407

Index Scan using designed_component_type_pkey on designed_component_type dct (cost=0.13..0.15 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=3,407)

  • Index Cond: (designed_component_type_id = dc.designed_component_type_id)
52. 10.221 10.221 ↑ 1.0 1 3,407

Index Scan using component_targets_physical_component_id_measurement_type_id_key on component_targets ct (cost=0.42..0.45 rows=1 width=26) (actual time=0.003..0.003 rows=1 loops=3,407)

  • Index Cond: (physical_component_id = cm.physical_component_id)
53. 6.814 6.814 ↑ 1.0 1 3,407

Index Scan using maskset_seat_pkey on maskset_seat mseat (cost=0.29..0.31 rows=1 width=10) (actual time=0.002..0.002 rows=1 loops=3,407)

  • Index Cond: (maskset_seat_id = d.maskset_seat_id)
54. 6.814 6.814 ↑ 1.0 1 3,407

Index Scan using design_pkey on design des (cost=0.28..0.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=3,407)

  • Index Cond: (design_id = dc.design_id)
55. 166.943 166.943 ↑ 1.0 414 3,407

Seq Scan on logical_index li (cost=0.00..7.14 rows=414 width=8) (actual time=0.004..0.049 rows=414 loops=3,407)

56. 0.186 0.311 ↑ 5.5 80 1

Sort (cost=30.72..31.82 rows=440 width=9) (actual time=0.300..0.311 rows=80 loops=1)

  • Sort Key: w.wafer_id
  • Sort Method: quicksort Memory: 47kB
57. 0.125 0.125 ↓ 1.1 483 1

Seq Scan on wafer w (cost=0.00..11.40 rows=440 width=9) (actual time=0.009..0.125 rows=483 loops=1)

58. 45.916 45.916 ↓ 114.3 164,877 1

Index Scan using qubit_spec_hamiltonian_spec_id_logical_index_id_key on qubit_spec qs (cost=0.28..82.96 rows=1,442 width=27) (actual time=0.023..45.916 rows=164,877 loops=1)

Planning time : 21.188 ms
Execution time : 47,214.327 ms