Skip to content

Instantly share code, notes, and snippets.

@nicolas-f
Created February 25, 2014 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicolas-f/9206451 to your computer and use it in GitHub Desktop.
Save nicolas-f/9206451 to your computer and use it in GitHub Desktop.
H2 1.3.175, && Java Heap Space
-- H2 1.3.175, && Java Heap Space
CREATE TABLE LANDTEST(
THE_GEOM GEOMETRY
);
-- 15 +/- SELECT COUNT(*) FROM PUBLIC.LANDTEST;
INSERT INTO PUBLIC.LANDTEST(THE_GEOM) VALUES
('MULTIPOLYGON (((184856.70313 2431947.75, 184863.20313 2431954.5, 184887.48438 2431963.75, 184908.67188 2431973, 184921.0625 2431979.25, 184974.15625 2432001.25, 184992.01563 2432009.75, 185018.21875 2432025.75, 185017.73438 2432028, 185013.21875 2432033.5, 184990.10938 2432074.5, 184996.3125 2432078.25, 185015.35938 2432090.5, 185039.17188 2432104.5, 185067.26563 2432119.75, 185078.46875 2432126, 185080.125 2432119.75, 185086.34375 2432113.25, 185105.84375 2432093.5, 185107.98438 2432090.75, 185118.70313 2432083, 185141.5625 2432066, 185152.51563 2432056.5, 185146.79688 2432051.75, 185127.75 2432037.5, 185103.70313 2432023.25, 185072.98438 2432002.25, 185077.26563 2431996, 185076.3125 2431988.5, 185079.65625 2431973.5, 185082.98438 2431961.75, 185077.03125 2431959.25, 185070.35938 2431957.5, 185068.70313 2431954, 185066.79688 2431940, 185068.70313 2431930.75, 185065.35938 2431922.75, 185058.21875 2431915.5, 185052.26563 2431907.25, 185052.26563 2431896.75, 185050.35938 2431887.5, 185044.89063 2431883.25, 185038.71875 2431879.5, 185035.125 2431873, 185038.6875 2431852.75, 185041.0625 2431833.5, 185001.14063 2431810.75, 184974.64063 2431796, 184973.84375 2431795, 184980.53125 2431778, 184986.09375 2431766, 184992.40625 2431750.5, 185002.625 2431737, 185017.23438 2431715.25, 185021 2431672.75, 185021.78125 2431661.5, 184996.1875 2431664.25, 184969.8125 2431666.5, 184968.25 2431670.5, 184951.89063 2431723.25, 184939.10938 2431757, 184923.65625 2431795, 184906.40625 2431832, 184856.70313 2431947.75)))'::Geometry),
('MULTIPOLYGON (((185098.67188 2432019.75, 185115.01563 2432009, 185174.3125 2431969.25, 185209.07813 2431947.75, 185226.6875 2431936.25, 185223.59375 2431923.5, 185219.3125 2431901.25, 185218.125 2431887, 185219.54688 2431873.25, 185220.67188 2431860.25, 185214 2431841, 185206.01563 2431840.25, 185177.51563 2431838.25, 185154.60938 2431834, 185133.625 2431837, 185118.48438 2431838, 185122.35938 2431821.25, 185124.29688 2431795.25, 185129.35938 2431785.5, 185111.875 2431777, 185078.07813 2431766, 185070.70313 2431766, 185064.875 2431768.25, 185058.26563 2431784.75, 185049.71875 2431799, 185044.28125 2431812.75, 185041.95313 2431825.5, 185038.6875 2431852.75, 185035.125 2431873, 185038.71875 2431879.5, 185044.89063 2431883.25, 185050.35938 2431887.5, 185052.26563 2431896.75, 185052.26563 2431907.25, 185058.21875 2431915.5, 185065.35938 2431922.75, 185068.70313 2431930.75, 185066.79688 2431940, 185068.70313 2431954, 185070.35938 2431957.5, 185077.03125 2431959.25, 185082.98438 2431961.75, 185079.65625 2431973.5, 185076.3125 2431988.5, 185077.26563 2431996, 185072.98438 2432002.25, 185098.67188 2432019.75)))'::Geometry),
('MULTIPOLYGON (((184661.64063 2431733.5, 184652.21875 2431759.5, 184646.03125 2431775, 184641.5 2431787.75, 184632.45313 2431812, 184620.78125 2431842, 184604.10938 2431886.25, 184602.92188 2431891, 184617.45313 2431898.25, 184662.6875 2431917.75, 184666.26563 2431915.25, 184675.79688 2431920, 184669.35938 2431943.75, 184684.125 2431946.75, 184704.84375 2431948.75, 184728.17188 2431948, 184758.89063 2431945.75, 184784.85938 2431944.25, 184844.85938 2431946.5, 184856.70313 2431947.75, 184906.40625 2431832, 184923.65625 2431795, 184939.10938 2431757, 184951.89063 2431723.25, 184968.25 2431670.5, 184969.8125 2431666.5, 184949.8125 2431668, 184890.95313 2431674.5, 184832.6875 2431680.5, 184761.32813 2431689.75, 184695.03125 2431698, 184673.17188 2431700.25, 184672.21875 2431705.25, 184670.79688 2431710, 184666.26563 2431720.75, 184661.64063 2431733.5)))'::Geometry),
('MULTIPOLYGON (((185231.35938 2431933.75, 185233.21875 2431940.5, 185234.26563 2431946.5, 185247.23438 2431940, 185248.71875 2431940.25, 185246.70313 2431934.25, 185239.23438 2431922.5, 185230.79688 2431912, 185226.82813 2431897.5, 185225.89063 2431886.75, 185224.10938 2431897.25, 185227.85938 2431921, 185231.35938 2431933.75)))'::Geometry),
('MULTIPOLYGON (((185248.71875 2431940.25, 185250.96875 2431928, 185244.5 2431919, 185236.40625 2431905, 185230.4375 2431889.25, 185228.84375 2431874.75, 185227.59375 2431877.25, 185227.04688 2431881.75, 185226.125 2431885.25, 185225.89063 2431886.75, 185226.82813 2431897.5, 185230.79688 2431912, 185239.23438 2431922.5, 185246.70313 2431934.25, 185248.71875 2431940.25)))'::Geometry);
INSERT INTO PUBLIC.LANDTEST(THE_GEOM) VALUES
('MULTIPOLYGON (((185250.96875 2431928, 185262.84375 2431917.75, 185286.57813 2431916.75, 185318.4375 2431916.75, 185353.46875 2431921.5, 185370.73438 2431922.75, 185365.89063 2431905.5, 185362.73438 2431893.25, 185370.20313 2431888.75, 185427.92188 2431862.25, 185432.78125 2431852.5, 185436.01563 2431841.25, 185444.10938 2431825.5, 185449.51563 2431814.25, 185452.75 2431808.25, 185454.90625 2431807.25, 185452.75 2431803, 185451.125 2431803, 185448.96875 2431783, 185448.4375 2431769, 185446.8125 2431766.75, 185444.10938 2431765.25, 185431.17188 2431771.5, 185396.64063 2431789, 185342.14063 2431815.75, 185306.53125 2431833, 185254.75 2431859, 185234.78125 2431869.25, 185228.84375 2431874.75, 185230.4375 2431889.25, 185236.40625 2431905, 185244.5 2431919, 185250.96875 2431928)))'::Geometry),
('MULTIPOLYGON (((185440.01563 2431760.25, 185453.21875 2431753, 185463.10938 2431742.5, 185456.78125 2431719.5, 185442.90625 2431672, 185441.875 2431671.25, 185433.85938 2431663.75, 185427.28125 2431640, 185418.53125 2431624, 185418.28125 2431622.5, 185420.10938 2431594.75, 185427.125 2431513.25, 185429.89063 2431510, 185421.39063 2431511.5, 185349.76563 2431520, 185300.15625 2431528, 185284.8125 2431530.25, 185230.01563 2431537.75, 185217.5625 2431545.5, 185209.26563 2431551.75, 185192.375 2431565.75, 185190.5 2431570, 185193.57813 2431593.25, 185193.42188 2431598.25, 185181.53125 2431599.25, 185169.4375 2431600.5, 185163.03125 2431601.5, 185162.51563 2431604.5, 185168.90625 2431632, 185169.09375 2431635.25, 185171.32813 2431648.75, 185178.01563 2431680, 185200.65625 2431775.75, 185211.5 2431813.25, 185221.39063 2431839.75, 185230.3125 2431859.75, 185231.90625 2431861.5, 185234.46875 2431861, 185236.70313 2431859.75, 185284.84375 2431837.25, 185311.3125 2431824, 185338.10938 2431811, 185385.9375 2431788.5, 185404.4375 2431778.25, 185428.34375 2431766.75, 185440.01563 2431760.25)))'::Geometry),
('MULTIPOLYGON (((185214 2431841, 185211.64063 2431833, 185202.57813 2431810, 185189.1875 2431783.75, 185176.15625 2431756.25, 185169.64063 2431737.5, 185159.875 2431718.25, 185151.92188 2431699.25, 185144.3125 2431695.5, 185137.4375 2431681.5, 185130.92188 2431662, 185120.0625 2431655, 185104.875 2431631.25, 185096.90625 2431619.5, 185085.6875 2431595.25, 185073.75 2431560.25, 185070.125 2431550.5, 185067.95313 2431538.5, 185041.34375 2431530.75, 185019.53125 2431526, 185017.79688 2431525.5, 185018.28125 2431528.25, 185018.9375 2431543.75, 185013.45313 2431564.25, 185022.8125 2431602.25, 185021.9375 2431659.25, 185021 2431672.75, 185017.23438 2431715.25, 185007.79688 2431729.25, 185027.57813 2431743.5, 185052.4375 2431756.75, 185064.875 2431768.25, 185070.70313 2431766, 185078.07813 2431766, 185111.875 2431777, 185129.35938 2431785.5, 185124.29688 2431795.25, 185122.35938 2431821.25, 185118.48438 2431838, 185133.625 2431837, 185154.60938 2431834, 185177.51563 2431838.25, 185206.01563 2431840.25, 185214 2431841)))'::Geometry),
('MULTIPOLYGON (((185064.875 2431768.25, 185052.4375 2431756.75, 185027.57813 2431743.5, 185007.79688 2431729.25, 185002.625 2431737, 184992.40625 2431750.5, 184986.09375 2431766, 184980.53125 2431778, 184973.84375 2431795, 184974.64063 2431796, 185001.14063 2431810.75, 185041.0625 2431833.5, 185041.95313 2431825.5, 185044.28125 2431812.75, 185049.71875 2431799, 185058.26563 2431784.75, 185064.875 2431768.25)))'::Geometry),
('MULTIPOLYGON (((185211.64063 2431833, 185197.4375 2431782, 185186.23438 2431735.25, 185181 2431716.5, 185176 2431695.75, 185169.57813 2431665, 185165.28125 2431647.75, 185162.875 2431634, 185152.5625 2431634.75, 185151.45313 2431640.5, 185142.73438 2431645.75, 185131.45313 2431643.5, 185125.29688 2431637, 185122.46875 2431628.75, 185119.14063 2431620.25, 185113.5 2431608.75, 185101.95313 2431596, 185099.39063 2431590.75, 185098.625 2431584.75, 185099.64063 2431582.5, 185106.57813 2431579.5, 185099.79688 2431574.5, 185096.70313 2431568.75, 185095.28125 2431562.5, 185087.89063 2431556.5, 185086.46875 2431553.25, 185083.375 2431549.25, 185083.84375 2431544, 185084.79688 2431542.5, 185080.51563 2431541.25, 185073.60938 2431540.25, 185067.95313 2431538.5, 185070.125 2431550.5, 185073.75 2431560.25, 185085.6875 2431595.25, 185096.90625 2431619.5, 185104.875 2431631.25, 185120.0625 2431655, 185130.92188 2431662, 185137.4375 2431681.5, 185144.3125 2431695.5, 185151.92188 2431699.25, 185159.875 2431718.25, 185169.64063 2431737.5, 185176.15625 2431756.25, 185189.1875 2431783.75, 185202.57813 2431810, 185211.64063 2431833)))'::Geometry);
INSERT INTO PUBLIC.LANDTEST(THE_GEOM) VALUES
('MULTIPOLYGON (((183965.90625 2431688.75, 183966.09375 2431676, 183966.98438 2431670.75, 183969.6875 2431663.75, 183975.98438 2431646, 183978.85938 2431641, 183982.64063 2431635.5, 183988.9375 2431630, 183993.42188 2431624, 183998.46875 2431615, 184005.125 2431604.5, 184006.01563 2431601.25, 184006.04688 2431599.75, 184006.57813 2431597.5, 184002.125 2431595.75, 184005.46875 2431581, 184006.14063 2431564.25, 184006.35938 2431553.75, 184010.125 2431530.5, 184014.32813 2431511.5, 184019.07813 2431503.25, 184009.70313 2431498.25, 183995.5 2431496.5, 183954.375 2431487.25, 183926.04688 2431479.25, 183843.20313 2431457.75, 183843.17188 2431454.75, 183838.28125 2431453.75, 183833.39063 2431465.75, 183826.03125 2431463, 183816.6875 2431458.75, 183820.46875 2431449.5, 183820.6875 2431448.25, 183811.5625 2431445.5, 183792.42188 2431438.5, 183778.84375 2431434.5, 183763.92188 2431454, 183752.34375 2431474.25, 183734.76563 2431501, 183724.96875 2431522.75, 183712.5 2431549, 183664.40625 2431648.25, 183654.84375 2431665.25, 183652.82813 2431671.5, 183661.51563 2431676, 183682 2431684.25, 183704.48438 2431695.25, 183713.17188 2431699.25, 183729.64063 2431705, 183753.6875 2431711, 183763.48438 2431714, 183781.73438 2431716.5, 183792.85938 2431720.75, 183813.79688 2431731.25, 183826.26563 2431736.75, 183838.0625 2431740.5, 183848.29688 2431742, 183857.42188 2431744.75, 183865.21875 2431746.25, 183871.89063 2431749, 183884.14063 2431755.25, 183905.29688 2431768.25, 183911.53125 2431770.75, 183918.875 2431770.25, 183926 2431767.75, 183930.45313 2431765, 183934.67188 2431760.5, 183939.79688 2431753.5, 183946.03125 2431740.75, 183952.04688 2431723.25, 183957.39063 2431713.25, 183961.60938 2431706.5, 183963.84375 2431700.25, 183965.84375 2431696.75, 183965.625 2431690.25, 183965.90625 2431688.75)))'::Geometry),
('MULTIPOLYGON (((185463.10938 2431742.5, 185498.5 2431712.5, 185557.8125 2431660.25, 185583.64063 2431636.25, 185609.15625 2431613.25, 185631.48438 2431591, 185656.03125 2431569, 185672.29688 2431553.75, 185656.34375 2431548.25, 185646.78125 2431544.75, 185650.29688 2431531.25, 185656.98438 2431515.5, 185655.39063 2431508.5, 185648.375 2431510, 185633.07813 2431512.25, 185595.76563 2431513.25, 185579.46875 2431513.5, 185535.85938 2431515, 185493.01563 2431510, 185467.90625 2431509.5, 185429.89063 2431510, 185427.125 2431513.25, 185420.10938 2431594.75, 185418.28125 2431622.5, 185418.53125 2431624, 185427.28125 2431640, 185433.85938 2431663.75, 185441.875 2431671.25, 185442.90625 2431672, 185456.78125 2431719.5, 185463.10938 2431742.5)))'::Geometry),
('MULTIPOLYGON (((184279.78125 2431652.75, 184284.21875 2431656.25, 184298.4375 2431657.5, 184307.01563 2431662.75, 184307.01563 2431672.25, 184302.28125 2431679.25, 184298.14063 2431690.75, 184310.57813 2431693.5, 184332.48438 2431696, 184373.04688 2431699.25, 184410.35938 2431702, 184441.4375 2431706, 184502.4375 2431713.25, 184557.21875 2431720.25, 184592.14063 2431723.75, 184654.32813 2431732, 184656.39063 2431732.5, 184661.14063 2431721, 184667.65625 2431703.5, 184675.35938 2431685.25, 184704.0625 2431592.75, 184699.03125 2431587, 184672.67188 2431586.75, 184665.57813 2431588.25, 184645.75 2431586, 184618.79688 2431585.5, 184567.60938 2431577.25, 184559.875 2431576.25, 184399.40625 2431560, 184346.70313 2431550.75, 184340.1875 2431551, 184332.1875 2431558.25, 184325.07813 2431574.5, 184311.17188 2431603.75, 184300.8125 2431622.75, 184291.32813 2431637, 184279.3125 2431650.25, 184279.78125 2431652.75)))'::Geometry),
('MULTIPOLYGON (((183965.90625 2431688.75, 183972.39063 2431690.25, 183973.10938 2431688.75, 183977.95313 2431689, 183986.59375 2431691, 183996.3125 2431695.5, 184001.34375 2431700.25, 184003.85938 2431699, 184013.21875 2431690, 184023.46875 2431679.5, 184057.64063 2431696.5, 184065.73438 2431703.5, 184069.32813 2431708.25, 184079.57813 2431723.5, 184083.35938 2431725.25, 184100.98438 2431726.75, 184111.59375 2431727.25, 184119.32813 2431727.25, 184139.125 2431726, 184149.45313 2431721.25, 184227.25 2431675.25, 184194.75 2431647.25, 184195.78125 2431645, 184201.70313 2431637, 184210.51563 2431624, 184200.45313 2431615.75, 184188.57813 2431607.75, 184167.53125 2431590.75, 184179.04688 2431573.5, 184190.92188 2431557, 184197.21875 2431551.5, 184211.42188 2431542, 184212.6875 2431539.25, 184224.1875 2431522.25, 184206.32813 2431519.5, 184199.375 2431517.75, 184174.54688 2431514, 184157.82813 2431512.5, 184131.01563 2431512.5, 184099.90625 2431511.25, 184028.14063 2431502.25, 184022.14063 2431502.25, 184018.79688 2431508.75, 184015.875 2431518.75, 184010.70313 2431542.75, 184009.51563 2431585.25, 184006.04688 2431599.75, 184006.01563 2431601.25, 184005.125 2431604.5, 183998.46875 2431615, 183993.42188 2431624, 183988.9375 2431630, 183982.64063 2431635.5, 183978.85938 2431641, 183975.98438 2431646, 183969.6875 2431663.75, 183966.98438 2431670.75, 183966.09375 2431676, 183965.90625 2431688.75)))'::Geometry);
INSERT INTO PUBLIC.LANDTEST(THE_GEOM) VALUES
('MULTIPOLYGON (((184969.8125 2431666.5, 184996.1875 2431664.25, 185021.78125 2431661.5, 185021.9375 2431659.25, 185022.8125 2431602.25, 185013.45313 2431564.25, 185018.9375 2431543.75, 185018.28125 2431528.25, 184999.60938 2431524.5, 184976.3125 2431522.5, 184962.32813 2431523, 184948.95313 2431526, 184901.4375 2431541, 184837.67188 2431557.25, 184825.79688 2431561.5, 184817.3125 2431564.25, 184790.53125 2431571, 184763.34375 2431578.25, 184744.67188 2431581.5, 184718.95313 2431584.5, 184716.78125 2431587.5, 184712.51563 2431599, 184708.9375 2431611, 184676.98438 2431691.5, 184673.17188 2431700.25, 184695.03125 2431698, 184761.32813 2431689.75, 184832.6875 2431680.5, 184890.95313 2431674.5, 184949.8125 2431668, 184969.8125 2431666.5)))'::Geometry);
create view landtest_view as select * from LANDTEST;
-- Following sql result raise Java Heap space (take more than 1gb memory
-- SELECT * FROM landtest_view where the_geom && 'POLYGON ((181996.04688 2423926, 181996.04688 2432126, 186131.375 2432126, 186131.375 2423926, 181996.04688 2423926))'::geometry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment