{"id":89498,"date":"2020-07-23T13:42:07","date_gmt":"2020-07-23T11:42:07","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/testirovanie-proizvoditelnosti-analiticheskih-zaprosov-v-postgresql-clickhouse-i-clickhousedb_fdw-postgresql"},"modified":"2020-07-23T13:42:07","modified_gmt":"2020-07-23T11:42:07","slug":"testirovanie-proizvoditelnosti-analiticheskih-zaprosov-v-postgresql-clickhouse-i-clickhousedb_fdw-postgresql","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/testirovanie-proizvoditelnosti-analiticheskih-zaprosov-v-postgresql-clickhouse-i-clickhousedb_fdw-postgresql","title":{"rendered":"Testimi i performanc\u00ebs s\u00eb k\u00ebrkesave analitike n\u00eb PostgreSQL, ClickHouse dhe clickhousedb_fdw (PostgreSQL)","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>N\u00eb k\u00ebt\u00eb studim, doja t\u00eb shqyrtoja se cilat p\u00ebrmir\u00ebsime t\u00eb performanc\u00ebs mund t\u00eb arrihen duke p\u00ebrdorur burimin e t\u00eb dh\u00ebnave ClickHouse, n\u00eb vend t\u00eb PostgreSQL. E di se cilat jan\u00eb avantazhet e performanc\u00ebs q\u00eb kam duke p\u00ebrdorur ClickHouse. A do t\u00eb ruhet kjo p\u00ebrpar\u00ebsi n\u00ebse accessohem n\u00eb ClickHouse nga PostgreSQL p\u00ebrmes nj\u00eb mbuloj\u00ebs t\u00eb jashtme t\u00eb t\u00eb dh\u00ebnave (FDW)? <\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>Mjediset e studiuara t\u00eb bazave t\u00eb t\u00eb dh\u00ebnave jan\u00eb PostgreSQL v11, clickhousedb_fdw dhe databaza ClickHouse. N\u00eb fund, do t\u00eb ekzekutojm\u00eb shqet\u00ebsime t\u00eb ndryshme SQL nga PostgreSQL v11, t\u00eb marra p\u00ebrmes clickhousedb_fdw n\u00eb databaz\u00ebn ClickHouse. Pastaj, do t\u00eb shohim si performanca e FDW krahasohet me t\u00eb nj\u00ebjtat t\u00eb dh\u00ebna t\u00eb ekzekutuara n\u00eb PostgreSQL-n\u00eb native dhe n\u00eb ClickHouse-n\u00eb native.<\/p>\n<p><\/p>\n<h3 id=\"baza-dannyh-clickhouse\">Baza e t\u00eb dh\u00ebnave Clickhouse<\/h3>\n<p><\/p>\n<p>ClickHouse \u00ebsht\u00eb nj\u00eb sistem menaxhimi t\u00eb dh\u00ebnash me baz\u00eb kolone me burim t\u00eb hapur, i cili mund t\u00eb arrij\u00eb performanc\u00ebn 100-1000 her\u00eb m\u00eb t\u00eb shpejt\u00eb se qasjet tradicionale t\u00eb bazave t\u00eb t\u00eb dh\u00ebnave, n\u00eb gjendje t\u00eb p\u00ebrpunoj\u00eb m\u00eb shum\u00eb se nj\u00eb miliard rreshta n\u00eb m\u00eb pak se nj\u00eb sekond\u00eb.<\/p>\n<p><\/p>\n<h3 id=\"clickhousedb_fdw\">Clickhousedb_fdw<\/h3>\n<p><\/p>\n<p>clickhousedb_fdw \u00ebsht\u00eb nj\u00eb mbulues i jasht\u00ebm i t\u00eb dh\u00ebnave p\u00ebr databaz\u00ebn ClickHouse, ose FDW, nj\u00eb projekt me burim t\u00eb hapur nga Percona. <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Percona-Lab\/clickhousedb_fdw\">K\u00ebtu \u00ebsht\u00eb lidhja p\u00ebr repository-n e projektit GitHub<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/www.percona.com\/blog\/2019\/03\/29\/postgresql-access-clickhouse-one-of-the-fastest-column-dbmss-with-clickhousedb_fdw\/\">N\u00eb mars, un\u00eb shkrova nj\u00eb blog q\u00eb ju tregon m\u00eb shum\u00eb rreth FDW ton\u00eb<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>Si\u00e7 do ta shihni, kjo siguron FDW p\u00ebr ClickHouse, i cili lejon SELECT from, dhe INSERT INTO, baz\u00ebn e t\u00eb dh\u00ebnave ClickHouse nga serveri PostgreSQL v11.<\/p>\n<p><\/p>\n<p>FDW mb\u00ebshtet funksione t\u00eb avancuara, si agregat dhe bashkime. Kjo e rrit ndjesh\u00ebm performanc\u00ebn duke shfryt\u00ebzuar burimet e serverit t\u00eb larg\u00ebt p\u00ebr k\u00ebto operacione q\u00eb k\u00ebrkojn\u00eb burime.<\/p>\n<p><\/p>\n<h3 id=\"benchmark-environment\">Mjedisi i Benchmark<\/h3>\n<p><\/p>\n<ul>\n<li>Server Supermicro:\n<ul>\n<li>Intel&reg; Xeon&reg; CPU E5-2683 v3 @ 2.00GHz<\/li>\n<li>2 socket\u00eb \/ 28 b\u00ebrthama \/ 56 thithje<\/li>\n<li>Memoria: 256 GB RAM<\/li>\n<li>Ruajtja: Samsung SM863 1.9TB Enterprise SSD<\/li>\n<li>Sistemi i Files: ext4\/xfs<\/li>\n<\/ul>\n<\/li>\n<li>OS: Linux smblade01 4.15.0-42-gjenerik #45~16.04.1-Ubuntu<\/li>\n<li>PostgreSQL: versioni 11<\/li>\n<\/ul>\n<p><\/p>\n<h3 id=\"benchmark-tests\">Testet e Benchmark<\/h3>\n<p><\/p>\n<p>N\u00eb vend q\u00eb t\u00eb p\u00ebrdorim ndonj\u00eb grup t\u00eb dh\u00ebnash t\u00eb gjeneruar nga makina, p\u00ebr k\u00ebt\u00eb test, ne p\u00ebrdor\u00ebm t\u00eb dh\u00ebnat 'Performanca e koh\u00ebs, e raportuar nga koha e pun\u00ebs s\u00eb operatorit' nga 1987 deri n\u00eb 2018. Ju mund t\u00eb qaseni n\u00eb t\u00eb dh\u00ebnat <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Percona-Lab\/ontime-airline-performance\/blob\/master\/download.sh\">p\u00ebrmes skenarit ton\u00eb, i disponuesh\u00ebm k\u00ebtu<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>Madh\u00ebsia e baz\u00ebs s\u00eb t\u00eb dh\u00ebnave \u00ebsht\u00eb 85 GB, duke ofruar nj\u00eb tabel\u00eb prej 109 kolonash.<\/p>\n<p><\/p>\n<h4 id=\"benchmark-queries\">K\u00ebrkesat e Benchmark<\/h4>\n<p><\/p>\n<p>K\u00ebtu jan\u00eb k\u00ebrkesat q\u00eb kam p\u00ebrdorur p\u00ebr t\u00eb krahasuar ClickHouse, clickhousedb_fdw dhe PostgreSQL.<\/p>\n<p><\/p>\n<p><strong>Q#<\/strong><br \/>\n<strong>K\u00ebrkesa p\u00ebrmban agregat dhe Grupim<\/strong><\/p>\n<p>Q1<br \/>\nSELECT DayOfWeek, count(*) AS c FROM ontime WHERE Year &gt;= 2000 AND Year &lt;= 2008 GROUP BY DayOfWeek ORDER BY c DESC;<\/p>\n<p>Q2<br \/>\nSELECT DayOfWeek, count(*) AS c FROM ontime WHERE DepDelay&gt;10 AND Year &gt;= 2000 AND Year &lt;= 2008 GROUP BY DayOfWeek ORDER BY c DESC;<\/p>\n<p>Q3<br \/>\nSELECT Origin, count(*) AS c FROM ontime WHERE DepDelay&gt;10 AND Year &gt;= 2000 AND Year &lt;= 2008 GROUP BY Origin ORDER BY c DESC LIMIT 10;<\/p>\n<p>Q4<br \/>\nSELECT Carrier, count(<em>) FROM ontime WHERE DepDelay&gt;10 AND Year = 2007 GROUP BY Carrier ORDER BY count(<\/em>) DESC;<\/p>\n<p>Q5<br \/>\nSELECT a.Carrier, c, c2, c<em>1000\/c2 as c3 FROM ( SELECT Carrier, count(<\/em>) AS c FROM ontime WHERE DepDelay&gt;10 AND Year=2007 GROUP BY Carrier ) a INNER JOIN ( SELECT Carrier,count(*) AS c2 FROM ontime WHERE Year=2007 GROUP BY Carrier)b on a.Carrier=b.Carrier ORDER BY c3 DESC;<\/p>\n<p>Q6<br \/>\nSELECT a.Carrier, c, c2, c<em>1000\/c2 as c3 FROM ( SELECT Carrier, count(<\/em>) AS c FROM ontime WHERE DepDelay&gt;10 AND Year &gt;= 2000 AND Year = 2000 AND Year &lt;= 2008 GROUP BY Carrier ) b on a.Carrier=b.Carrier ORDER BY c3 DESC;<\/p>\n<p>Q7<br \/>\nSELECT Carrier, avg(DepDelay) * 1000 AS c3 FROM ontime WHERE Year &gt;= 2000 AND Year &lt;= 2008 GROUP BY Carrier;<\/p>\n<p>Q8<br \/>\nSELECT Year, avg(DepDelay) FROM ontime GROUP BY Year;<\/p>\n<p>Q9<br \/>\nselect Year, count(*) as c1 from ontime group by Year;<\/p>\n<p>Q10<br \/>\nSELECT avg(cnt) FROM (SELECT Year,Month,count(*) AS cnt FROM ontime WHERE DepDel15=1 GROUP BY Year,Month) a;<\/p>\n<p>Q11<br \/>\nselect avg(c1) from (select Year,Month,count(*) as c1 from ontime group by Year,Month) a;<\/p>\n<p>Q12<br \/>\nSELECT OriginCityName, DestCityName, count(*) AS c FROM ontime GROUP BY OriginCityName, DestCityName ORDER BY c DESC LIMIT 10;<\/p>\n<p>Q13<br \/>\nSELECT OriginCityName, count(*) AS c FROM ontime GROUP BY OriginCityName ORDER BY c DESC LIMIT 10;<\/p>\n<p><strong>Query Contains Joins<\/strong><\/p>\n<p>Q14<br \/>\nSELECT a.Year, c1\/c2 FROM ( select Year, count(<em>)<\/em>1000 si c1 nga ontime KU DepDelay&gt;10 GRUPOH Shtatorit nga Viti) a BASHKOHUNI (select Viti, count(*) si c2 nga ontime GRUPOH Viti) b mbi a.Viti=b.Viti RENDIT sipas a.Viti;<\/p>\n<p>Q15<br \/>\nSELECT a.\"Viti\", c1\/c2 NGA ( select \"Viti\", count(<em>)<\/em>1000 si c1 NGA fontime KU \"DepDelay\"&gt;10 GRUPOH \"Viti\") a BASHKOHUNI (select \"Viti\", count(*) si c2 NGA fontime GRUPOH \"Viti\") b mbi a.\"Viti\"=b.\"Viti\";<\/p>\n<p><\/p>\n<p><em>Tabela-1: K\u00ebrkimet e p\u00ebrdorura n\u00eb benchmark<\/em><\/p>\n<p><\/p>\n<h4 id=\"query-executions\">Ekzekutimet e k\u00ebrkimeve<\/h4>\n<p><\/p>\n<p>Ja rezultatet e \u00e7do k\u00ebrkese gjat\u00eb ekzekutimit n\u00eb konfigurime t\u00eb ndryshme t\u00eb baz\u00ebs s\u00eb t\u00eb dh\u00ebnave: PostgreSQL me indekse dhe pa to, ClickHouse i vet\u00ebdijsh\u00ebm dhe clickhousedb_fdw. Koha tregohet n\u00eb milisekonda.<\/p>\n<p><\/p>\n<p><strong>Q#<\/strong><br \/>\n<strong>PostgreSQL<\/strong><br \/>\n<strong>PostgreSQL (E Indeksuar)<\/strong><br \/>\n<strong>ClickHouse<\/strong><br \/>\n<strong>clickhousedb_fdw<\/strong><\/p>\n<p>Q1<br \/>\n27920<br \/>\n19634<br \/>\n23<br \/>\n57<\/p>\n<p>Q2<br \/>\n35124<br \/>\n17301<br \/>\n50<br \/>\n80<\/p>\n<p>Q3<br \/>\n34046<br \/>\n15618<br \/>\n67<br \/>\n115<\/p>\n<p>Q4<br \/>\n31632<br \/>\n7667<br \/>\n25<br \/>\n37<\/p>\n<p>Q5<br \/>\n47220<br \/>\n8976<br \/>\n27<br \/>\n60<\/p>\n<p>Q6<br \/>\n58233<br \/>\n24368<br \/>\n55<br \/>\n153<\/p>\n<p>Q7<br \/>\n30566<br \/>\n13256<br \/>\n52<br \/>\n91<\/p>\n<p>Q8<br \/>\n38309<br \/>\n60511<br \/>\n112<br \/>\n179<\/p>\n<p>Q9<br \/>\n20674<br \/>\n37979<br \/>\n31<br \/>\n81<\/p>\n<p>Q10<br \/>\n34990<br \/>\n20102<br \/>\n56<br \/>\n148<\/p>\n<p>Q11<br \/>\n30489<br \/>\n51658<br \/>\n37<br \/>\n155<\/p>\n<p>Q12<br \/>\n39357<br \/>\n33742<br \/>\n186<br \/>\n1333<\/p>\n<p>Q13<br \/>\n29912<br \/>\n30709<br \/>\n101<br \/>\n384<\/p>\n<p>Q14<br \/>\n54126<br \/>\n39913<br \/>\n124<br \/>\n1364212<\/p>\n<p>Q15<br \/>\n97258<br \/>\n30211<br \/>\n245<br \/>\n259<\/p>\n<p><\/p>\n<p><em>Tabela-1: Koha e marr\u00eb p\u00ebr t\u00eb ekzekutuar k\u00ebrkimet e p\u00ebrdorura n\u00eb benchmark<\/em><\/p>\n<p><\/p>\n<p>Shikoni rezultatet<\/p>\n<p><\/p>\n<p>Grafiku tregon koh\u00ebn e ekzekutimit t\u00eb k\u00ebrkes\u00ebs n\u00eb milisekonda, aksisi X tregon numrin e k\u00ebrkes\u00ebs nga tabelat e m\u00ebsip\u00ebrme, nd\u00ebrsa aksisi Y tregon koh\u00ebn e ekzekutimit n\u00eb milisekonda. Rezultatet e ClickHouse dhe t\u00eb dh\u00ebnat q\u00eb jan\u00eb marr\u00eb nga postgres p\u00ebrmes clickhousedb_fdw, jan\u00eb paraqitur. Nga tabela shihet se ka nj\u00eb ndryshim t\u00eb madh midis PostgreSQL dhe ClickHouse, por nj\u00eb ndryshim minimal midis ClickHouse dhe clickhousedb_fdw.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Testimi i performanc\u00ebs s\u00eb k\u00ebrkesave analitike n\u00eb PostgreSQL, ClickHouse dhe clickhousedb_fdw (PostgreSQL)\" src=\"\/wp-content\/uploads\/2020\/07\/e084243ea7b327f30de5cb78339d3d3a.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Ky this grafik tregon diferenc\u00ebn midis ClickhouseDB dhe clickhousedb_fdw. N\u00eb shumic\u00ebn e pyetjeve, kostot e FDW nuk jan\u00eb aq t\u00eb m\u00ebdha dhe gati as q\u00eb kan\u00eb r\u00ebnd\u00ebsi, p\u00ebrve\u00e7 Q12. Kjo pyetje p\u00ebrfshin bashkime dhe nje propozim ORDER BY. P\u00ebr shkak t\u00eb propozimit ORDER BY GROUP\/BY dhe ORDER BY nuk hidhet posht\u00eb n\u00eb ClickHouse.<\/p>\n<p><\/p>\n<p>N\u00eb tabel\u00ebn 2 shohim nj\u00eb skak n\u00eb koh\u00ebn e pyetjeve Q12 dhe Q13. T\u00eb ndjej se, kjo shkaktohet nga propozimi ORDER BY. P\u00ebr t\u00eb konfirmuar k\u00ebt\u00eb, kam ekzekutuar pyetjet Q-14 dhe Q-15 me propozimin ORDER BY dhe pa t\u00eb. Pa propozimin ORDER BY, koha e p\u00ebrfundimit \u00ebsht\u00eb 259 ms, nd\u00ebrsa me propozimin ORDER BY \u00ebsht\u00eb 1364212. P\u00ebr t\u00eb debug-uar k\u00ebt\u00eb pyetje, un\u00eb shpjegoj t\u00eb dyja pyetjet, dhe k\u00ebtu jan\u00eb rezultatet e shpjegimit.<\/p>\n<p><\/p>\n<p>Q15: Pa Klauzol\u00ebn ORDER BY<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">bm=# SHPJEGJ FJAL\u00cbT E SHTETEVE SELECT a.&quot;Viti&quot;, c1\/c2 \n     NGA (SELECT &quot;Viti&quot;, count(*)*1000 AS c1 NGA fontime KU &quot;DepDelay&quot; &gt; 10 GRUPOHI NGA &quot;Viti&quot;) a\n     INNER JOIN(SELECT &quot;Viti&quot;, count(*) AS c2 NGA fontime GRUPOHI NGA &quot;Viti&quot;) b ON a.&quot;Viti&quot;=b.&quot;Viti&quot;;<\/code><\/pre>\n<p><\/p>\n<p>Q15: Pyetje pa Klauzol\u00ebn ORDER BY<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">PLANI I K\u00cbRKES\u00cbS                                                      \nHash Join  (cost=2250.00..128516.06 rows=50000000 width=12)  \nDalja: fontime.&quot;Viti&quot;, (((count(*) * 1000)) \/ b.c2)  \nUnik\u00eb e Brendshme: e v\u00ebrtet\u00eb   Hash Cond: (fontime.&quot;Viti&quot; = b.&quot;Viti&quot;)  \n-&gt;  Skane t\u00eb Huaja  (cost=1.00..-1.00 rows=100000 width=12)        \nDalja: fontime.&quot;Viti&quot;, ((count(*) * 1000))        \nMarredheniet: Agregat\u00eb mbi (fontime)        \nSQL i Larg\u00ebt: SELECT &quot;Viti&quot;, (count(*) * 1000) NGA &quot;default&quot;.ontime KU ((&quot;DepDelay&quot; &gt; 10)) GRUPOHI NGA &quot;Viti&quot;  \n-&gt;  Hash  (cost=999.00..999.00 rows=100000 width=12)        \nDalja: b.c2, b.&quot;Viti&quot;        \n-&gt;  Skane N\u00ebnpyetje mbi b  (cost=1.00..999.00 rows=100000 width=12)              \nDalja: b.c2, b.&quot;Viti&quot;              \n-&gt;  Skane t\u00eb Huaja  (cost=1.00..-1.00 rows=100000 width=12)                    \nDalja: fontime_1.&quot;Viti&quot;, (count(*))                    \nMarredheniet: Agregat\u00eb mbi (fontime)                    \nSQL i Larg\u00ebt: SELECT &quot;Viti&quot;, count(*) NGA &quot;default&quot;.ontime GRUPOHI NGA &quot;Viti&quot;(16 rreshta)<\/code><\/pre>\n<p><\/p>\n<p>Q14: K\u00ebrkesa me Klauzol\u00ebn ORDER BY<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">bm=# SHPJEGJ FJAL\u00cbT E SHTETEVE SELECT a.&quot;Viti&quot;, c1\/c2 NGA(SELECT &quot;Viti&quot;, count(*)*1000 AS c1 NGA fontime KU &quot;DepDelay&quot; &gt; 10 GRUPOHI NGA &quot;Viti&quot;) a \n     INNER JOIN(SELECT &quot;Viti&quot;, count(*) as c2 NGA fontime GRUPOHI NGA &quot;Viti&quot;) b  ON a.&quot;Viti&quot;= b.&quot;Viti&quot; \n     RENDIT NGA a.&quot;Viti&quot;;<\/code><\/pre>\n<p><\/p>\n<p>Q14: Plani i K\u00ebrkes\u00ebs me Klauzol\u00ebn ORDER BY<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">PLANI I K\u00cbRKES\u00cbS \nMerge Join\u00a0 (cost=2.00..628498.02 rows=50000000 width=12)\u00a0\u00a0 \nDalja: fontime.&quot;Viti&quot;, (((count(*) * 1000)) \/ (count(*)))\u00a0\u00a0 \nUnik\u00eb e Brendshme: e v\u00ebrtet\u00eb\u00a0\u00a0 Merge Cond: (fontime.&quot;Viti&quot; = fontime_1.&quot;Viti&quot;)\u00a0\u00a0 \n-&gt;\u00a0 Agregat\u00eb t\u00eb Grumbulluar\u00a0 (cost=1.00..499.01 rows=1 width=12)\u00a0 \u00a0 \u00a0 \u00a0 \nDalja: fontime.&quot;Viti&quot;, (count(*) * 1000)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \nK\u00ebrkesa e Grupit: fontime.&quot;Viti&quot;\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \n-&gt;\u00a0 Skane t\u00eb Huaja mbi publik.fontime\u00a0 (cost=1.00..-1.00 rows=100000 width=4)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \nSQL i Larg\u00ebt: SELECT &quot;Viti&quot; NGA &quot;default&quot;.ontime KU ((&quot;DepDelay&quot; &gt; 10)) \n            RENDIT NGA &quot;Viti&quot; ASC\u00a0\u00a0 \n-&gt;\u00a0 Agregat\u00eb t\u00eb Grumbulluar\u00a0 (cost=1.00..499.01 rows=1 width=12)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \nDalja: fontime_1.&quot;Viti&quot;, count(*)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 K\u00ebrkesa e Grupit: fontime_1.&quot;Viti&quot;\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \n-&gt;\u00a0 Skane t\u00eb Huaja mbi publik.fontime fontime_1\u00a0 (cost=1.00..-1.00 rows=100000 width=4)\u00a0\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \nSQL i Larg\u00ebt: SELECT &quot;Viti&quot; NGA &quot;default&quot;.ontime RENDIT NGA &quot;Viti&quot; ASC(16 rreshta)<\/code><\/pre>\n<p><\/p>\n<p>P\u00ebrfundim<\/p>\n<p><\/p>\n<p>Rezultatet e k\u00ebtyre eksperimenteve tregojn\u00eb se ClickHouse ofron v\u00ebrtet performanc\u00eb shum\u00eb t\u00eb mir\u00eb, dhe clickhousedb_fdw sjell avantazhe t\u00eb performanc\u00ebs s\u00eb ClickHouse nga PostgreSQL. Megjith\u00ebse p\u00ebrdorimi i clickhousedb_fdw ka disa shpenzime, ato jan\u00eb t\u00eb pap\u00ebrfillshme dhe t\u00eb krahasueshme me performanc\u00ebn e arritur gjat\u00eb ekzekutimit t\u00eb natyrsh\u00ebm n\u00eb baz\u00ebn e t\u00eb dh\u00ebnave ClickHouse. Kjo gjithashtu konfirmon se fdw n\u00eb PostgreSQL ofron rezultate t\u00eb shk\u00eblqyera.<\/p>\n<p><\/p>\n<p>Grupi n\u00eb Telegram p\u00ebr Clickhouse <noindex><a rel=\"nofollow\" href=\"https:\/\/t.me\/clickhouse_ru\">https:\/\/t.me\/clickhouse_ru<\/a><\/noindex><br \/>\nGrupi n\u00eb Telegram p\u00ebr PostgreSQL <noindex><a rel=\"nofollow\" href=\"https:\/\/t.me\/pgsql\">https:\/\/t.me\/pgsql<\/a><\/noindex><\/p>\n<p>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/511992\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 ClickHouse, \u0430 \u043d\u0435 PostgreSQL. \u042f \u0437\u043d\u0430\u044e, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 ClickHouse \u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e. \u0411\u0443\u0434\u0443\u0442 \u043b\u0438 \u044d\u0442\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b, \u0435\u0441\u043b\u0438 \u044f \u043f\u043e\u043b\u0443\u0447\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a ClickHouse \u0438\u0437 PostgreSQL \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (FDW)? \u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0430\u043c\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f PostgreSQL v11, clickhousedb_fdw [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":89499,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-89498","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412 \u044d\u0442\u043e\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 ClickHouse, \u0430 \u043d\u0435 PostgreSQL. \u042f \u0437\u043d\u0430\u044e, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 ClickHouse \u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e. \u0411\u0443\u0434\u0443\u0442 \u043b\u0438 \u044d\u0442\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b, \u0435\u0441\u043b\u0438 \u044f \u043f\u043e\u043b\u0443\u0447\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a ClickHouse \u0438\u0437 PostgreSQL \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (FDW)? \u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0430\u043c\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f PostgreSQL v11, clickhousedb_fdw\" \/>\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\/testirovanie-proizvoditelnosti-analiticheskih-zaprosov-v-postgresql-clickhouse-i-clickhousedb_fdw-postgresql\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\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\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 PostgreSQL, ClickHouse \u0438 clickhousedb_fdw (PostgreSQL) | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412 \u044d\u0442\u043e\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 ClickHouse, \u0430 \u043d\u0435 PostgreSQL. \u042f \u0437\u043d\u0430\u044e, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 ClickHouse \u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e. \u0411\u0443\u0434\u0443\u0442 \u043b\u0438 \u044d\u0442\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b, \u0435\u0441\u043b\u0438 \u044f \u043f\u043e\u043b\u0443\u0447\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a ClickHouse \u0438\u0437 PostgreSQL \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (FDW)? \u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0430\u043c\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f PostgreSQL v11, clickhousedb_fdw\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/testirovanie-proizvoditelnosti-analiticheskih-zaprosov-v-postgresql-clickhouse-i-clickhousedb_fdw-postgresql\" \/>\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=\"2020-07-23T11:42:07+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-07-23T11:42:07+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\udd47Testimi i performanc\u00ebs s\u00eb k\u00ebrkesave analitike n\u00eb PostgreSQL, ClickHouse dhe clickhousedb_fdw (PostgreSQL) | ProHoster","description":"N\u00eb k\u00ebt\u00eb studim doja t\u00eb shqyrtoja se cilat p\u00ebrmir\u00ebsime t\u00eb performanc\u00ebs mund t\u00eb arrihen duke p\u00ebrdorur burimin e t\u00eb dh\u00ebnave ClickHouse, n\u00eb vend t\u00eb PostgreSQL. E di se cilat jan\u00eb p\u00ebrfitimet e performanc\u00ebs nga p\u00ebrdorimi i ClickHouse. A do t\u00eb mbeten k\u00ebto p\u00ebrfitime n\u00ebse qasjej n\u00eb ClickHouse nga PostgreSQL p\u00ebrmes nj\u00eb mb\u00ebshtetjeje t\u00eb jashtme t\u00eb t\u00eb dh\u00ebnave (FDW)? Mjediset e bazave t\u00eb t\u00eb dh\u00ebnave n\u00eb shqyrtim jan\u00eb PostgreSQL v11, clickhousedb_fdw","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/testirovanie-proizvoditelnosti-analiticheskih-zaprosov-v-postgresql-clickhouse-i-clickhousedb_fdw-postgresql","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\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 PostgreSQL, ClickHouse \u0438 clickhousedb_fdw (PostgreSQL) | ProHoster","og:description":"\u0412 \u044d\u0442\u043e\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 ClickHouse, \u0430 \u043d\u0435 PostgreSQL. \u042f \u0437\u043d\u0430\u044e, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 ClickHouse \u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e. \u0411\u0443\u0434\u0443\u0442 \u043b\u0438 \u044d\u0442\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b, \u0435\u0441\u043b\u0438 \u044f \u043f\u043e\u043b\u0443\u0447\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a ClickHouse \u0438\u0437 PostgreSQL \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (FDW)? \u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0430\u043c\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f PostgreSQL v11, clickhousedb_fdw","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/testirovanie-proizvoditelnosti-analiticheskih-zaprosov-v-postgresql-clickhouse-i-clickhousedb_fdw-postgresql","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":"2020-07-23T11:42:07+00:00","article:modified_time":"2020-07-23T11:42:07+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"89498","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":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 13:10:17","updated":"2022-10-10 22:45:45"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/89498","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=89498"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/89498\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/89499"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=89498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=89498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=89498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}