{"id":37975,"date":"2019-10-31T22:20:56","date_gmt":"2019-10-31T19:20:56","guid":{"rendered":"https:\/\/prohoster.info\/blog\/apgrejd-dlya-lenivyh-kak-postgresql-12-povyshaet-proizvoditelnost\/"},"modified":"2019-10-31T22:20:56","modified_gmt":"2019-10-31T19:20:56","slug":"apgrejd-dlya-lenivyh-kak-postgresql-12-povyshaet-proizvoditelnost","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/apgrejd-dlya-lenivyh-kak-postgresql-12-povyshaet-proizvoditelnost","title":{"rendered":"Upgrade p\u00ebr leni: si PostgreSQL 12 rrit produktivitetin","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Upgrade p\u00ebr leni: si PostgreSQL 12 rrit produktivitetin\" src=\"\/wp-content\/uploads\/2019\/09\/59721c53412b5932a332bd6c687650e8.JPG\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/www.postgresql.org\/\">PostgreSQL 12<\/a><\/noindex>, versioni m\u00eb e fundit e \"baz\u00ebs s\u00eb t\u00eb dh\u00ebnave relacionale m\u00eb t\u00eb mir\u00eb n\u00eb bot\u00eb me burim t\u00eb hapur\" pritet t\u00eb dal\u00eb brenda disa jav\u00ebsh (n\u00ebse gjith\u00e7ka shkon sipas planit). Kjo \u00ebsht\u00eb n\u00eb p\u00ebrputhje me grafikun e zakonsh\u00ebm \u2014 nj\u00eb version i ri me shum\u00eb mund\u00ebsi t\u00eb reja del \u00e7do vit, dhe, p\u00ebr t'u th\u00ebn\u00eb t\u00eb drejt\u00ebn, kjo \u00ebsht\u00eb mbres\u00ebl\u00ebn\u00ebse. Prandaj, un\u00eb u b\u00ebra an\u00ebtar aktiv i komunitetit PostgreSQL.<\/p>\n<p><\/p>\n<p>Sipas mendimit tim, ndryshe nga versionet e kaluara, PostgreSQL 12 nuk ka nj\u00eb ose dy funksione revolucionare (si\u00e7 ishin ndarjet ose paralelizmi i k\u00ebrkesave). Kam b\u00ebr\u00eb nj\u00eb shaka se ve\u00e7oria kryesore e PostgreSQL 12 \u00ebsht\u00eb stabiliteti i p\u00ebrmir\u00ebsuar. A nuk \u00ebsht\u00eb kjo ajo q\u00eb na nevojitet kur menaxhojm\u00eb t\u00eb dh\u00ebna kritik\u00eb p\u00ebr biznesin tuaj?<\/p>\n<p><\/p>\n<p>Por PostgreSQL 12 nuk ndalet k\u00ebtu: me mund\u00ebsi dhe p\u00ebrmir\u00ebsime t\u00eb reja, aplikacionet do t\u00eb funksionojn\u00eb m\u00eb mir\u00eb, <em>dhe ju nevojitet vet\u00ebm nj\u00eb p\u00ebrmir\u00ebsim!<\/em><\/p>\n<p><\/p>\n<p>(Epo, ndoshta edhe ndonj\u00eb indeks t\u00eb ri, por n\u00eb k\u00ebt\u00eb version kjo nuk \u00ebsht\u00eb aq e frikshme si\u00e7 jemi m\u00ebsuar.)<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>Do t\u00eb jet\u00eb fantastike t\u00eb p\u00ebrmir\u00ebsojm\u00eb PostgreSQL dhe menj\u00ebher\u00eb t\u00eb shijojm\u00eb p\u00ebrmir\u00ebsime t\u00eb m\u00ebdha pa shum\u00eb shqet\u00ebsime. Disa vjet m\u00eb par\u00eb analizova p\u00ebrdit\u00ebsimin nga PostgreSQL 9.4 n\u00eb PostgreSQL 10 dhe pash\u00eb se si aplikacioni u p\u00ebrshpejtua p\u00ebr shkak t\u00eb p\u00ebrmir\u00ebsimit t\u00eb paralelizmit t\u00eb k\u00ebrkesave n\u00eb PostgreSQL 10. Dhe, m\u00eb e r\u00ebnd\u00ebsishmja, nga un\u00eb k\u00ebrkohej pothuajse asgj\u00eb (vet\u00ebm t\u00eb vendosja parametrin e konfigurimit <code>max_parallel_workers<\/code>).<\/p>\n<p><\/p>\n<p>Pranoni se \u00ebsht\u00eb e rehatshme kur menj\u00ebher\u00eb pas p\u00ebrmir\u00ebsimit aplikacionet funksionojn\u00eb m\u00eb mir\u00eb. Ne punojm\u00eb shum\u00eb p\u00ebr t\u00eb k\u00ebnaqur p\u00ebrdoruesit, pasi PostgreSQL ka gjithnj\u00eb e m\u00eb shum\u00eb t\u00eb till\u00eb.<\/p>\n<p><\/p>\n<p>Dhe si pap\u00ebrmir\u00ebsimi i thjesht\u00eb n\u00eb PostgreSQL 12 do t'ju b\u00ebj\u00eb t\u00eb lumtur? Tani do ta shpjegoj.<\/p>\n<p><\/p>\n<h3 id=\"sereznye-uluchsheniya-indeksirovaniya\">P\u00ebrmir\u00ebsime t\u00eb r\u00ebnd\u00ebsishme n\u00eb indeksim<\/h3>\n<p><\/p>\n<p>Pa indeksim, nj\u00eb baz\u00eb t\u00eb dh\u00ebnash nuk do t\u00eb arrij\u00eb shum\u00eb larg. Si mund t\u00eb gjejm\u00eb informacionin shpejt? Sistemi themelor i indeksimit n\u00eb PostgreSQL quhet <noindex><a rel=\"nofollow\" href=\"https:\/\/en.wikipedia.org\/wiki\/B-tree\">B-tree<\/a><\/noindex>. Ky lloj indeksi \u00ebsht\u00eb optimizuar p\u00ebr sistemet e ruajtjes.<\/p>\n<p><\/p>\n<p>Thjesht p\u00ebrdorim operatorin <code>CREATE INDEX ON some_table (some_column)<\/code>, dhe PostgreSQL b\u00ebn shum\u00eb pun\u00eb p\u00ebr t\u00eb mbajtur indeksin t\u00eb azhurnuar gjat\u00eb gjith\u00eb koh\u00ebs q\u00eb ne vazhdimisht futim, azhurnojm\u00eb dhe fshijm\u00eb vlera. T\u00eb gjitha funksionon vet\u00eb, si me magji.<\/p>\n<p><\/p>\n<p>Por indekset e PostgreSQL kan\u00eb nj\u00eb problem \u2014 ato <noindex><a rel=\"nofollow\" href=\"https:\/\/info.crunchydata.com\/blog\/checking-for-postgresql-bloat\">shkaktojn\u00eb fryrje<\/a><\/noindex> dhe z\u00ebn\u00eb hap\u00ebsir\u00eb t\u00eb tep\u00ebrt n\u00eb disk, \u00e7ka ul performanc\u00ebn e nxjerrjes dhe p\u00ebrdit\u00ebsimit t\u00eb t\u00eb dh\u00ebnave. N\u00ebn \"fryrje\" kuptoj nj\u00eb mbajtje t\u00eb paefektshme t\u00eb struktur\u00ebs s\u00eb indeksit. Kjo mund t\u00eb lidhet me tuprat e mbeturina, q\u00eb fshihen nga <noindex><a rel=\"nofollow\" href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-vacuum.html\">VACUUM<\/a><\/noindex> (faleminderit p\u00ebr informacionin Peter Geoghegan (<noindex><a rel=\"nofollow\" href=\"https:\/\/twitter.com\/petervgeoghegan\">Peter Geoghegan<\/a><\/noindex>)). Fryrja e indeksit \u00ebsht\u00eb ve\u00e7an\u00ebrisht e dukshme n\u00eb ngarkesat e pun\u00ebs ku indeksi ndryshohet aktivisht.<\/p>\n<p><\/p>\n<p>PostgreSQL 12 p\u00ebrmir\u00ebson ndjesh\u00ebm performanc\u00ebn e indekseve B-tree, dhe eksperimentet me testet si TPC-C kan\u00eb treguar se tani p\u00ebrdoret, mesatarisht, 40% m\u00eb pak hap\u00ebsir\u00eb. Tani ne shpenzojm\u00eb m\u00eb pak koh\u00eb jo vet\u00ebm n\u00eb mir\u00ebmbajtjen e indekseve B-tree (d.m.th., operacionet e shkruar), por edhe n\u00eb nxjerrjen e t\u00eb dh\u00ebnave, pasi indekset jan\u00eb b\u00ebr\u00eb shum\u00eb m\u00eb t\u00eb vogla.<\/p>\n<p><\/p>\n<p>Aplikacionet q\u00eb p\u00ebrdit\u00ebsojn\u00eb aktivisht tabelat e tyre \u2014 zakonisht k\u00ebto jan\u00eb aplikacione OLTP (<noindex><a rel=\"nofollow\" href=\"https:\/\/en.wikipedia.org\/wiki\/Online_transaction_processing\">p\u00ebrpunimi i transaksioneve n\u00eb koh\u00eb reale<\/a><\/noindex>) \u2014 do t\u00eb p\u00ebrdorin disku m\u00eb efektivisht dhe do t\u00eb p\u00ebrpunojn\u00eb k\u00ebrkesat. Sa m\u00eb shum\u00eb hap\u00ebsir\u00eb q\u00eb t\u00eb ket\u00eb n\u00eb disk, aq m\u00eb shum\u00eb hap\u00ebsir\u00eb ka baza e t\u00eb dh\u00ebnave p\u00ebr rritje pa p\u00ebrmir\u00ebsimin e infrastruktur\u00ebs.<\/p>\n<p><\/p>\n<p>Disa strategji p\u00ebrmir\u00ebsimi k\u00ebrkojn\u00eb t\u00eb rind\u00ebrtojm\u00eb indet B-tree p\u00ebr t\u00eb shfryt\u00ebzuar k\u00ebto p\u00ebrfitime (p.sh., <noindex><a rel=\"nofollow\" href=\"https:\/\/www.postgresql.org\/docs\/current\/pgupgrade.html\">pg_upgrade<\/a><\/noindex> nuk do t'i rind\u00ebrtoj\u00eb indet automatikisht). N\u00eb versionet e kaluara t\u00eb PostgreSQL, rind\u00ebrtimi i indekseve t\u00eb m\u00ebdha n\u00eb tabela shkaktonte nj\u00eb ndalim t\u00eb madh, pasi n\u00eb k\u00ebt\u00eb koh\u00eb nuk mund t\u00eb b\u00ebnim ndryshime. Por n\u00eb PostgreSQL 12 ka nj\u00eb ve\u00e7ori tjet\u00ebr t\u00eb shk\u00eblqyer: tani mund t\u00eb rind\u00ebrtojm\u00eb indet paralelisht me komand\u00ebn <noindex><a rel=\"nofollow\" href=\"https:\/\/www.postgresql.org\/docs\/12\/sql-reindex.html\">REINDEX CONCURRENTLY<\/a><\/noindex>, p\u00ebr t\u00eb shmangur ndalesat krejt\u00ebsisht.<\/p>\n<p><\/p>\n<p>N\u00eb PostgreSQL 12 ka gjithashtu p\u00ebrmir\u00ebsime t\u00eb tjera n\u00eb infrastruktur\u00ebn e indeksimit. Nj\u00eb tjet\u00ebr element ku nuk kishte munges\u00eb t\u00eb magjis\u00eb \u00ebsht\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/www.postgresql.org\/docs\/current\/wal-intro.html\">jurnali i regjistrimit t\u00eb parakohsh\u00ebm<\/a><\/noindex>, i njohur si WAL (write-ahead log). Jurnali i regjistrimit t\u00eb parakohsh\u00ebm regjistron \u00e7do transaksion n\u00eb PostgreSQL n\u00eb rast d\u00ebshtimi dhe replikimi. Aplikacionet e p\u00ebrdorin at\u00eb p\u00ebr arkivimin dhe <noindex><a rel=\"nofollow\" href=\"https:\/\/info.crunchydata.com\/blog\/pgbackrest-point-in-time-recovery-using-crunchy-postgresql-operator\">rishtimin n\u00eb nj\u00eb moment t\u00eb caktuar<\/a><\/noindex>. Sigurisht, jurnali i regjistrimit t\u00eb parakohsh\u00ebm shkruhet n\u00eb disk, dhe kjo mund t\u00eb ket\u00eb nj\u00eb ndikim n\u00eb performanc\u00ebn.<\/p>\n<p><\/p>\n<p>N\u00eb PostgreSQL 12, kostot e regjistrimeve WAL, t\u00eb cilat krijohen nga indekset GiST, GIN dhe SP-GiST gjat\u00eb nd\u00ebrtimit t\u00eb indeksit, jan\u00eb reduktuar. Kjo ofron disa p\u00ebrfitime t\u00eb dukshme: regjistrimet WAL z\u00ebn\u00eb m\u00eb pak hap\u00ebsir\u00eb n\u00eb disk, dhe t\u00eb dh\u00ebnat riprodhohen m\u00eb shpejt, p\u00ebr shembull, gjat\u00eb rikuperimit pas nj\u00eb d\u00ebshtimi ose rikuperimit n\u00eb nj\u00eb moment t\u00eb caktuar. N\u00ebse p\u00ebrdorni k\u00ebto indekse n\u00eb aplikacionet tuaja (p.sh., aplikacionet gjeoprostranore q\u00eb bazohen n\u00eb PostGIS p\u00ebrdorin shum\u00eb indeksin GiST), kjo \u00ebsht\u00eb nj\u00eb tjet\u00ebr ve\u00e7ori q\u00eb do t\u00eb p\u00ebrmir\u00ebsoj\u00eb duksh\u00ebm performanc\u00ebn pa ndonj\u00eb p\u00ebrpjekje nga ana juaj.<\/p>\n<p><\/p>\n<h3 id=\"sekcionirovanie--bolshe-luchshe-bystree\">Segmentimi \u2014 m\u00eb shum\u00eb, m\u00eb mir\u00eb, m\u00eb shpejt<\/h3>\n<p><\/p>\n<p>N\u00eb PostgreSQL 10 u prezantua <noindex><a rel=\"nofollow\" href=\"https:\/\/www.postgresql.org\/docs\/current\/ddl-partitioning.html\">segmentimi deklarativ<\/a><\/noindex>. N\u00eb PostgreSQL 11, p\u00ebrdorimi i tij u b\u00eb shum\u00eb m\u00eb i leht\u00eb. N\u00eb PostgreSQL 12 mund t\u00eb ndryshoni shkall\u00ebn e segmenteve.<\/p>\n<p><\/p>\n<p>N\u00eb PostgreSQL 12, performanca e sistemit t\u00eb segmentimit \u00ebsht\u00eb p\u00ebrmir\u00ebsuar ndjesh\u00ebm, ve\u00e7an\u00ebrisht kur tabela ka mij\u00ebra segmente. P\u00ebr shembull, n\u00ebse nj\u00eb k\u00ebrkes\u00eb p\u00ebrfshin vet\u00ebm disa segmente n\u00eb nj\u00eb tabel\u00eb q\u00eb ka mij\u00ebra, ajo do t\u00eb ekzekutohet shum\u00eb m\u00eb shpejt. Performanca \u00ebsht\u00eb p\u00ebrmir\u00ebsuar jo vet\u00ebm p\u00ebr k\u00ebt\u00eb lloj k\u00ebrkese. Ju gjithashtu do t\u00eb v\u00ebreni se operacionet INSERT n\u00eb tabelat me shum\u00eb segmente jan\u00eb p\u00ebrshpejtuar.<\/p>\n<p><\/p>\n<p>Shkarkimi i t\u00eb dh\u00ebnave me <noindex><a rel=\"nofollow\" href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-copy.html\">COPY<\/a><\/noindex> \u2014 p\u00ebr ta th\u00ebn\u00eb, \u00ebsht\u00eb nj\u00eb m\u00ebnyr\u00eb e shk\u00eblqyer <noindex><a rel=\"nofollow\" href=\"https:\/\/info.crunchydata.com\/blog\/fast-csv-and-json-ingestion-in-postgresql-with-copy\">p\u00ebr ngarkimin masiv t\u00eb t\u00eb dh\u00ebnave<\/a><\/noindex> dhe ja nj\u00eb shembull <noindex><a rel=\"nofollow\" href=\"https:\/\/info.crunchydata.com\/blog\/fast-csv-and-json-ingestion-in-postgresql-with-copy\">i trajtimit JSON<\/a><\/noindex> \u2014 n\u00eb tabelat e segmentuara n\u00eb PostgreSQL 12 gjithashtu \u00ebsht\u00eb b\u00ebr\u00eb m\u00eb efektive. Me COPY gjith\u00e7ka ishte e shpejt\u00eb, dhe n\u00eb PostgreSQL 12 po fluturon.<\/p>\n<p><\/p>\n<p>Fal\u00eb k\u00ebtyre avantazheve, n\u00eb PostgreSQL mund t\u00eb ruani grupe t\u00eb dh\u00ebnash edhe m\u00eb t\u00eb m\u00ebdha, dhe ka b\u00ebr\u00eb q\u00eb nxjerrja e tyre t\u00eb jet\u00eb m\u00eb e leht\u00eb. Dhe pa ndonj\u00eb p\u00ebrpjekje nga ana juaj. N\u00ebse aplikacioni ka shum\u00eb segmente, p\u00ebr shembull, n\u00ebse regjistron t\u00eb dh\u00ebna t\u00eb serive kohore, nj\u00eb p\u00ebrmir\u00ebsim i thjesht\u00eb do t\u00eb rris\u00eb ndjesh\u00ebm performanc\u00ebn e tij.<\/p>\n<p><\/p>\n<p>Edhe pse ky p\u00ebrmir\u00ebsim nuk \u00ebsht\u00eb krejt\u00ebsisht n\u00eb kategorin\u00eb \"e p\u00ebrmir\u00ebsuam dhe g\u00ebzohemi\", n\u00eb PostgreSQL 12 mund t\u00eb krijoni \u00e7el\u00ebsa t\u00eb jasht\u00ebm q\u00eb referohen n\u00eb tabela t\u00eb segmentuara, duke e b\u00ebr\u00eb pun\u00ebn me segmentimin nj\u00eb k\u00ebnaq\u00ebsi.<\/p>\n<p><\/p>\n<h3 id=\"zaprosy-with-stali-gorazdo-luchshe\">K\u00ebrkesat WITH jan\u00eb b\u00ebr\u00eb shum\u00eb m\u00eb t\u00eb mira<\/h3>\n<p><\/p>\n<p>Kur <noindex><a rel=\"nofollow\" href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commitdiff;h=608b167f9f9c4553c35bb1ec0eab9ddae643989b\">u aplikua nj\u00eb patch p\u00ebr shprehjet e p\u00ebrgjithshme t\u00eb brendshme t\u00eb tabelave<\/a><\/noindex> (ato q\u00eb njihen si CTE, ato q\u00eb njihen si k\u00ebrkesat WITH), nuk mund t\u00eb prisja t\u00eb shkruaja nj\u00eb artikull p\u00ebr at\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/info.crunchydata.com\/blog\/with-queries-present-future-common-table-expressions\">se si u g\u00ebzuan zhvilluesit e aplikacioneve me PostgreSQL<\/a><\/noindex>. Kjo \u00ebsht\u00eb nj\u00eb nga ato ve\u00e7ori q\u00eb do t\u00eb p\u00ebrshpejtoj\u00eb aplikacionin. N\u00ebse, sigurisht, p\u00ebrdorni CTE.<\/p>\n<p><\/p>\n<p>Shum\u00eb shpesh v\u00eb re se fillestar\u00ebt n\u00eb SQL p\u00eblqejn\u00eb t\u00eb p\u00ebrdorin CTE: n\u00ebse i shkruani ata nj\u00eb m\u00ebnyr\u00eb t\u00eb caktuar, ndiheni sikur po shkruani nj\u00eb program imperativ. Personalisht, m\u00eb p\u00eblqente t\u00eb riprogramoja k\u00ebto k\u00ebrkesa p\u00ebr t'i kaluar <em>pa<\/em> CTE dhe p\u00ebr t\u00eb rritur performanc\u00ebn. Tani gjith\u00e7ka \u00ebsht\u00eb ndryshe.<\/p>\n<p><\/p>\n<p>PostgreSQL 12 lejon t\u00eb inkorporoni nj\u00eb tip t\u00eb caktuar CTE pa efekte an\u00ebsore (<code>SELECT<\/code>), e cila p\u00ebrdoret vet\u00ebm nj\u00eb her\u00eb af\u00ebr fundit t\u00eb k\u00ebrkes\u00ebs. N\u00ebse do t\u00eb mbaja statistika t\u00eb k\u00ebrkesave me CTE, shumica e tyre do t\u00eb ishin n\u00eb k\u00ebt\u00eb kategori. Kjo ndihmon zhvilluesit t\u00eb shkruajn\u00eb kod t\u00eb kuptuesh\u00ebm, i cili tani gjithashtu funksionon shpejt.<\/p>\n<p><\/p>\n<p>P\u00ebr m\u00eb tep\u00ebr, PostgreSQL 12 optimizon ekzekutimin e SQL vet\u00eb, ju nuk do t\u00eb duhet t\u00eb b\u00ebni asgj\u00eb. Dhe ndon\u00ebse tani, ndoshta, nuk do t\u00eb kem nevoj\u00eb t\u00eb optimizoj k\u00ebto k\u00ebrkesa, \u00ebsht\u00eb e shk\u00eblqyer q\u00eb PostgreSQL vazhdon t\u00eb punoj\u00eb n\u00eb optimizimin e k\u00ebrkesave.<\/p>\n<p><\/p>\n<h3 id=\"just-in-time-jit--teper-po-umolchaniyu\">Just-in-Time (JIT) \u2014 tani si parazgjedhje<\/h3>\n<p><\/p>\n<p>N\u00eb sistemet PostgreSQL 12 me mb\u00ebshtetje p\u00ebr <noindex><a rel=\"nofollow\" href=\"https:\/\/llvm.org\/\">LLVM<\/a><\/noindex> JIT-kompilimin \u00ebsht\u00eb aktivizuar si parazgjedhje. S\u00eb pari, merrni mb\u00ebshtetje p\u00ebr <noindex><a rel=\"nofollow\" href=\"https:\/\/www.postgresql.org\/docs\/current\/jit.html\">JIT<\/a><\/noindex> p\u00ebr disa operacione t\u00eb brendshme, dhe s\u00eb dyti, k\u00ebrkesat me shprehjet (shembulli m\u00eb i thjesht\u00eb \u2014 x + y) n\u00eb listat e zgjedhjes (t\u00eb cilat keni pasur pas SELECT), agregat, shprehje me propozitat WHERE dhe t\u00eb tjera mund t\u00eb p\u00ebrdorin JIT p\u00ebr t\u00eb rritur performanc\u00ebn.<\/p>\n<p><\/p>\n<p>Duke pasur parasysh se JIT \u00ebsht\u00eb aktivizuar n\u00eb PostgreSQL 12 si parazgjedhje, performanca do t\u00eb p\u00ebrmir\u00ebsohet vetvetiu, por ju rekomandoj t\u00eb testoni aplikacionin n\u00eb PostgreSQL 11, ku JIT sapo ishte introduktuar, p\u00ebr t\u00eb matur performanc\u00ebn e k\u00ebrkesave dhe p\u00ebr t\u00eb par\u00eb n\u00ebse duhet t\u00eb b\u00ebni ndonj\u00eb konfigurim.<\/p>\n<p><\/p>\n<h3 id=\"a-kak-zhe-ostalnye-novye-fichi-postgresql-12\">Por \u00e7far\u00eb ndodh me ve\u00e7orit\u00eb e tjera t\u00eb reja t\u00eb PostgreSQL 12?<\/h3>\n<p><\/p>\n<p>N\u00eb PostgreSQL 12 ka nj\u00eb mori ve\u00e7orish t\u00eb reja t\u00eb shk\u00eblqyera \u2014 nga mund\u00ebsia p\u00ebr t\u00eb k\u00ebrkuar t\u00eb dh\u00ebnat JSON duke p\u00ebrdorur shprehjet standarde t\u00eb rrug\u00ebs SQL\/JSON deri te autentifikimi shum\u00eb-faktor\u00ebsh me parametrin <code>clientcert=verify-full<\/code>, kolona t\u00eb krijuara dhe shum\u00eb t\u00eb tjera. Mjafton p\u00ebr nj\u00eb post t\u00eb ve\u00e7ant\u00eb.<\/p>\n<p><\/p>\n<p>Ashtu si PostgreSQL 10, PostgreSQL 12 do t\u00eb rris\u00eb performanc\u00ebn e p\u00ebrgjithshme menj\u00ebher\u00eb pas p\u00ebrmir\u00ebsimit. Sigurisht, mund t\u00eb keni rrug\u00ebn tuaj \u2014 testoni aplikacionin n\u00ebn kushte t\u00eb ngjashme n\u00eb sistemin e pun\u00ebs, para se t\u00eb aktivizoni p\u00ebrmir\u00ebsimet, si\u00e7 kam b\u00ebr\u00eb un\u00eb me PostgreSQL 10. Edhe n\u00ebse PostgreSQL 12 tashm\u00eb \u00ebsht\u00eb m\u00eb i q\u00ebndruesh\u00ebm se sa kisha parashikuar, mos u leni pas t\u00eb testoni aplikacionet p\u00ebrpara se t'i l\u00ebshoni n\u00eb prodhim.<\/p>\n<p>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/southbridge\/blog\/466727\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>PostgreSQL 12, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u00ab\u043b\u0443\u0447\u0448\u0435\u0439 \u0432 \u043c\u0438\u0440\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c\u00bb, \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443-\u0442\u0440\u043e\u0439\u043a\u0443 \u043d\u0435\u0434\u0435\u043b\u044c (\u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u043f\u043e \u043f\u043b\u0430\u043d\u0443). \u042d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u2014 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u0443\u0439\u043c\u043e\u0439 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0437 \u0432 \u0433\u043e\u0434, \u0438, \u0447\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u0441\u0442\u0430\u043b \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0447\u043b\u0435\u043d\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 PostgreSQL. \u041f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":28500,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-37975","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=\"PostgreSQL 12, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u00ab\u043b\u0443\u0447\u0448\u0435\u0439 \u0432 \u043c\u0438\u0440\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c\u00bb, \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443-\u0442\u0440\u043e\u0439\u043a\u0443 \u043d\u0435\u0434\u0435\u043b\u044c (\u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u043f\u043e \u043f\u043b\u0430\u043d\u0443). \u042d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u2014 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u0443\u0439\u043c\u043e\u0439 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0437 \u0432 \u0433\u043e\u0434, \u0438, \u0447\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u0441\u0442\u0430\u043b \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0447\u043b\u0435\u043d\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 PostgreSQL. \u041f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442\" \/>\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\/apgrejd-dlya-lenivyh-kak-postgresql-12-povyshaet-proizvoditelnost\" \/>\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\udd47\u0410\u043f\u0433\u0440\u0435\u0439\u0434 \u0434\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u044b\u0445: \u043a\u0430\u043a PostgreSQL 12 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"PostgreSQL 12, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u00ab\u043b\u0443\u0447\u0448\u0435\u0439 \u0432 \u043c\u0438\u0440\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c\u00bb, \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443-\u0442\u0440\u043e\u0439\u043a\u0443 \u043d\u0435\u0434\u0435\u043b\u044c (\u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u043f\u043e \u043f\u043b\u0430\u043d\u0443). \u042d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u2014 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u0443\u0439\u043c\u043e\u0439 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0437 \u0432 \u0433\u043e\u0434, \u0438, \u0447\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u0441\u0442\u0430\u043b \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0447\u043b\u0435\u043d\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 PostgreSQL. \u041f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/apgrejd-dlya-lenivyh-kak-postgresql-12-povyshaet-proizvoditelnost\" \/>\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-31T19:20:56+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:20:56+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\udd47P\u00ebrmir\u00ebsimi p\u00ebr lenient\u00ebt: si PostgreSQL 12 rrit performanc\u00ebn | ProHoster","description":"PostgreSQL 12, versioni e fundit \"e databaz\u00ebs relacional m\u00eb t\u00eb mir\u00eb n\u00eb bot\u00eb me kod burim t\u00eb hapur\", do t\u00eb dal\u00eb brenda disa jav\u00ebsh (n\u00ebse gjith\u00e7ka shkon si\u00e7 duhet). Kjo p\u00ebrputhet me grafik\u00ebt e zakonsh\u00ebm - nj\u00eb version i ri me shum\u00eb mund\u00ebsi t\u00eb reja del \u00e7do vit, dhe, p\u00ebr ta th\u00ebn\u00eb sinqerisht, kjo \u00ebsht\u00eb mbres\u00ebl\u00ebn\u00ebse. Prandaj, u b\u00ebra an\u00ebtar aktiv i komunitetit PostgreSQL. Sipas mendimit tim, ndryshe nga","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/apgrejd-dlya-lenivyh-kak-postgresql-12-povyshaet-proizvoditelnost","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\udd47\u0410\u043f\u0433\u0440\u0435\u0439\u0434 \u0434\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u044b\u0445: \u043a\u0430\u043a PostgreSQL 12 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c | ProHoster","og:description":"PostgreSQL 12, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u00ab\u043b\u0443\u0447\u0448\u0435\u0439 \u0432 \u043c\u0438\u0440\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c\u00bb, \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443-\u0442\u0440\u043e\u0439\u043a\u0443 \u043d\u0435\u0434\u0435\u043b\u044c (\u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u043f\u043e \u043f\u043b\u0430\u043d\u0443). \u042d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u2014 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u0443\u0439\u043c\u043e\u0439 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0437 \u0432 \u0433\u043e\u0434, \u0438, \u0447\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u0441\u0442\u0430\u043b \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0447\u043b\u0435\u043d\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 PostgreSQL. \u041f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/apgrejd-dlya-lenivyh-kak-postgresql-12-povyshaet-proizvoditelnost","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-31T19:20:56+00:00","article:modified_time":"2019-10-31T19:20:56+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"37975","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-23 19:59:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:17:22","updated":"2026-01-23 19:59: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\/37975","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=37975"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/37975\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/28500"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=37975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=37975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=37975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}