{"id":33872,"date":"2019-10-31T21:55:09","date_gmt":"2019-10-31T18:55:09","guid":{"rendered":"https:\/\/prohoster.info\/blog\/postgresql-11-evolyutsiya-sektsionirovaniya-ot-postgres-9-6-do-postgres-11\/"},"modified":"2019-10-31T21:55:09","modified_gmt":"2019-10-31T18:55:09","slug":"postgresql-11-evolyutsiya-sektsionirovaniya-ot-postgres-9-6-do-postgres-11","status":"publish","type":"post","link":"https:\/\/prohoster.info\/nl\/blog\/administrirovanie\/postgresql-11-evolyutsiya-sektsionirovaniya-ot-postgres-9-6-do-postgres-11","title":{"rendered":"PostgreSQL 11: De evolutie van partitionering van Postgres 9.6 naar Postgres 11","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Fijn vrijdag iedereen! Er blijft steeds minder tijd over tot de lancering van de cursus <noindex><a rel=\"nofollow\" href=\"https:\/\/otus.pw\/CIBR\/\">\u00abRelationele DBMS\u00bb<\/a><\/noindex>, daarom delen we vandaag de vertaling van nog een nuttig materiaal over dit onderwerp.<\/p>\n<p>Tijdens de ontwikkeling <noindex><a rel=\"nofollow\" href=\"https:\/\/www.2ndquadrant.com\/postgresql\/2ndquadrants-passion-postgresql\/contributions-postgresql-11\/\">PostgreSQL 11<\/a><\/noindex> is er indrukwekkend werk verricht om de table partitioning te verbeteren. <b>Tabelpartitionering<\/b> is een functie die al geruime tijd in PostgreSQL bestaat, maar die, als je het zo wilt zeggen, in wezen pas echt aanwezig was sinds versie 10, waar het een zeer nuttige functie werd. Eerder hebben we gesteld dat table inheritance onze implementatie van partitionering is, en dat is waar. Alleen dat deze methode je dwong om het grootste deel van het werk handmatig te doen. Bijvoorbeeld, als je wilde dat tuples in secties werden ingevoerd tijdens INSERTs, moest je triggers instellen om dat voor je te doen. Partitionering via inheritance was erg traag en complex om aanvullende functies bovenop te ontwikkelen.<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>In PostgreSQL 10 zagen we de geboorte van \u00abdeclarative partitioning\u00bb \u2014 een functie die is ontworpen om veel problemen op te lossen die onoplosbaar waren met de oude methode via inheritance. Dit leidde tot de komst van een veel krachtiger hulpmiddel waarmee we gegevens horizontaal kunnen splitsen!<\/p>\n<p><b>Vergelijking van functies<\/b><\/p>\n<p>In PostgreSQL 11 is er een indrukwekkende set nieuwe functies toegevoegd die helpen de prestaties te verbeteren en partitioned tables transparanter te maken voor applicaties.<\/p>\n<p><img decoding=\"async\" alt=\"PostgreSQL 11: De evolutie van partitionering van Postgres 9.6 naar Postgres 11\" src=\"\/wp-content\/uploads\/2019\/05\/13ef675b91bb0701719c816882bd3e8b.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<img decoding=\"async\" alt=\"PostgreSQL 11: De evolutie van partitionering van Postgres 9.6 naar Postgres 11\" src=\"\/wp-content\/uploads\/2019\/05\/d87349281f0dc0820a064d81f80407d1.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<img decoding=\"async\" alt=\"PostgreSQL 11: De evolutie van partitionering van Postgres 9.6 naar Postgres 11\" src=\"\/wp-content\/uploads\/2019\/05\/3bb3beeedf803f1fdbe58a858076478c.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>1. Het gebruik van constraint exclusions<br \/>\n2. Voegt alleen knooppunten toe<br \/>\n3. Alleen voor partitioned tables die verwijzen naar niet-gepartitioneerde<br \/>\n4. Indexen moeten alle sleutelkolommen van de sectie bevatten<br \/>\n5. Beperkingen van de sectie aan beide zijden moeten overeenkomen<\/i><\/p>\n<p><b>Prestaties<\/b><\/p>\n<p>Hier hebben we ook goed nieuws! Er is een nieuwe methode toegevoegd voor <noindex><a rel=\"nofollow\" href=\"https:\/\/www.2ndquadrant.com\/blog\/http2ndquadrant-com\/partition-elimination-postgresql-11\/%22\">het verwijderen van secties<\/a><\/noindex>. Dit nieuwe algoritme kan geschikte secties identificeren door de query-voorwaarde te bekijken <code>WAAR<\/code>. Het vorige algoritme controleerde elke sectie om te bepalen of deze aan de voorwaarde kon voldoen <code>WAAR<\/code>. Dit leidde tot een extra toename van de planningsduur naarmate het aantal secties groeide.<\/p>\n<p>In 9.6, with partitioning using inheritance, routing tuples in a section was typically done by writing a trigger function that contained a series of IF statements to insert the tuple into the correct section. These functions could be very slow in execution. With declarative partitioning introduced in version 10, this now works much faster.<\/p>\n<p>Using a partitioned table with 100 sections, we can evaluate the performance of loading 10 million rows into a table with 1 BIGINT column and 5 INT columns.<\/p>\n<p><img decoding=\"async\" alt=\"PostgreSQL 11: De evolutie van partitionering van Postgres 9.6 naar Postgres 11\" src=\"\/wp-content\/uploads\/2019\/05\/02c33ba997f187890046215997a689fc.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nThe performance of a query to this table for searching one indexed record and executing DML to manipulate one record (using only 1 processor):<\/p>\n<p><img decoding=\"async\" alt=\"PostgreSQL 11: De evolutie van partitionering van Postgres 9.6 naar Postgres 11\" src=\"\/wp-content\/uploads\/2019\/05\/8e69519dd97c6f2e60112908418e5c97.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nHere we see that the performance of each operation significantly increased after PG 9.6. Queries <code>SELECT<\/code> look much better, especially those capable of excluding multiple sections during query planning. This means that the planner can skip much of the work it had to do before. For example, paths for unnecessary sections are no longer built.<\/p>\n<p><b>Conclusie<\/b><\/p>\n<p>Table partitioning is becoming a very powerful feature in PostgreSQL. <b>It allows for quick output of data online and transferring it offline without waiting for slow massive DML operations to complete.<\/b>It also means that related data can be stored together, allowing access to the required data to be much more efficient. The improvements made in this version would not have been possible without the developers, reviewers, and committers who tirelessly worked on all of these features.<br \/>\nThanks to them all! <b>PostgreSQL 11 looks simply fantastic!<\/b><\/p>\n<p>Here\u2019s a short but quite interesting article. Share your comments, and don\u2019t forget to register for the <noindex><a rel=\"nofollow\" href=\"https:\/\/otus.pw\/37jj\/\">open day<\/a><\/noindex>, during which the course program will be detailed.<br \/>\n<br \/>Bron: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/452280\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u0432\u0441\u0435\u043c \u043f\u044f\u0442\u043d\u0438\u0446\u044b! \u0412\u0441\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u0443\u0440\u0441\u0430 \u00ab\u0420\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0421\u0423\u0411\u0414\u00bb, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043f\u043e \u0442\u0435\u043c\u0435. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 PostgreSQL 11 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u0430 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446. \u0421\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0432 PostgreSQL \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u043e \u0435\u0435, \u0435\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c\u0441\u044f, \u043f\u043e \u0441\u0443\u0442\u0438 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":25538,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-33872","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u0432\u0441\u0435\u043c \u043f\u044f\u0442\u043d\u0438\u0446\u044b!\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/nl\/blog\/administrirovanie\/postgresql-11-evolyutsiya-sektsionirovaniya-ot-postgres-9-6-do-postgres-11\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"nl_NL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47PostgreSQL 11: \u042d\u0432\u043e\u043b\u044e\u0446\u0438\u044f \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442 Postgres 9.6 \u0434\u043e Postgres 11 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u0432\u0441\u0435\u043c \u043f\u044f\u0442\u043d\u0438\u0446\u044b!\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/nl\/blog\/administrirovanie\/postgresql-11-evolyutsiya-sektsionirovaniya-ot-postgres-9-6-do-postgres-11\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:55:09+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:55:09+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47PostgreSQL 11: The Evolution of Partitioning from Postgres 9.6 to Postgres 11 | ProHoster","description":"Have a great Friday!","canonical_url":"https:\/\/prohoster.info\/nl\/blog\/administrirovanie\/postgresql-11-evolyutsiya-sektsionirovaniya-ot-postgres-9-6-do-postgres-11","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"nl_NL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47PostgreSQL 11: \u042d\u0432\u043e\u043b\u044e\u0446\u0438\u044f \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442 Postgres 9.6 \u0434\u043e Postgres 11 | ProHoster","og:description":"\u041e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u0432\u0441\u0435\u043c \u043f\u044f\u0442\u043d\u0438\u0446\u044b!","og:url":"https:\/\/prohoster.info\/nl\/blog\/administrirovanie\/postgresql-11-evolyutsiya-sektsionirovaniya-ot-postgres-9-6-do-postgres-11","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:55:09+00:00","article:modified_time":"2019-10-31T18:55:09+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"33872","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 17:02:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 02:32:26","updated":"2026-01-21 17:02:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/nl\/wp-json\/wp\/v2\/posts\/33872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/nl\/wp-json\/wp\/v2\/comments?post=33872"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/nl\/wp-json\/wp\/v2\/posts\/33872\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/nl\/wp-json\/wp\/v2\/media\/25538"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/nl\/wp-json\/wp\/v2\/media?parent=33872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/nl\/wp-json\/wp\/v2\/categories?post=33872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/nl\/wp-json\/wp\/v2\/tags?post=33872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}