{"id":31905,"date":"2019-10-31T21:43:52","date_gmt":"2019-10-31T18:43:52","guid":{"rendered":"https:\/\/prohoster.info\/blog\/happy-party-ili-para-strok-vospominanij-o-znakomstve-s-sektsionirovaniem-v-postgresql10\/"},"modified":"2019-10-31T21:43:52","modified_gmt":"2019-10-31T18:43:52","slug":"happy-party-ili-para-strok-vospominanij-o-znakomstve-s-sektsionirovaniem-v-postgresql10","status":"publish","type":"post","link":"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/happy-party-ili-para-strok-vospominanij-o-znakomstve-s-sektsionirovaniem-v-postgresql10","title":{"rendered":"Happy Party vagy n\u00e9h\u00e1ny sor-eml\u00e9k a PostgreSQL10 szekci\u00f3z\u00e1s\u00e1nak megismer\u00e9s\u00e9r\u0151l","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<h4>El\u0151sz\u00f3 vagy hogyan sz\u00fcletett a szekcion\u00e1l\u00e1s \u00f6tlete<\/h4>\n<p>\nA t\u00f6rt\u00e9net itt kezd\u0151dik: <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/icl_services\/blog\/446314\/\">Eml\u00e9kszel, hogyan kezd\u0151d\u00f6tt minden? Minden el\u0151sz\u00f6r \u00e9s \u00fajra t\u00f6rt\u00e9nt.<\/a><\/noindex> Miut\u00e1n szinte minden forr\u00e1s kimer\u00fclt a lek\u00e9rdez\u00e9s optimaliz\u00e1l\u00e1s\u00e1hoz, felmer\u00fclt a k\u00e9rd\u00e9s - mi legyen tov\u00e1bb? \u00cdgy j\u00f6tt a szekcion\u00e1l\u00e1s \u00f6tlete. <\/p>\n<p><img decoding=\"async\" alt=\"Happy Party vagy n\u00e9h\u00e1ny sor-eml\u00e9k a PostgreSQL10 szekci\u00f3z\u00e1s\u00e1nak megismer\u00e9s\u00e9r\u0151l\" src=\"\/wp-content\/uploads\/2019\/04\/ef30e00aac34e9522e1d3e1875aa93bf.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<b>L\u00edrai kit\u00e9r\u0151:<\/b><br \/>\n<i>Pont ez\u00e9rt, mert <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/icl_services\/blog\/446314\/#comment_19973236\">ahogy kider\u00fclt, voltak kihaszn\u00e1latlan optimaliz\u00e1l\u00e1si tartal\u00e9kok<\/a><\/noindex>. K\u00f6sz\u00f6n\u00f6m <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/asmm\/\" class=\"user_link\">asmm<\/a><\/noindex> \u00e9s a Habrnak!<\/i><\/p>\n<p>Teh\u00e1t, hogyan tehetj\u00fck boldogabb\u00e1 az \u00fcgyfelet, mik\u00f6zben fejlesztj\u00fck a saj\u00e1t k\u00e9szs\u00e9geinket? <\/p>\n<p><b>Ha mindent a legegyszer\u0171bbre leegyszer\u0171s\u00edt\u00fcnk,<\/b>, akkor a dr\u00e1mai jav\u00edt\u00e1s n\u00e9h\u00e1ny \u00fatja a adatb\u00e1zis teljes\u00edtm\u00e9ny\u00e9ben csup\u00e1n kett\u0151:<br \/>\n1) Extenz\u00edv megk\u00f6zel\u00edt\u00e9s - er\u0151forr\u00e1sok n\u00f6vel\u00e9se, be\u00e1ll\u00edt\u00e1sok m\u00f3dos\u00edt\u00e1sa;<br \/>\n2) Intenz\u00edv megk\u00f6zel\u00edt\u00e9s - lek\u00e9rdez\u00e9sek optimaliz\u00e1l\u00e1sa<\/p>\n<p>Mivel, ism\u00e9tlem, abban az id\u0151szakban m\u00e1r nem volt vil\u00e1gos, mit lehetne m\u00e9g megv\u00e1ltoztatni a lek\u00e9rdez\u00e9s gyors\u00edt\u00e1s\u00e1hoz, a megold\u00e1s az lett, hogy - <b>t\u00e1bl\u00e1zatok diz\u00e1jnj\u00e1nak megv\u00e1ltoztat\u00e1sa.<\/b><\/p>\n<p><b>Teh\u00e1t - felmer\u00fcl a f\u0151 k\u00e9rd\u00e9s - mit \u00e9s hogyan fogunk megv\u00e1ltoztatni? <\/b><br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>Kezd\u0151felt\u00e9telek<\/h2>\n<p>\nEl\u0151sz\u00f6r is, egy ilyen ERD-nk van (\u00e1br\u00e1zolva \u00f6nk\u00e9nyesen - leegyszer\u0171s\u00edtve):<br \/>\n<img decoding=\"async\" alt=\"Happy Party vagy n\u00e9h\u00e1ny sor-eml\u00e9k a PostgreSQL10 szekci\u00f3z\u00e1s\u00e1nak megismer\u00e9s\u00e9r\u0151l\" src=\"\/wp-content\/uploads\/2019\/04\/de270774e7dd99b060cc200ba5012075.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nF\u0151bb jellemz\u0151k:<\/p>\n<ol>\n<li> a 'sok a sokhoz' kapcsolatok<\/li>\n<li> a t\u00e1bl\u00e1zat m\u00e1r potenci\u00e1lis szekcion\u00e1l\u00e1si kulccsal rendelkezik <\/li>\n<\/ol>\n<p>Eredeti lek\u00e9rdez\u00e9s:<\/p>\n<pre><code class=\"plaintext\">SELECT\n            p.\"PARAMETER_ID\" as parameter_id,\n            pc.\"PC_NAME\" AS pc_name,\n            pc.\"CUSTOMER_PARTNUMBER\" AS customer_partnumber,\n            w.\"LASERMARK\" AS lasermark,\n            w.\"LOTID\" AS lotid,\n            w.\"REPORTED_VALUE\" AS reported_value,\n            w.\"LOWER_SPEC_LIMIT\" AS lower_spec_limit,\n            w.\"UPPER_SPEC_LIMIT\" AS upper_spec_limit,\n            p.\"TYPE_CALCUL\" AS type_calcul,\n            s.\"SHIPMENT_NAME\" AS shipment_name,\n            s.\"SHIPMENT_DATE\" AS shipment_date,\n            extract(year from s.\"SHIPMENT_DATE\") AS year,\n            extract(month from s.\"SHIPMENT_DATE\") as month,\n            s.\"REPORT_NAME\" AS report_name,\n            p.\"SPARAM_NAME\" AS SPARAM_name,\n            p.\"CUSTOMERPARAM_NAME\" AS customerparam_name\n        FROM data w INNER JOIN shipment s ON s.\"SHIPMENT_ID\" = w.\"SHIPMENT_ID\"\n             INNER JOIN parameters p ON p.\"PARAMETER_ID\" = w.\"PARAMETER_ID\"\n             INNER JOIN shipment_pc sp ON s.\"SHIPMENT_ID\" = sp.\"SHIPMENT_ID\"\n             INNER JOIN pc pc ON pc.\"PC_ID\" = sp.\"PC_ID\"\n             INNER JOIN ( SELECT w2.\"LASERMARK\" , MAX(s2.\"SHIPMENT_DATE\") AS \"SHIPMENT_DATE\"\n                          FROM shipment s2 INNER JOIN data w2 ON s2.\"SHIPMENT_ID\" = w2.\"SHIPMENT_ID\"\n                          GROUP BY w2.\"LASERMARK\"\n                         ) md ON md.\"SHIPMENT_DATE\" = s.\"SHIPMENT_DATE\" AND md.\"LASERMARK\" = w.\"LASERMARK\"\n        WHERE \n             s.\"SHIPMENT_DATE\" &gt;= '2018-07-01' AND s.\"SHIPMENT_DATE\" &lt;= &#039;2018-09-30&#039; ;\n<\/code><\/pre>\n<p>\n<b>A v\u00e9grehajt\u00e1s eredm\u00e9nye a tesztadatb\u00e1zison:<\/b><br \/>\n<b>K\u00f6lts\u00e9g <\/b>: 502 997.55<br \/>\n<b>V\u00e9grehajt\u00e1si id\u0151<\/b>: 505 m\u00e1sodperc.<\/p>\n<p>Mit l\u00e1tunk? Egy szok\u00e1sos lek\u00e9rdez\u00e9s, id\u0151beli szeletekre. <br \/>\nTeh\u00e1t v\u00e9gezz\u00fcnk el egy egyszer\u0171 logikai k\u00f6vetkeztet\u00e9st: ha van egy id\u0151szakos minta, akkor seg\u00edt nek\u00fcnk? Helyes \u2014 a szegment\u00e1l\u00e1s.<\/p>\n<h2>Mit szegment\u00e1ljunk?<\/h2>\n<p>\nEls\u0151 pillant\u00e1sra a v\u00e1laszt\u00e1s egy\u00e9rtelm\u0171 \u2014 a \"shipment\" t\u00e1bl\u00e1zat deklarat\u00edv szegment\u00e1l\u00e1sa a \"SHIPMENT_DATE\" kulcs szerint (<i>gyorsan el\u0151reugorva \u2014 a v\u00e9g\u00e9n a produkci\u00f3 kicsit m\u00e1s lett<\/i>). <\/p>\n<h2>Hogyan szegment\u00e1ljunk?<\/h2>\n<p>\nEz a k\u00e9rd\u00e9s sem t\u00fal neh\u00e9z. Szerencs\u00e9re a PostgreSQL 10-ben most m\u00e1r van egy emberbar\u00e1t szegment\u00e1l\u00e1si mechanizmus. <br \/>\nTeh\u00e1t: <\/p>\n<ol>\n<li> Mentj\u00fck az eredeti t\u00e1bl\u00e1zat dump-j\u00e1t \u2014 <i>pg_dump source_table<\/i><\/li>\n<li> T\u00f6r\u00f6lj\u00fck az eredeti t\u00e1bl\u00e1zatot \u2014 <i>drop table source_table<\/i><\/li>\n<li>Hozzuk l\u00e9tre a sz\u00fcl\u0151 t\u00e1bl\u00e1zatot a tartom\u00e1ny szerinti szegment\u00e1l\u00e1ssal \u2014 <i>create table source_table<\/i><\/li>\n<li> Hozzuk l\u00e9tre a szegmenseket \u2014 <i>create table source_table, create index<\/i><\/li>\n<li> Import\u00e1ljuk a dump-ot, amit az 1. l\u00e9p\u00e9sben k\u00e9sz\u00edtett\u00fcnk \u2014 <i>pg_restore<\/i><\/li>\n<\/ol>\n<p><\/p>\n<h2>Szegment\u00e1l\u00e1si szkriptek <\/h2>\n<p>\nAz egyszer\u0171s\u00e9g \u00e9s k\u00e9nyelem kedv\u00e9\u00e9rt a 2., 3. \u00e9s 4. l\u00e9p\u00e9seket egy szkriptbe \u00f6sszevontuk. <\/p>\n<p>Teh\u00e1t: <br \/>\n<b class=\"spoiler_title\">Mentj\u00fck az eredeti t\u00e1bl\u00e1zat dump-j\u00e1t<\/b><\/p>\n<pre><code class=\"plaintext\">pg_dump postgres --file=\\\/dump\\\/shipment.dmp --format=c --table=shipment --verbose &gt; \\\/dump\\\/shipment.log 2&gt;&amp;1<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">T\u00f6r\u00f6lj\u00fck az eredeti t\u00e1bl\u00e1zatot + Hozzuk l\u00e9tre a sz\u00fcl\u0151 t\u00e1bl\u00e1zatot a tartom\u00e1ny szerinti szegment\u00e1l\u00e1ssal + Hozzuk l\u00e9tre a szegmenseket<\/b><\/p>\n<pre><code class=\"plaintext\">--create_partition_shipment.sql\ndo language plpgsql $$\ndeclare \nrec_shipment_date RECORD ;\npartition_name varchar;\nindex_name varchar;\ncurrent_year varchar ;\ncurrent_month varchar ;\nbegin_year varchar ;\nbegin_month varchar ;\nnext_year varchar ;\nnext_month varchar ;\nfirst_flag boolean ;\ni integer ;\nbegin\n  RAISE NOTICE 'CREATE TEMPORARY TABLE FOR SHIPMENT_DATE';\n  CREATE TEMP TABLE tmp_shipment_date as select distinct \"SHIPMENT_DATE\" from shipment order by \"SHIPMENT_DATE\" ;\n\n  RAISE NOTICE 'DROP TABLE shipment';\n  drop table shipment cascade ;\n  \n  CREATE TABLE public.shipment\n  (\n    \"SHIPMENT_ID\" integer NOT NULL DEFAULT nextval('shipment_shipment_id_seq'::regclass),\n    \"SHIPMENT_NAME\" character varying(30) COLLATE pg_catalog.\"default\",\n    \"SHIPMENT_DATE\" timestamp without time zone,\n    \"REPORT_NAME\" character varying(40) COLLATE pg_catalog.\"default\"\n  )\n  PARTITION BY RANGE (\"SHIPMENT_DATE\")\n  WITH (\n      OIDS = FALSE\n  )\n  TABLESPACE pg_default;\n\n  RAISE NOTICE 'CREATE PARTITIONS FOR TABLE shipment';\n\n  current_year:='0';\n  current_month:='0';\n\n  begin_year := '0' ;\n  begin_month := '0'  ;\n  next_year := '0' ;\n  next_month := '0'  ;\n\n  FOR rec_shipment_date IN SELECT * FROM tmp_shipment_date LOOP\n      \n      RAISE NOTICE 'SHIPMENT_DATE=%',rec_shipment_date.\"SHIPMENT_DATE\";\n      \n      current_year := date_part('year' ,rec_shipment_date.\"SHIPMENT_DATE\");\n      current_month := date_part('month' ,rec_shipment_date.\"SHIPMENT_DATE\") ; \n\n      IF to_number(current_month,'99') = to_date( begin_year||'.'||begin_month, 'YYYY.MM') AND \n         to_date( current_year||'.'||current_month, 'YYYY.MM') &lt; to_date( next_year||&#039;.&#039;||next_month, &#039;YYYY.MM&#039;) AND \n         NOT first_flag \n      THEN\n         CONTINUE ; \n      ELSE\n       --NEW borders only for second and after time \n       begin_year := current_year ;\n       begin_month := current_month ;   \n   \n        IF current_month = &#039;12&#039; THEN\n          next_year := date_part(&#039;year&#039; ,rec_shipment_date.&quot;SHIPMENT_DATE&quot; + interval &#039;1 year&#039;) ;\n        ELSE\n          next_year := current_year ;\n        END IF;\n     \n       next_month := date_part(&#039;month&#039; ,rec_shipment_date.&quot;SHIPMENT_DATE&quot; + interval &#039;1 month&#039;) ;\n\n      END IF;      \n\n      partition_name := &#039;shipment_shipment_date_&#039;||begin_year||&#039;-&#039;||begin_month||&#039;-01-&#039;|| next_year||&#039;-&#039;||next_month||&#039;-01&#039;  ;\n \n     EXECUTE format(&#039;CREATE TABLE &#039; || quote_ident(partition_name) || &#039; PARTITION OF shipment FOR VALUES FROM ( %L ) TO ( %L )  &#039; , current_year||&#039;-&#039;||current_month||&#039;-01&#039; , next_year||&#039;-&#039;||next_month||&#039;-01&#039;  ) ; \n\n      index_name := partition_name||&#039;_shipment_id_idx&#039;;\n      RAISE NOTICE &#039;INDEX NAME =%&#039;,index_name;\n      EXECUTE format(&#039;CREATE INDEX &#039; || quote_ident(index_name) || &#039; ON &#039;|| quote_ident(partition_name) ||&#039; USING btree (&quot;SHIPMENT_ID&quot;) TABLESPACE pg_default &#039; ) ; \n\n      --Drop first time flag\n      first_flag := false ;\n   \n  END LOOP;\n\nend\n$$;<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Import\u00e1ljuk a dump-ot<\/b><\/p>\n<pre><code class=\"plaintext\">pg_restore -d postgres --data-only --format=c --table=shipment --verbose  shipment.dmp &gt; \/tmp\/data_dump\/shipment_restore.log 2&gt;&amp;1<\/code><\/pre>\n<p><\/p>\n<h2>Ellen\u0151rizz\u00fck a szekcion\u00e1l\u00e1s eredm\u00e9nyeit<\/h2>\n<p>\nMit is eredm\u00e9nyezett mindez? A v\u00e9grehajt\u00e1si terv teljes sz\u00f6vege hossz\u00fa \u00e9s unalmas, \u00edgy nyugodtan lehet az \u00f6sszegz\u0151 sz\u00e1mokra korl\u00e1toz\u00f3dni.<\/p>\n<h3>Volt<\/h3>\n<p>\n<b>K\u00f6lts\u00e9g:<\/b> 502 997.55<br \/>\n<b>V\u00e9grehajt\u00e1si id\u0151:<\/b> 505 m\u00e1sodperc.<\/p>\n<h3>Lett<\/h3>\n<p>\n<b>K\u00f6lts\u00e9g:<\/b> 77 872.36<br \/>\n<b>V\u00e9grehajt\u00e1si id\u0151:<\/b> 79 m\u00e1sodperc.<\/p>\n<p>Teljesen j\u00f3 eredm\u00e9ny. Cs\u00f6kkentett\u00fck a k\u00f6lts\u00e9geket \u00e9s a v\u00e9grehajt\u00e1si id\u0151t. \u00cdgy a particion\u00e1l\u00e1s haszn\u00e1lata hozza a v\u00e1rt hat\u00e1st, \u00f6sszess\u00e9g\u00e9ben meglepet\u00e9sek n\u00e9lk\u00fcl. <\/p>\n<h2>Meg\u00f6rvendeztetni az \u00fcgyfelet<\/h2>\n<p>\nA tesztel\u00e9si eredm\u00e9nyeket az \u00fcgyf\u00e9l sz\u00e1m\u00e1ra bemutatt\u00e1k. A megismer\u00e9s ut\u00e1n kicsit v\u00e1ratlan \u00edt\u00e9letet hozott: \u201eRemek, particion\u00e1lja a 'data' t\u00e1bl\u00e1t.\u201d<\/p>\n<p>Igen, de mi eg\u00e9szen m\u00e1sik t\u00e1bl\u00e1t, a 'shipment' t\u00e1bl\u00e1t vizsg\u00e1ltuk, a 'data' t\u00e1bl\u00e1nak nincsen 'SHIPMENT_DATE' mez\u0151je.<\/p>\n<p>Nem probl\u00e9ma, adjon hozz\u00e1, v\u00e1ltoztasson. A l\u00e9nyeg, hogy az \u00fcgyf\u00e9l el\u00e9gedett legyen a v\u00e9geredm\u00e9nnyel, a megval\u00f3s\u00edt\u00e1s r\u00e9szletei nem annyira fontosak.<\/p>\n<h2>Particion\u00e1ljuk az alap 'data' t\u00e1bl\u00e1t<\/h2>\n<p>\nAlapvet\u0151en k\u00fcl\u00f6n\u00f6sebb neh\u00e9zs\u00e9gek nem mer\u00fcltek fel. B\u00e1r a particion\u00e1l\u00e1si algoritmus term\u00e9szetesen kiss\u00e9 megv\u00e1ltozott.<\/p>\n<p><b class=\"spoiler_title\">Hozz\u00e1adjuk a 'SHIPMENT_DATE' oszlopot a 'data' t\u00e1bl\u00e1hoz<\/b><\/p>\n<pre><code class=\"plaintext\">psql -h host -U database -d user\n=&gt; ALTER TABLE data ADD COLUMN \"SHIPMENT_DATE\" timestamp without time zone ;<\/code><\/pre>\n<p><b class=\"spoiler_title\">Kit\u00f6ltj\u00fck a 'SHIPMENT_DATE' oszlop \u00e9rt\u00e9keit a 'data' t\u00e1bl\u00e1ban az azonos nev\u0171 oszlop \u00e9rt\u00e9keivel a 'shipment' t\u00e1bl\u00e1b\u00f3l<\/b><\/p>\n<pre><code class=\"plaintext\">-----------------------------\n--update_data.sql\n--friss\u00edt\u00e9s a m\u00f3dos\u00edtott 'data' t\u00e1bl\u00e1hoz a 'shipment' t\u00e1bl\u00e1b\u00f3l a 'shipment_data' \u00e9rt\u00e9keivel\n--verzi\u00f3 1.0\ndo language plpgsql $$\ndeclare \nrec_shipment_data RECORD ;\nshipment_date timestamp without time zone ; \nrow_count integer ;\ntotal_rows integer ;\nbegin\n\n  select count(*) into total_rows from shipment ; \n  RAISE NOTICE '\u00d6sszesen %',total_rows;\n  row_count:= 0 ;\n\n  FOR rec_shipment_data IN SELECT * FROM shipment LOOP\n\n   update data set \"SHIPMENT_DATE\" = rec_shipment_data.\"SHIPMENT_DATE\" where \"SHIPMENT_ID\" = rec_shipment_data.\"SHIPMENT_ID\";\n   \n   row_count:=  row_count +1 ;\n   RAISE NOTICE 'sor sz\u00e1m = % , \u00f6sszesen %',row_count,total_rows;\n  END LOOP;\n\nend\n$$;<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Mentj\u00fck a 'data' t\u00e1bla dump-j\u00e1t<\/b><\/p>\n<pre><code class=\"plaintext\">pg_dump postgres --file=\\\/dump\\\/data.dmp --format=c --table=data --verbose &gt; \\\/dump\\\/data.log 2&gt;&amp;1&lt;\\\/source<\/code><\/pre>\n<p><b class=\"spoiler_title\">\u00dajra l\u00e9trehozzuk a particion\u00e1lt 'data' t\u00e1bl\u00e1t<\/b><\/p>\n<pre><code class=\"plaintext\">--create_partition_data.sql\n--part\u00edci\u00f3k l\u00e9trehoz\u00e1sa a \"wafer data\" t\u00e1bl\u00e1hoz a \"shipment_data\" id\u0151szakos oszlop alapj\u00e1n, egy h\u00f3napos id\u0151tartammal\n--verzi\u00f3 1.0\ndo language plpgsql $$\ndeclare \nrec_shipment_date RECORD ;\npartition_name varchar;\nindex_name varchar;\ncurrent_year varchar ;\ncurrent_month varchar ;\nbegin_year varchar ;\nbegin_month varchar ;\nnext_year varchar ;\nnext_month varchar ;\nfirst_flag boolean ;\ni integer ;\n\nbegin\n\n  RAISE NOTICE 'IDEIGLENES T\u00c1BLA L\u00c9TREHOZ\u00c1SA A SZ\u00c1LL\u00cdT\u00c1SI D\u00c1TUMHOZ';\n  CREATE TEMP TABLE tmp_shipment_date as select distinct \"SHIPMENT_DATE\" from shipment order by \"SHIPMENT_DATE\" ;\n\n\n  RAISE NOTICE 'ADAT T\u00c1BLA T\u00d6RL\u00c9SE';\n  drop table data cascade ;\n\n\n  RAISE NOTICE 'PART\u00cdCION\u00c1LT ADAT T\u00c1BLA L\u00c9TREHOZ\u00c1SA';\n  \n  CREATE TABLE public.data\n  (\n    \"RUN_ID\" integer,\n    \"LASERMARK\" character varying(20) COLLATE pg_catalog.\"default\" NOT NULL,\n    \"LOTID\" character varying(80) COLLATE pg_catalog.\"default\",\n    \"SHIPMENT_ID\" integer NOT NULL,\n    \"PARAMETER_ID\" integer NOT NULL,\n    \"INTERNAL_VALUE\" character varying(75) COLLATE pg_catalog.\"default\",\n    \"REPORTED_VALUE\" character varying(75) COLLATE pg_catalog.\"default\",\n    \"LOWER_SPEC_LIMIT\" numeric,\n    \"UPPER_SPEC_LIMIT\" numeric , \n    \"SHIPMENT_DATE\" timestamp without time zone\n  )\n  PARTITION BY RANGE (\"SHIPMENT_DATE\")\n  WITH (\n    OIDS = FALSE\n  )\n  TABLESPACE pg_default ;\n\n\n  RAISE NOTICE 'PART\u00cdCION\u00c1K L\u00c9TREHOZ\u00c1SA A DATA T\u00c1BL\u00c1HOZ';\n\n  current_year:='0';\n  current_month:='0';\n\n  begin_year := '0' ;\n  begin_month := '0'  ;\n  next_year := '0' ;\n  next_month := '0'  ;\n  i := 1;\n\n  FOR rec_shipment_date IN SELECT * FROM tmp_shipment_date LOOP\n      \n      RAISE NOTICE 'SHIPMENT_DATE=%',rec_shipment_date.\"SHIPMENT_DATE\";\n      \n      current_year := date_part('year' ,rec_shipment_date.\"SHIPMENT_DATE\");\n      current_month := date_part('month' ,rec_shipment_date.\"SHIPMENT_DATE\") ; \n\n      --Hat\u00e1rok inicializ\u00e1l\u00e1sa\n      IF   begin_year = '0' THEN\n       RAISE NOTICE '***Hat\u00e1rok inicializ\u00e1l\u00e1sa';\n       first_flag := true ; --els\u0151 alkalom jelz\u0151\n       begin_year := current_year ;\n       begin_month := current_month ;   \n   \n        IF current_month = '12' THEN\n          next_year := date_part('year' ,rec_shipment_date.\"SHIPMENT_DATE\" + interval '1 year') ;\n        ELSE\n          next_year := current_year ;\n        END IF;\n     \n       next_month := date_part('month' ,rec_shipment_date.\"SHIPMENT_DATE\" + interval '1 month') ;\n\n      END IF;\n\n--      RAISE NOTICE 'current_year=% , current_month=% ',current_year,current_month;\n--      RAISE NOTICE 'begin_year=% , begin_month=% ',begin_year,begin_month;\n--      RAISE NOTICE 'next_year=% , next_month=% ',next_year,next_month;\n\n      -- Ellen\u0151rizze az aktu\u00e1lis d\u00e1tumot a hat\u00e1rok k\u00f6z\u00f6tt NEM az els\u0151 alkalomra\n\n      RAISE NOTICE 'Aktu\u00e1lis adat = %',to_char( to_date( current_year||'.'||current_month, 'YYYY.MM'), 'YYYY.MM');\n      RAISE NOTICE 'Kezd\u0151 adat = %',to_char( to_date( begin_year||'.'||begin_month, 'YYYY.MM'), 'YYYY.MM');\n      RAISE NOTICE 'K\u00f6vetkez\u0151 adat = %',to_char( to_date( next_year||'.'||next_month, 'YYYY.MM'), 'YYYY.MM');\n\n      IF to_date( current_year||'.'||current_month, 'YYYY.MM') &gt;= to_date( begin_year||'.'||begin_month, 'YYYY.MM') AND \n         to_date( current_year||'.'||current_month, 'YYYY.MM') &lt; to_date( next_year||&#039;.&#039;||next_month, &#039;YYYY.MM&#039;) AND \n         NOT first_flag \n      THEN\n         RAISE NOTICE &#039;***FOLYTAT\u00c1S&#039;;\n         CONTINUE ; \n      ELSE\n       --\u00daj hat\u00e1rok csak m\u00e1sodszor \u00e9s az ut\u00e1n \n       RAISE NOTICE &#039;***\u00daJ HAT\u00c1ROK&#039;;\n       begin_year := current_year ;\n       begin_month := current_month ;   \n   \n        IF current_month = &#039;12&#039; THEN\n          next_year := date_part(&#039;year&#039; ,rec_shipment_date.&quot;SHIPMENT_DATE&quot; + interval &#039;1 year&#039;) ;\n        ELSE\n          next_year := current_year ;\n        END IF;\n     \n       next_month := date_part(&#039;month&#039; ,rec_shipment_date.&quot;SHIPMENT_DATE&quot; + interval &#039;1 month&#039;) ;\n\n\n      END IF;      \n\n      IF to_number(current_month,&#039;99&#039;) &lt; 10 THEN\n        current_month := &#039;0&#039;||current_month ; \n      END IF ;\n\n      IF to_number(begin_month,&#039;99&#039;) &lt; 10 THEN\n        begin_month := &#039;0&#039;||begin_month ; \n      END IF ;\n\n      IF to_number(next_month,&#039;99&#039;) &lt; 10 THEN\n        next_month := &#039;0&#039;||next_month ; \n      END IF ;\n\n      RAISE NOTICE &#039;current_year=% , current_month=% &#039;,current_year,current_month;\n      RAISE NOTICE &#039;begin_year=% , begin_month=% &#039;,begin_year,begin_month;\n      RAISE NOTICE &#039;next_year=% , next_month=% &#039;,next_year,next_month;\n\n      partition_name := &#039;data_&#039;||begin_year||begin_month||&#039;01_&#039;||next_year||next_month||&#039;01&#039;  ;\n\n      RAISE NOTICE &#039;PART\u00cdCI\u00d3 SZ\u00c1MA % , T\u00c1BLA NEVE =%&#039;,i , partition_name;\n      \n      EXECUTE format(&#039;CREATE TABLE &#039; || quote_ident(partition_name) || &#039; PARTITION OF data FOR VALUES FROM ( %L ) TO ( %L )  &#039; , begin_year||&#039;-&#039;||begin_month||&#039;-01&#039; , next_year||&#039;-&#039;||next_month||&#039;-01&#039;  ) ; \n\n      index_name := partition_name||&#039;_shipment_id_parameter_id_idx&#039;;\n      RAISE NOTICE &#039;INDEX N\u00c9V =%&#039;,index_name;\n      EXECUTE format(&#039;CREATE INDEX &#039; || quote_ident(index_name) || &#039; ON &#039;|| quote_ident(partition_name) ||&#039; USING btree (&quot;SHIPMENT_ID&quot;, &quot;PARAMETER_ID&quot;) TABLESPACE pg_default &#039; ) ; \n\n      index_name := partition_name||&#039;_lasermark_idx&#039;;\n      RAISE NOTICE &#039;INDEX N\u00c9V =%&#039;,index_name;\n      EXECUTE format(&#039;CREATE INDEX &#039; || quote_ident(index_name) || &#039; ON &#039;|| quote_ident(partition_name) ||&#039; USING btree (&quot;LASERMARK&quot; COLLATE pg_catalog.&quot;default&quot;) TABLESPACE pg_default &#039; ) ; \n\n      index_name := partition_name||&#039;_shipment_id_idx&#039;;\n      RAISE NOTICE &#039;INDEX N\u00c9V =%&#039;,index_name;\n      EXECUTE format(&#039;CREATE INDEX &#039; || quote_ident(index_name) || &#039; ON &#039;|| quote_ident(partition_name) ||&#039; USING btree (&quot;SHIPMENT_ID&quot;) TABLESPACE pg_default &#039; ) ; \n\n      index_name := partition_name||&#039;_parameter_id_idx&#039;;\n      RAISE NOTICE &#039;INDEX N\u00c9V =%&#039;,index_name;\n      EXECUTE format(&#039;CREATE INDEX &#039; || quote_ident(index_name) || &#039; ON &#039;|| quote_ident(partition_name) ||&#039; USING btree (&quot;PARAMETER_ID&quot;) TABLESPACE pg_default &#039; ) ; \n\n      index_name := partition_name||&#039;_shipment_date_idx&#039;;\n      RAISE NOTICE &#039;INDEX N\u00c9V =%&#039;,index_name;\n      EXECUTE format(&#039;CREATE INDEX &#039; || quote_ident(index_name) || &#039; ON &#039;|| quote_ident(partition_name) ||&#039; USING btree (&quot;SHIPMENT_DATE&quot;) TABLESPACE pg_default &#039; ) ; \n\n      --T\u00f6r\u00f6lje az els\u0151 alkalom jelz\u0151t\n      first_flag := false ;\n\n  END LOOP;\nend\n$$;\n<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Bet\u00f6ltj\u00fck a 3. l\u00e9p\u00e9sben l\u00e9trehozott dump f\u00e1jlt.<\/b><\/p>\n<pre><code class=\"plaintext\">pg_restore -h host -u felhaszn\u00e1l\u00f3 -d adatb\u00e1zis --data-only --format=c --table=data --verbose data.dmp &gt; data_restore.log 2&gt;&amp;1<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">K\u00fcl\u00f6n szekci\u00f3t hozunk l\u00e9tre a r\u00e9gi adatok sz\u00e1m\u00e1ra<\/b><\/p>\n<pre><code class=\"plaintext\">---------------------------------------------------\n--create_partition_for_old_dates.sql\n--part\u00edci\u00f3k l\u00e9trehoz\u00e1sa a r\u00e9gi d\u00e1tumok t\u00e1rol\u00e1s\u00e1hoz \n--verzi\u00f3 1.0\ndo language plpgsql $$\ndeclare \nrec_shipment_date RECORD ;\npartition_name varchar;\nindex_name varchar;\n\nbegin\n\n      SELECT min(\"SHIPMENT_DATE\") AS min_date INTO rec_shipment_date from data ;\n\n      RAISE NOTICE 'R\u00e9gi d\u00e1tum: %', rec_shipment_date.min_date ;\n\n      partition_name := 'data_old_dates'  ;\n\n      RAISE NOTICE 'PART\u00cdC\u00d3 NEVE: %', partition_name;\n\n      EXECUTE format('CREATE TABLE ' || quote_ident(partition_name) || ' PARTITION OF data FOR VALUES FROM ( %L ) TO ( %L )  ', '1900-01-01' , \n              to_char( rec_shipment_date.min_date,'YYYY')||'-'||to_char(rec_shipment_date.min_date,'MM')||'-01'  ) ; \n\n      index_name := partition_name||'_shipment_id_parameter_id_idx';\n      EXECUTE format('CREATE INDEX ' || quote_ident(index_name) || ' ON '|| quote_ident(partition_name) ||' USING btree (\"SHIPMENT_ID\", \"PARAMETER_ID\") TABLESPACE pg_default ' ) ; \n\n      index_name := partition_name||'_lasermark_idx';\n      EXECUTE format('CREATE INDEX ' || quote_ident(index_name) || ' ON '|| quote_ident(partition_name) ||' USING btree (\"LASERMARK\" COLLATE pg_catalog.\"default\") TABLESPACE pg_default ' ) ; \n\n      index_name := partition_name||'_shipment_id_idx';\n      EXECUTE format('CREATE INDEX ' || quote_ident(index_name) || ' ON '|| quote_ident(partition_name) ||' USING btree (\"SHIPMENT_ID\") TABLESPACE pg_default ' ) ; \n\n      index_name := partition_name||'_parameter_id_idx';\n      EXECUTE format('CREATE INDEX ' || quote_ident(index_name) || ' ON '|| quote_ident(partition_name) ||' USING btree (\"PARAMETER_ID\") TABLESPACE pg_default ' ) ; \n\n      index_name := partition_name||'_shipment_date_idx';\n      EXECUTE format('CREATE INDEX ' || quote_ident(index_name) || ' ON '|| quote_ident(partition_name) ||' USING btree (\"SHIPMENT_DATE\") TABLESPACE pg_default ' ) ; \n\nend\n$$;<\/code><\/pre>\n<h3>V\u00e9geredm\u00e9nyek:<\/h3>\n<p>\n<b>Volt<\/b><br \/>\n<b>K\u00f6lts\u00e9g:<\/b> 502 997.55<br \/>\n<b>V\u00e9grehajt\u00e1si id\u0151<\/b>: 505 m\u00e1sodperc.<\/p>\n<p><b>Lett<\/b><br \/>\n<b>K\u00f6lts\u00e9g:<\/b> 68 533.70<br \/>\n<b>V\u00e9grehajt\u00e1si id\u0151:<\/b> 69 m\u00e1sodperc<\/p>\n<p>Megfelel\u0151, igaz\u00e1n megfelel\u0151. Figyelembe v\u00e9ve, hogy \u00fatk\u00f6zben siker\u00fclt viszonylag elsaj\u00e1t\u00edtani a PostgreSQL 10 szekcion\u00e1l\u00f3 mechanizmus\u00e1t - Kiv\u00e1l\u00f3 eredm\u00e9ny.<\/p>\n<h2>L\u00edrai kit\u00e9r\u0151<\/h2>\n<p>\n<b class=\"spoiler_title\">De lehet m\u00e9g jobb - IGEN, LEHET!<\/b>Ehhez MATERIALIZED VIEW-t kell haszn\u00e1lni.<br \/>\n<b class=\"spoiler_title\">CREATE MATERIALIZED VIEW LASERMARK_VIEW<\/b><\/p>\n<pre><code class=\"plaintext\">CREATE MATERIALIZED VIEW LASERMARK_VIEW \nAS\nSELECT w.\"LASERMARK\" , MAX(s.\"SHIPMENT_DATE\") AS \"SHIPMENT_DATE\"\nFROM shipment s INNER JOIN data w ON s.\"SHIPMENT_ID\" = w.\"SHIPMENT_ID\" \nGROUP BY w.\"LASERMARK\" ;\n\nCREATE INDEX lasermark_vw_shipment_date_ind on lasermark_view USING btree (\"SHIPMENT_DATE\") TABLESPACE pg_default;\nanalyze lasermark_view ;\n<\/code><\/pre>\n<p>\nIsm\u00e9t \u00e1tfogalmazzuk a lek\u00e9rdez\u00e9st:<br \/>\n<b class=\"spoiler_title\">Lek\u00e9rdez\u00e9s materialized view haszn\u00e1lat\u00e1val<\/b><\/p>\n<pre><code class=\"plaintext\">V\u00c1LASZ\n            p.\"PARAMETER_ID\" as parameter_id,\n            pc.\"PC_NAME\" AS pc_name,\n            pc.\"CUSTOMER_PARTNUMBER\" AS customer_partnumber,\n            w.\"LASERMARK\" AS lasermark,\n            w.\"LOTID\" AS lotid,\n            w.\"REPORTED_VALUE\" AS reported_value,\n            w.\"LOWER_SPEC_LIMIT\" AS lower_spec_limit,\n            w.\"UPPER_SPEC_LIMIT\" AS upper_spec_limit,\n            p.\"TYPE_CALCUL\" AS type_calcul,\n            s.\"SHIPMENT_NAME\" AS shipment_name,\n            s.\"SHIPMENT_DATE\" AS shipment_date,\n            extract(year from s.\"SHIPMENT_DATE\") AS year,\n            extract(month from s.\"SHIPMENT_DATE\") as month,\n            s.\"REPORT_NAME\" AS report_name,\n            p.\"STC_NAME\" AS STC_name,\n            p.\"CUSTOMERPARAM_NAME\" AS customerparam_name\n        FROM data w INNER JOIN shipment s ON s.\"SHIPMENT_ID\" = w.\"SHIPMENT_ID\"\n             INNER JOIN parameters p ON p.\"PARAMETER_ID\" = w.\"PARAMETER_ID\"\n             INNER JOIN shipment_pc sp ON s.\"SHIPMENT_ID\" = sp.\"SHIPMENT_ID\"\n             INNER JOIN pc pc ON pc.\"PC_ID\" = sp.\"PC_ID\"\n             INNER JOIN LASERMARK_VIEW md ON md.\"SHIPMENT_DATE\" = s.\"SHIPMENT_DATE\" AND md.\"LASERMARK\" = w.\"LASERMARK\"\n        WHERE \n              s.\"SHIPMENT_DATE\" &gt;= '2018-07-01' AND s.\"SHIPMENT_DATE\" &lt;= &#039;2018-09-30&#039;;\n<\/code><\/pre>\n<p>\n<b>\u00c9s kapunk egy \u00fajabb eredm\u00e9nyt:<\/b><br \/>\n<b>Volt<\/b><br \/>\n<b>K\u00f6lts\u00e9g:<\/b> 502 997.55<br \/>\n<b>V\u00e9grehajt\u00e1si id\u0151<\/b>: 505 m\u00e1sodperc<\/p>\n<p><b>Lett<\/b><br \/>\n<b>K\u00f6lts\u00e9g:<\/b> 42 481.16<br \/>\n<b>V\u00e9grehajt\u00e1si id\u0151:<\/b> 43 m\u00e1sodperc.<\/p>\n<p>B\u00e1r nyilv\u00e1nval\u00f3an, egy ilyen \u00edg\u00e9retes eredm\u00e9ny megt\u00e9veszt\u0151 lehet, a megjelen\u00e9seket friss\u00edteni kell. Teh\u00e1t az adatok megszerz\u00e9s\u00e9nek v\u00e9gs\u0151 ideje nem sokat fog seg\u00edteni. De k\u00eds\u00e9rletk\u00e9nt mindenk\u00e9ppen \u00e9rdekes.<\/p>\n<p>Val\u00f3j\u00e1ban, ahogy kider\u00fclt, m\u00e9g egyszer k\u00f6sz\u00f6n\u00f6m <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/asmm\/\" class=\"user_link\">asmm<\/a><\/noindex> \u00e9s a Habrunak !- <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/icl_services\/blog\/446314\/#comment_19973236\">a lek\u00e9rdez\u00e9s m\u00e9g jobb\u00e1 tehet\u0151. <\/a><\/noindex><\/p>\n<h2>Ut\u00f3sz\u00f3<\/h2>\n<p>\nTeh\u00e1t az \u00fcgyf\u00e9l el\u00e9gedett. \u00c9s <b>a k\u00e9sz\u00fcl\u00e9k hely\u00e9nek ismeret\u00e9re. Ha <\/b>kihaszn\u00e1lni a helyzetet. <\/p>\n<p><b>\u00daj feladat<\/b>: Mit lehetne kital\u00e1lni, hogy m\u00e9lyebb \u00e9s sz\u00e9lesebb legyen?<\/p>\n<p>\u00c9s itt jut esz\u00fcnkbe \u2014 sr\u00e1cok, de hiszen nincs monitoroz\u00e1sunk a PostgreSQL adatb\u00e1zisainkr\u00f3l.<\/p>\n<p>A sz\u00edv\u00fcnkre tessz\u00fck a kez\u00fcnket, van valamif\u00e9le monitoroz\u00e1s a Cloud Watch-on az AWS-en. De mi haszna van ebb\u0151l a monitoroz\u00e1sb\u00f3l a DBA sz\u00e1m\u00e1ra? Val\u00f3j\u00e1ban szinte semmi.<\/p>\n<p><b>Ha lehet\u0151s\u00e9g ny\u00edlt egy hasznos \u00e9s \u00e9rdekes dolog l\u00e9trehoz\u00e1s\u00e1ra magunk sz\u00e1m\u00e1ra, nem lehet elhagyni egy ilyen es\u00e9lyt ...<br \/>\nMERT<br \/>\n<\/b><br \/>\n<img decoding=\"async\" alt=\"Happy Party vagy n\u00e9h\u00e1ny sor-eml\u00e9k a PostgreSQL10 szekci\u00f3z\u00e1s\u00e1nak megismer\u00e9s\u00e9r\u0151l\" src=\"\/wp-content\/uploads\/2019\/04\/e514664a4a46f5379c51f57f24481746.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n\u00cdgy jutottunk el a leg\u00e9rdekesebbhez:<\/p>\n<blockquote><p><b>2018. december 3.<\/b><br \/>\nD\u00f6nt\u00e9s a PostgreSQL lek\u00e9rdez\u00e9sek teljes\u00edtm\u00e9ny\u00e9nek monitoroz\u00e1s\u00e1nak lehet\u0151s\u00e9geinek kutat\u00e1s\u00e1r\u00f3l.\n<\/p><\/blockquote>\n<p><b>De ez m\u00e1r egy teljesen m\u00e1sik t\u00f6rt\u00e9net.<\/b><\/p>\n<p><i>Folytat\u00e1s, k\u00f6vetkezik...<\/i><br \/>\n<br \/>Forr\u00e1s: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/icl_services\/blog\/446442\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435 \u0438\u043b\u0438 \u043a\u0430\u043a \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u041d\u0430\u0447\u0430\u043b\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0437\u0434\u0435\u0441\u044c: \u0422\u044b \u043f\u043e\u043c\u043d\u0438\u0448\u044c, \u043a\u0430\u043a \u0432\u0441\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c. \u0412\u0441\u0435 \u0431\u044b\u043b\u043e \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0438 \u0432\u043d\u043e\u0432\u044c. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u0431\u044b\u043b\u0438 \u0438\u0441\u0447\u0435\u0440\u043f\u0430\u043d\u044b, \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u0430 \u0447\u0442\u043e \u0436\u0435 \u0434\u0430\u043b\u044c\u0448\u0435? \u0422\u0430\u043a \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u043e \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438. \u041b\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435: \u0418\u043c\u0435\u043d\u043d\u043e &#8216;\u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442&#8217;, \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043a\u0430\u043a [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":23765,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-31905","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=\"\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435 \u0438\u043b\u0438 \u043a\u0430\u043a \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u041d\u0430\u0447\u0430\u043b\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0437\u0434\u0435\u0441\u044c: \u0422\u044b \u043f\u043e\u043c\u043d\u0438\u0448\u044c, \u043a\u0430\u043a \u0432\u0441\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c.\" \/>\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\/hu\/blog\/administrirovanie\/happy-party-ili-para-strok-vospominanij-o-znakomstve-s-sektsionirovaniem-v-postgresql10\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"hu_HU\" \/>\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\udd47Happy Party \u0438\u043b\u0438 \u043f\u0430\u0440\u0430 \u0441\u0442\u0440\u043e\u043a-\u0432\u043e\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439 \u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0435 \u0441 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432 PostgreSQL10 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435 \u0438\u043b\u0438 \u043a\u0430\u043a \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u041d\u0430\u0447\u0430\u043b\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0437\u0434\u0435\u0441\u044c: \u0422\u044b \u043f\u043e\u043c\u043d\u0438\u0448\u044c, \u043a\u0430\u043a \u0432\u0441\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/happy-party-ili-para-strok-vospominanij-o-znakomstve-s-sektsionirovaniem-v-postgresql10\" \/>\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:43:52+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:43:52+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\udd47Happy Party vagy p\u00e1r sor-eml\u00e9k a PostgreSQL10 szekcion\u00e1l\u00e1s\u00e1nak megismer\u00e9s\u00e9r\u0151l | ProHoster","description":"El\u0151sz\u00f3 vagy hogyan sz\u00fcletett a szekcion\u00e1l\u00e1s \u00f6tlete A t\u00f6rt\u00e9net itt kezd\u0151dik: Eml\u00e9kszel, hogyan indult az eg\u00e9sz.","canonical_url":"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/happy-party-ili-para-strok-vospominanij-o-znakomstve-s-sektsionirovaniem-v-postgresql10","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"hu_HU","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\udd47Happy Party \u0438\u043b\u0438 \u043f\u0430\u0440\u0430 \u0441\u0442\u0440\u043e\u043a-\u0432\u043e\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439 \u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0435 \u0441 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432 PostgreSQL10 | ProHoster","og:description":"\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435 \u0438\u043b\u0438 \u043a\u0430\u043a \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u041d\u0430\u0447\u0430\u043b\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0437\u0434\u0435\u0441\u044c: \u0422\u044b \u043f\u043e\u043c\u043d\u0438\u0448\u044c, \u043a\u0430\u043a \u0432\u0441\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c.","og:url":"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/happy-party-ili-para-strok-vospominanij-o-znakomstve-s-sektsionirovaniem-v-postgresql10","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:43:52+00:00","article:modified_time":"2019-10-31T18:43:52+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"31905","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 08:22:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 03:09:25","updated":"2026-01-21 08:22:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts\/31905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/comments?post=31905"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts\/31905\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/media\/23765"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/media?parent=31905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/categories?post=31905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/tags?post=31905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}