Advertisement
cmptrwz

Explain Analyse Results

Apr 22nd, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.43 KB | None | 0 0
  1. Hash Left Join (cost=14767150.19..23829994.20 rows=14759514 width=470) (actual time=1085202.318..1086759.797 rows=1 loops=1)
  2. Hash Cond: ((acp.location = acplo.location) AND (acp.circ_lib = acplo.org))
  3. -> Merge Left Join (cost=14767146.37..19623111.93 rows=14759514 width=474) (actual time=1085201.418..1086758.893 rows=1 loops=1)
  4. Merge Cond: (ahr.target = siss.id)
  5. Join Filter: (ahr.hold_type = 'I'::text)
  6. -> Nested Loop (cost=14767111.42..19583090.52 rows=14759514 width=442) (actual time=1085201.383..1086758.857 rows=1 loops=1)
  7. -> Nested Loop (cost=6381.77..114107.33 rows=6852 width=426) (actual time=117.123..1674.346 rows=1 loops=1)
  8. -> Nested Loop (cost=0.00..107354.39 rows=34 width=378) (actual time=116.657..1673.875 rows=1 loops=1)
  9. Join Filter: (acn.suffix = acns.id)
  10. -> Nested Loop (cost=0.00..107352.87 rows=34 width=350) (actual time=116.636..1673.847 rows=1 loops=1)
  11. -> Nested Loop (cost=0.00..107343.35 rows=34 width=322) (actual time=116.622..1673.827 rows=1 loops=1)
  12. -> Nested Loop (cost=0.00..107318.83 rows=34 width=310) (actual time=116.598..1673.797 rows=1 loops=1)
  13. Join Filter: (ahr.current_copy = acp.id)
  14. -> Nested Loop (cost=0.00..107301.88 rows=1 width=294) (actual time=116.563..1673.742 rows=1 loops=1)
  15. -> Index Scan using hold_request_target_idx on hold_request ahr (cost=0.00..107293.55 rows=1 width=205) (actual time=116.518..1673.690 rows=1 loops=1)
  16. Filter: ((capture_time IS NULL) AND (cancel_time IS NULL) AND (id = 951106) AND ((expire_time IS NULL) OR (expire_time > now())))
  17. -> Index Scan using usr_pkey on usr au (cost=0.00..8.32 rows=1 width=93) (actual time=0.026..0.030 rows=1 loops=1)
  18. Index Cond: (id = ahr.usr)
  19. -> Append (cost=0.00..16.92 rows=2 width=24) (actual time=0.026..0.043 rows=1 loops=1)
  20. -> Index Scan using copy_pkey on copy acp (cost=0.00..8.65 rows=1 width=24) (actual time=0.022..0.027 rows=1 loops=1)
  21. Index Cond: (id = ahr.current_copy)
  22. -> Index Scan using unit_pkey on unit acp (cost=0.00..8.27 rows=1 width=24) (actual time=0.007..0.007 rows=0 loops=1)
  23. Index Cond: (id = ahr.current_copy)
  24. -> Index Scan using call_number_pkey on call_number acn (cost=0.00..0.71 rows=1 width=28) (actual time=0.016..0.019 rows=1 loops=1)
  25. Index Cond: (id = acp.call_number)
  26. -> Index Scan using call_number_prefix_pkey on call_number_prefix acnp (cost=0.00..0.27 rows=1 width=36) (actual time=0.008..0.011 rows=1 loops=1)
  27. Index Cond: (id = acn.prefix)
  28. -> Materialize (cost=0.00..1.01 rows=1 width=36) (actual time=0.015..0.019 rows=1 loops=1)
  29. -> Seq Scan on call_number_suffix acns (cost=0.00..1.01 rows=1 width=36) (actual time=0.007..0.009 rows=1 loops=1)
  30. -> Materialize (cost=6381.77..6668.44 rows=200 width=52) (actual time=0.464..0.466 rows=1 loops=1)
  31. -> GroupAggregate (cost=6381.77..6665.44 rows=200 width=28) (actual time=0.461..0.462 rows=1 loops=1)
  32. -> HashAggregate (cost=6381.77..6644.21 rows=729 width=32) (actual time=0.432..0.434 rows=1 loops=1)
  33. -> Hash Left Join (cost=6.15..6225.29 rows=15648 width=32) (actual time=0.397..0.416 rows=1 loops=1)
  34. Hash Cond: (acp.circ_modifier = ccm.code)
  35. -> Nested Loop (cost=4.77..675.13 rows=15648 width=48) (actual time=0.068..0.086 rows=1 loops=1)
  36. Join Filter: (ahcm.target_copy = acp.id)
  37. -> Nested Loop (cost=4.77..201.80 rows=48 width=16) (actual time=0.054..0.060 rows=1 loops=1)
  38. -> Nested Loop (cost=0.00..16.70 rows=1 width=8) (actual time=0.021..0.025 rows=1 loops=1)
  39. -> Index Scan using hold_request_pkey on hold_request ahr (cost=0.00..8.37 rows=1 width=8) (actual time=0.012..0.013 rows=1 loops=1)
  40. Index Cond: (id = 951106)
  41. -> Index Scan using usr_pkey on usr au (cost=0.00..8.32 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=1)
  42. Index Cond: (id = ahr.usr)
  43. -> Bitmap Heap Scan on hold_copy_map ahcm (cost=4.77..184.62 rows=48 width=12) (actual time=0.019..0.020 rows=1 loops=1)
  44. Recheck Cond: (hold = 951106)
  45. -> Bitmap Index Scan on copy_once_per_hold (cost=0.00..4.76 rows=48 width=0) (actual time=0.011..0.011 rows=1 loops=1)
  46. Index Cond: (hold = 951106)
  47. -> Append (cost=0.00..9.84 rows=2 width=40) (actual time=0.008..0.019 rows=1 loops=1)
  48. -> Index Scan using copy_pkey on copy acp (cost=0.00..8.65 rows=1 width=40) (actual time=0.005..0.006 rows=1 loops=1)
  49. Index Cond: (id = ahcm.target_copy)
  50. -> Index Scan using unit_pkey on unit acp (cost=0.00..1.18 rows=1 width=40) (actual time=0.005..0.005 rows=0 loops=1)
  51. Index Cond: (id = ahcm.target_copy)
  52. -> Hash (cost=1.17..1.17 rows=17 width=48) (actual time=0.035..0.035 rows=17 loops=1)
  53. Buckets: 1024 Batches: 1 Memory Usage: 1kB
  54. -> Seq Scan on circ_modifier ccm (cost=0.00..1.17 rows=17 width=48) (actual time=0.007..0.017 rows=17 loops=1)
  55. SubPlan 1
  56. -> Aggregate (cost=0.34..0.35 rows=1 width=16) (actual time=0.247..0.248 rows=1 loops=1)
  57. -> Unique (cost=0.31..0.32 rows=2 width=16) (actual time=0.238..0.240 rows=1 loops=1)
  58. -> Sort (cost=0.31..0.31 rows=2 width=16) (actual time=0.235..0.235 rows=1 loops=1)
  59. Sort Key: ((org_unit_ancestor_setting.value)::interval)
  60. Sort Method: quicksort Memory: 25kB
  61. -> Append (cost=0.25..0.30 rows=2 width=16) (actual time=0.219..0.221 rows=1 loops=1)
  62. -> Function Scan on org_unit_ancestor_setting (cost=0.25..0.27 rows=1 width=32) (actual time=0.215..0.215 rows=0 loops=1)
  63. -> Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=1)
  64. -> Materialize (cost=14760729.65..19284498.47 rows=2154 width=24) (actual time=1085084.254..1085084.502 rows=1 loops=1)
  65. -> Subquery Scan on ahqa (cost=14760729.65..19284487.70 rows=2154 width=24) (actual time=1085084.251..1085084.497 rows=1 loops=1)
  66. Filter: ((ahqa.this_hold = 951106) AND (ahqa.other_hold = 951106))
  67. -> WindowAgg (cost=14760729.65..17991985.40 rows=86166820 width=17) (actual time=589512.277..1027019.547 rows=100973540 loops=1)
  68. -> WindowAgg (cost=14760729.65..16699483.10 rows=86166820 width=17) (actual time=589512.245..874292.580 rows=100973540 loops=1)
  69. -> Sort (cost=14760729.65..14976146.70 rows=86166820 width=17) (actual time=589512.215..731000.779 rows=100973540 loops=1)
  70. Sort Key: h1.id, (COALESCE(h2.cut_in_line, false)), h2.request_time
  71. Sort Method: external merge Disk: 2664456kB
  72. -> Merge Join (cost=339328.55..1636577.74 rows=86166820 width=17) (actual time=13164.169..202003.605 rows=100973540 loops=1)
  73. Merge Cond: (r1.bib_record = r2.bib_record)
  74. -> Sort (cost=169664.27..172037.72 rows=949378 width=12) (actual time=5550.486..6367.934 rows=949243 loops=1)
  75. Sort Key: r1.bib_record
  76. Sort Method: quicksort Memory: 69079kB
  77. -> Hash Join (cost=26493.01..75407.07 rows=949378 width=12) (actual time=1262.162..4413.804 rows=949378 loops=1)
  78. Hash Cond: (h1.id = r1.id)
  79. -> Seq Scan on hold_request h1 (cost=0.00..28739.78 rows=949378 width=4) (actual time=0.009..666.981 rows=949378 loops=1)
  80. -> Hash (cost=14625.78..14625.78 rows=949378 width=12) (actual time=1261.362..1261.362 rows=949378 loops=1)
  81. Buckets: 131072 Batches: 1 Memory Usage: 44501kB
  82. -> Seq Scan on materialized_hold_record_map r1 (cost=0.00..14625.78 rows=949378 width=12) (actual time=0.009..573.779 rows=949378 loops=1)
  83. -> Sort (cost=169664.27..172037.72 rows=949378 width=21) (actual time=7613.662..72280.465 rows=100973541 loops=1)
  84. Sort Key: r2.bib_record
  85. Sort Method: external sort Disk: 35272kB
  86. -> Hash Join (cost=26493.01..75407.07 rows=949378 width=21) (actual time=1300.778..4731.798 rows=949378 loops=1)
  87. Hash Cond: (h2.id = r2.id)
  88. -> Seq Scan on hold_request h2 (cost=0.00..28739.78 rows=949378 width=13) (actual time=0.020..668.038 rows=949378 loops=1)
  89. -> Hash (cost=14625.78..14625.78 rows=949378 width=12) (actual time=1300.230..1300.230 rows=949378 loops=1)
  90. Buckets: 131072 Batches: 1 Memory Usage: 40793kB
  91. -> Seq Scan on materialized_hold_record_map r2 (cost=0.00..14625.78 rows=949378 width=12) (actual time=0.012..604.926 rows=949378 loops=1)
  92. -> Sort (cost=34.94..36.09 rows=460 width=36) (actual time=0.029..0.029 rows=0 loops=1)
  93. Sort Key: siss.id
  94. Sort Method: quicksort Memory: 25kB
  95. -> Seq Scan on issuance siss (cost=0.00..14.60 rows=460 width=36) (actual time=0.003..0.003 rows=0 loops=1)
  96. -> Hash (cost=2.13..2.13 rows=113 width=12) (actual time=0.170..0.170 rows=113 loops=1)
  97. Buckets: 1024 Batches: 1 Memory Usage: 5kB
  98. -> Seq Scan on copy_location_order acplo (cost=0.00..2.13 rows=113 width=12) (actual time=0.018..0.085 rows=113 loops=1)
  99. Total runtime: 1087703.884 ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement