{"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\/sq\/blog\/administrirovanie\/happy-party-ili-para-strok-vospominanij-o-znakomstve-s-sektsionirovaniem-v-postgresql10","title":{"rendered":"Happy Party ose disa rreshta kujtimesh p\u00ebr njohjen me seksionimin n\u00eb PostgreSQL10","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<h4>Parath\u00ebnie ose si lindi ideja e seksionimit<\/h4>\n<p>\nHistoria fillon k\u00ebtu: <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/icl_services\/blog\/446314\/\">A e mban mend si filloi gjith\u00e7ka. Ishte e para her\u00eb dhe s\u00ebrish.<\/a><\/noindex> Pas sa i gjith\u00eb burimet p\u00ebr optimizimin e k\u00ebrkes\u00ebs ishin shteruar, u b\u00eb pyetja - \u00e7far\u00eb do t\u00eb ndodh\u00eb m\u00eb pas? K\u00ebshtu lindi ideja e seksionimit. <\/p>\n<p><img decoding=\"async\" alt=\"Happy Party ose disa rreshta kujtimesh p\u00ebr njohjen me seksionimin n\u00eb PostgreSQL10\" src=\"\/wp-content\/uploads\/2019\/04\/ef30e00aac34e9522e1d3e1875aa93bf.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<b>Nj\u00eb an\u00eb lirikale:<\/b><br \/>\n<i>N\u00eb at\u00eb moment, sepse <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/icl_services\/blog\/446314\/#comment_19973236\">si\u00e7 doli, ekzistonin rezerva t\u00eb pashfryt\u00ebzuara p\u00ebr optimizim<\/a><\/noindex>. Faleminderit <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/asmm\/\" class=\"user_link\">asmm<\/a><\/noindex> dhe Habrus!<\/i><\/p>\n<p>Pra, si mund ta b\u00ebjm\u00eb klientin disi t\u00eb k\u00ebnaqur, ndihmuar s\u00eb bashku q\u00eb t\u00eb rrisim aft\u00ebsit\u00eb tona? <\/p>\n<p><b>N\u00ebse e thjeshtojm\u00eb deri n\u00eb maksimum<\/b>, at\u00ebher\u00eb, ka vet\u00ebm dy rrug\u00eb p\u00ebr t\u00eb p\u00ebrmir\u00ebsuar ndjesh\u00ebm performanc\u00ebn e databaz\u00ebs:<br \/>\n1) Rruga ekstensive - rritim burimesh, ndryshimi i konfiguracionit;<br \/>\n2) Rruga intensive - optimizimi i k\u00ebrkesave<\/p>\n<p>Pasi, t\u00eb rikthehem, n\u00eb at\u00eb moment nuk ishte e qart\u00eb se \u00e7far\u00eb tjet\u00ebr duhet ndryshuar n\u00eb k\u00ebrkes\u00eb p\u00ebr ta shpejtuar, u zgjodh rruga - <b>ndryshimi i dizajnit t\u00eb tabelave.<\/b><\/p>\n<p><b>Tani - lind pyetja kryesore - \u00e7far\u00eb dhe si do t\u00eb ndryshojm\u00eb? <\/b><br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>Kushtet fillestare<\/h2>\n<p>\nS\u00eb pari, kemi k\u00ebt\u00eb ERD (e cila \u00ebsht\u00eb treguar n\u00eb m\u00ebnyr\u00eb t\u00eb thjeshtuar):<br \/>\n<img decoding=\"async\" alt=\"Happy Party ose disa rreshta kujtimesh p\u00ebr njohjen me seksionimin n\u00eb PostgreSQL10\" src=\"\/wp-content\/uploads\/2019\/04\/de270774e7dd99b060cc200ba5012075.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nKarakteristikat kryesore:<\/p>\n<ol>\n<li> marr\u00ebdh\u00ebniet 'shum\u00eb-n\u00eb-shum\u00eb'<\/li>\n<li> Tabela ka nj\u00eb \u00e7el\u00ebs potencial p\u00ebr seksionim <\/li>\n<\/ol>\n<p>K\u00ebrkesa fillestare:<\/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>Rezultatet e ekzekutimit n\u00eb databaz\u00ebn testuese:<\/b><br \/>\n<b>Kosto <\/b>: 502 997.55<br \/>\n<b>Koha e ekzekutimit<\/b>: 505 sekonda.<\/p>\n<p>\u00c7far\u00eb shohim? Nj\u00eb k\u00ebrkes\u00eb e zakonshme, p\u00ebrmes sektorit temporal. <br \/>\nT\u00eb b\u00ebjm\u00eb nj\u00eb supozim t\u00eb thjesht\u00eb logjik: n\u00ebse ekziston nj\u00eb most\u00ebr e sektorit temporal, a mund t\u00eb na ndihmoj\u00eb? Sakt\u00eb - seksionimi.<\/p>\n<h2>\u00c7far\u00eb duhet t\u00eb seksionohet?<\/h2>\n<p>\nN\u00eb shikim t\u00eb par\u00eb, zgjedhja \u00ebsht\u00eb e qart\u00eb - seksionimi deklarativ i tabel\u00ebs 'shipment' sipas \u00e7el\u00ebsit 'SHIPMENT_DATE' (<i>p\u00ebr t\u00eb th\u00ebn\u00eb shum\u00eb p\u00ebrpara - p\u00ebrfundimisht n\u00eb prodhim rezultoi pak ndryshe<\/i>). <\/p>\n<h2>Si t\u00eb seksionojm\u00eb?<\/h2>\n<p>\nKy pyetje gjithashtu nuk \u00ebsht\u00eb shum\u00eb e komplikuar. Fal\u00eb Zotit, n\u00eb PostgreSQL 10, tani ka nj\u00eb mekaniz\u00ebm t\u00eb kuptuesh\u00ebm p\u00ebr seksionimin. <br \/>\nPra: <\/p>\n<ol>\n<li> Ruajm\u00eb dump-in e tabel\u00ebs fillestare - <i>pg_dump source_table<\/i><\/li>\n<li> Fshi tabel\u00ebn fillestare - <i>drop table source_table<\/i><\/li>\n<li>Krijojm\u00eb tabel\u00ebn prind me seksionim sipas \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043dit - <i>create table source_table<\/i><\/li>\n<li> Krijojm\u00eb seksionet - <i>create table source_table, create index<\/i><\/li>\n<li> Importojm\u00eb dump-in e krijuar n\u00eb hapin 1 - <i>pg_restore<\/i><\/li>\n<\/ol>\n<p><\/p>\n<h2>Skripte p\u00ebr seksionimin <\/h2>\n<p>\nP\u00ebr thjesht\u00ebsi dhe leht\u00ebsi, hapat 2, 3, 4 u bashkuan n\u00eb nj\u00eb skript. <\/p>\n<p>Pra: <br \/>\n<b class=\"spoiler_title\">Ruajm\u00eb dump-in e tabel\u00ebs fillestare<\/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\">Fshi tabel\u00ebn fillestare + Krijo tabel\u00ebn prind me seksionim sipas \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043dit + Krijo seksionet<\/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 'KRIJO TABEL TEMPORARE P\u00cbR DATAT E D\u00cbRGES\u00cbS';\n  CREATE TEMP TABLE tmp_shipment_date as select distinct \"SHIPMENT_DATE\" from shipment order by \"SHIPMENT_DATE\" ;\n\n  RAISE NOTICE 'SHTO TABEL\u00cbN e d\u00ebrgesave';\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 'KRIJO N\u00cbN TABELAT P\u00cbR TABEL\u00cbN e d\u00ebrgesave';\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       --Kufij t\u00eb rinj vet\u00ebm p\u00ebr her\u00ebn e dyt\u00eb dhe m\u00eb pas \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;EMRI I INDICES =%&#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      --Hiq flag-un p\u00ebr her\u00eb t\u00eb par\u00eb\n      first_flag := false ;\n   \n  END LOOP;\n\nend\n$$;<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Importojm\u00eb dump-in<\/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>Kontrollojm\u00eb rezultatet e sekcionimit<\/h2>\n<p>\n\u00c7far\u00eb kemi si rezultat? Teksti i plot\u00eb i planit t\u00eb ekzekutimit \u00ebsht\u00eb i gjat\u00eb dhe i m\u00ebrzitsh\u00ebm, ndaj mund t\u00eb kufizohemi me numrat p\u00ebrfundimtar\u00eb.<\/p>\n<h3>Ishte<\/h3>\n<p>\n<b>Kosto:<\/b> 502 997.55<br \/>\n<b>Koha e ekzekutimit:<\/b> 505 sekonda.<\/p>\n<h3>Nisi<\/h3>\n<p>\n<b>Kosto:<\/b> 77 872.36<br \/>\n<b>Koha e ekzekutimit:<\/b> 79 sekonda.<\/p>\n<p>Nj\u00eb rezultat shum\u00eb i mir\u00eb. Ul\u00ebm kostot dhe koh\u00ebn e ekzekutimit. Prudja \u00ebsht\u00eb q\u00eb p\u00ebrdorimi i sekcionimit jep efektin e pritur dhe p\u00ebrgjith\u00ebsisht \u2014 pa surpriza. <\/p>\n<h2>T\u00eb g\u00ebzojm\u00eb klientin<\/h2>\n<p>\nRezultatet e testimit iu paraqit\u00ebn klientit p\u00ebr shqyrtim. Pas shqyrtimit, ata dhan\u00eb nj\u00eb verdikt t\u00eb papritur: \"Fantastike, sekciononi tabel\u00ebn 'data'.\u201d<\/p>\n<p>Po, por ne po shqyrtonim nj\u00eb tabel\u00eb krejt tjet\u00ebr, 'shipment', tabela 'data' nuk ka fush\u00ebn 'SHIPMENT_DATE'.<\/p>\n<p>Nuk ka problem, shtoni, ndryshoni. E r\u00ebnd\u00ebsishme \u00ebsht\u00eb q\u00eb klienti t\u00eb jet\u00eb i k\u00ebnaqur me rezultatin, detajet e realizimit nuk jan\u00eb aq t\u00eb r\u00ebnd\u00ebsishme.<\/p>\n<h2>Sekcionojm\u00eb tabel\u00ebn kryesore 'data'<\/h2>\n<p>\nN\u00eb p\u00ebrgjith\u00ebsi nuk kishte ndonj\u00eb v\u00ebshtir\u00ebsi t\u00eb ve\u00e7ant\u00eb. Megjithat\u00eb, algoritmi i sekcionimit p\u00ebrfundimisht pati disa ndryshime.<\/p>\n<p><b class=\"spoiler_title\">Shtojm\u00eb kolon\u00ebn 'SHIPMENT_DATA' n\u00eb tabel\u00ebn 'data'<\/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\">Popullojm\u00eb t\u00eb dh\u00ebnat e kolon\u00ebs 'SHIPMENT_DATA' n\u00eb tabel\u00ebn 'data', me vlerat e kolon\u00ebs s\u00eb nj\u00ebjt\u00eb nga tabela 'shipment'<\/b><\/p>\n<pre><code class=\"plaintext\">-----------------------------\n--update_data.sql\n--p\u00ebrdit\u00ebsim p\u00ebr tabel\u00ebn 'data' t\u00eb ndryshuar me vlerat e 'shipment_data' nga tabela 'shipment'\n--version 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 'Totali %',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 'Numri i rreshtave = % , nga %',row_count,total_rows;\n  END LOOP;\n\nend\n$$;<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Ruajm\u00eb dump-in e tabel\u00ebs 'data'<\/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<\/code><\/pre>\n<p><b class=\"spoiler_title\">Rikrijojm\u00eb tabel\u00ebn e sekcionuar 'data'<\/b><\/p>\n<pre><code class=\"plaintext\">--create_partition_data.sql\n--krijo parti p\u00ebr tabel\u00ebn \"t\u00eb dh\u00ebnat e wafer\" sipas koloneve n\u00eb \"dat\u00ebn e d\u00ebrges\u00ebs\" me nj\u00eb periudh\u00eb nj\u00eb mujor\n--version 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 'KRIJO TABEL\u00cb TEMPORARE P\u00cbR DAT\u00cbN E D\u00cbRGES\u00cbS';\n  CREATE TEMP TABLE tmp_shipment_date as select distinct \"SHIPMENT_DATE\" from shipment order by \"SHIPMENT_DATE\" ;\n\n\n  RAISE NOTICE 'FSHIJ TABEL\u00cbN data';\n  drop table data cascade ;\n\n\n  RAISE NOTICE 'KRIJO TABEL\u00cbN E PARTITIONUAR data';\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 'KRIJO PARTICIONET P\u00cbR TABEL\u00cbN data';\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      --Inicijalizo kufijt\u00eb\n      IF   begin_year = '0' THEN\n       RAISE NOTICE '***Inicijalizo kufijt\u00eb';\n       first_flag := true ; --flag p\u00ebr her\u00ebn e par\u00eb\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      -- Kontrollo dat\u00ebn e tanishme brenda kufijve, JO p\u00ebr her\u00ebn e par\u00eb\n\n      RAISE NOTICE 'T\u00eb dh\u00ebnat aktuale = %',to_char( to_date( current_year||'.'||current_month, 'YYYY.MM'), 'YYYY.MM');\n      RAISE NOTICE 'T\u00eb dh\u00ebnat fillestare = %',to_char( to_date( begin_year||'.'||begin_month, 'YYYY.MM'), 'YYYY.MM');\n      RAISE NOTICE 'T\u00eb dh\u00ebnat e ardhshme = %',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;***VAZHDO&#039;;\n         CONTINUE ; \n      ELSE\n       --Kufij t\u00eb rinj vet\u00ebm p\u00ebr her\u00ebn e dyt\u00eb e m\u00eb tep\u00ebr \n       RAISE NOTICE &#039;***KUFIJ T\u00cb RINJ&#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;NUMRI I PARTICIONIT % , EMRI I TABEL\u00cbS =%&#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;EMRI I INDEXIT =%&#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;EMRI I INDEXIT =%&#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;EMRI I INDEXIT =%&#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;EMRI I INDEXIT =%&#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;EMRI I INDEXIT =%&#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      --Fshij flagun e her\u00ebs s\u00eb par\u00eb\n      first_flag := false ;\n\n  END LOOP;\nend\n$$;\n<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Po ngarkohet dump-i i krijuar n\u00eb hapin 3.<\/b><\/p>\n<pre><code class=\"plaintext\">pg_restore -h host -u user -d database --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\">Krijojm\u00eb nj\u00eb seksion t\u00eb ve\u00e7ant\u00eb p\u00ebr t\u00eb dh\u00ebnat e vjetra<\/b><\/p>\n<pre><code class=\"plaintext\">---------------------------------------------------\n--create_partition_for_old_dates.sql\n--krijoni seksione p\u00ebr ruajtjen e datave t\u00eb vjetra \n--version 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 'Data e vjet\u00ebr \u00ebsht\u00eb %',rec_shipment_date.min_date ;\n\n      partition_name := 'data_old_dates'  ;\n\n      RAISE NOTICE 'EMRI I SEKSSIONIT \u00cbSHT\u00cb %',partition_name;\n\n      EXECUTE format('KRIJO TABEL\u00cbN ' || 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('KRIJO 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('KRIJO 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('KRIJO 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('KRIJO 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('KRIJO INDEX ' || quote_ident(index_name) || ' ON '|| quote_ident(partition_name) ||' USING btree (\"SHIPMENT_DATE\") TABLESPACE pg_default ' ) ; \n\nend\n$$;<\/code><\/pre>\n<h3>Rezultatet p\u00ebrfundimtare:<\/h3>\n<p>\n<b>Ishte<\/b><br \/>\n<b>Kosto:<\/b> 502 997.55<br \/>\n<b>Koha e ekzekutimit<\/b>: 505 sekonda.<\/p>\n<p><b>Nisi<\/b><br \/>\n<b>Kosto:<\/b> 68 533.70<br \/>\n<b>Koha e ekzekutimit:<\/b> 69 sekonda<\/p>\n<p>Rrall\u00eb, shum\u00eb rrall\u00eb. Dhe duke marr\u00eb parasysh se gjat\u00eb rrug\u00ebs arrit\u00ebm t\u00eb m\u00ebsojm\u00eb pak nga mekanizmi i seksionimit n\u00eb PostgreSQL 10 \u2014 Nj\u00eb rezultat i shk\u00eblqyer.<\/p>\n<h2>Nj\u00eb shp\u00ebrndarje lirik\u00eb<\/h2>\n<p>\n<b class=\"spoiler_title\">Por, mund t\u00eb b\u00ebjm\u00eb edhe m\u00eb mir\u00eb \u2014 PO, MUNDENI!<\/b>P\u00ebr k\u00ebt\u00eb duhen p\u00ebrdorur MATERIALIZED VIEW.<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>\nP\u00ebrs\u00ebri shkruajm\u00eb k\u00ebrkes\u00ebn:<br \/>\n<b class=\"spoiler_title\">K\u00ebrkesa me p\u00ebrdorimin e materialized view<\/b><\/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.\"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>Dhe k\u00ebshtu merrni nj\u00eb tjet\u00ebr rezultat:<\/b><br \/>\n<b>Ishte<\/b><br \/>\n<b>Kosto:<\/b> 502 997.55<br \/>\n<b>Koha e ekzekutimit<\/b>: 505 sekonda<\/p>\n<p><b>Nisi<\/b><br \/>\n<b>Kosto:<\/b> 42 481.16<br \/>\n<b>Koha e ekzekutimit:<\/b> 43 sekonda.<\/p>\n<p>Megjithat\u00eb, kjo rezultat q\u00eb premton aq shum\u00eb \u00ebsht\u00eb i mashtuar, sepse prezantimet duhet t\u00eb rifreskohen. Pra, koha p\u00ebrfundimtare p\u00ebr marrjen e t\u00eb dh\u00ebnave nuk ndihmon shum\u00eb. Por p\u00ebr eksperimente \u00ebsht\u00eb mjaft interesante.<\/p>\n<p>N\u00eb t\u00eb v\u00ebrtet\u00eb, si\u00e7 doli, faleminderit p\u00ebrs\u00ebri <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/asmm\/\" class=\"user_link\">asmm<\/a><\/noindex> dhe Habr! - <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/icl_services\/blog\/446314\/#comment_19973236\">k\u00ebrkesa mund t\u00eb p\u00ebrmir\u00ebsohet m\u00eb tej. <\/a><\/noindex><\/p>\n<h2>Pasth\u00ebnie<\/h2>\n<p>\nPra, klienti \u00ebsht\u00eb i k\u00ebnaqur. Dhe <b>nevojitet <\/b>t\u00eb shfryt\u00ebzojm\u00eb situat\u00ebn. <\/p>\n<p><b>Detyr\u00eb e re<\/b>: \u00c7far\u00eb mund t\u00eb krijojm\u00eb p\u00ebr t\u00eb thelluar dhe zgjeruar?<\/p>\n<p>Dhe k\u00ebtu kujtojm\u00eb \u2014 djem, nuk kemi monitorimin e bazave tona t\u00eb t\u00eb dh\u00ebnave PostgreSQL.<\/p>\n<p>Me dor\u00eb n\u00eb zem\u00ebr, ka nj\u00eb monitorim n\u00eb form\u00ebn e Cloud Watch n\u00eb AWS. Por \u00e7far\u00eb dobi na sjell ky monitorim p\u00ebr DBA? N\u00eb thelb, pothuajse asgj\u00eb.<\/p>\n<p><b>N\u00ebse shfaqet mund\u00ebsia p\u00ebr t\u00eb b\u00ebr\u00eb di\u00e7ka t\u00eb dobishme dhe interesante p\u00ebr veten, nuk duhet ta humbim k\u00ebt\u00eb mund\u00ebsi...<br \/>\nSE<br \/>\n<\/b><br \/>\n<img decoding=\"async\" alt=\"Happy Party ose disa rreshta kujtimesh p\u00ebr njohjen me seksionimin n\u00eb PostgreSQL10\" src=\"\/wp-content\/uploads\/2019\/04\/e514664a4a46f5379c51f57f24481746.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nK\u00ebshtu erdh\u00ebm n\u00eb m\u00eb t\u00eb r\u00ebnd\u00ebsishmen:<\/p>\n<blockquote><p><b>3 Dhjetor 2018.<\/b><br \/>\nMarrja e vendimit p\u00ebr fillimin e pun\u00ebve p\u00ebr hulumtimin e mund\u00ebsive aktuale t\u00eb monitorimit t\u00eb performanc\u00ebs s\u00eb k\u00ebrkesave PostgreSQL.\n<\/p><\/blockquote>\n<p><b>Por kjo \u00ebsht\u00eb nj\u00eb histori krejt tjet\u00ebr.<\/b><\/p>\n<p><i>Vijon&#8230;<\/i><br \/>\n<br \/>Burimi: <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.0.1 - 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. \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 &#039;\u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442&#039;, \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043a\u0430\u043a\" \/>\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\/sq\/blog\/administrirovanie\/happy-party-ili-para-strok-vospominanij-o-znakomstve-s-sektsionirovaniem-v-postgresql10\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\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. \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 &#039;\u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442&#039;, \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043a\u0430\u043a\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/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\udd47Partia e Lumtur ose disa rreshta kujtimesh p\u00ebr njohjen me seksionimin n\u00eb PostgreSQL10 | ProHoster","description":"Parath\u00ebnie ose si lindi ideja e seksionimit Fillimi i historis\u00eb k\u00ebtu: A e mbani mend si filloi gjith\u00e7ka. E gjitha ishte p\u00ebr her\u00eb t\u00eb par\u00eb dhe p\u00ebrs\u00ebri. Pasi pothuajse t\u00eb gjith\u00eb burimet p\u00ebr optimizimin e k\u00ebrkes\u00ebs, n\u00eb at\u00eb koh\u00eb, ishin shteruar, u shfaq pyetja \u2014 \u00e7far\u00eb do t\u00eb ndodhte m\u00eb pas? K\u00ebshtu lindi ideja e seksionimit. Nj\u00eb shpjegim liriko: Pik\u00ebrisht 'n\u00eb at\u00eb koh\u00eb', sepse si","canonical_url":"https:\/\/prohoster.info\/sq\/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":"sq_AL","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. \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 '\u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442', \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043a\u0430\u043a","og:url":"https:\/\/prohoster.info\/sq\/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\/sq\/wp-json\/wp\/v2\/posts\/31905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=31905"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/31905\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/23765"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=31905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=31905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=31905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}