{"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\/de\/blog\/administrirovanie\/testirovanie-proizvoditelnosti-analiticheskih-zaprosov-v-postgresql-clickhouse-i-clickhousedb_fdw-postgresql","title":{"rendered":"Leistungsanalyse von Abfragen in PostgreSQL, ClickHouse und clickhousedb_fdw (PostgreSQL)","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>In dieser Studie wollte ich untersuchen, welche Leistungsverbesserungen erzielt werden k\u00f6nnen, wenn man ClickHouse als Datenquelle anstelle von PostgreSQL verwendet. Ich kenne die Leistungsvorteile, die ich bei Nutzung von ClickHouse erhalte. Werden diese Vorteile auch erhalten, wenn ich \u00fcber ein Foreign Data Wrapper (FDW) aus PostgreSQL auf ClickHouse zugreife? <\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>Die untersuchten Datenbankumgebungen sind PostgreSQL v11, clickhousedb_fdw und die ClickHouse-Datenbank. Letztendlich werden wir von PostgreSQL v11 verschiedene SQL-Abfragen durchf\u00fchren, die \u00fcber unser clickhousedb_fdw zur ClickHouse-Datenbank geleitet werden. Dann werden wir sehen, wie die Leistung von FDW im Vergleich zu den gleichen Abfragen ausschaut, die in nativem PostgreSQL und nativem ClickHouse ausgef\u00fchrt werden.<\/p>\n<p><\/p>\n<h3 id=\"baza-dannyh-clickhouse\">ClickHouse-Datenbank<\/h3>\n<p><\/p>\n<p>ClickHouse ist ein Open-Source-Spaltenorientiertes Datenbankmanagementsystem, das 100 bis 1000 Mal schneller als traditionelle Datenbankans\u00e4tze sein kann und mehr als eine Milliarde Zeilen in weniger als einer Sekunde verarbeiten kann.<\/p>\n<p><\/p>\n<h3 id=\"clickhousedb_fdw\">clickhousedb_fdw<\/h3>\n<p><\/p>\n<p>clickhousedb_fdw \u2014 die FDW-Schnittstelle f\u00fcr die ClickHouse-Datenbank ist ein Open-Source-Projekt von Percona. <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Percona-Lab\/clickhousedb_fdw\">Hier ist der Link zum GitHub-Repository des Projekts<\/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\/\">Im M\u00e4rz habe ich einen Blogbeitrag geschrieben, der Ihnen mehr \u00fcber unser FDW erkl\u00e4rt.<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>Wie Sie sehen werden, bietet es FDW f\u00fcr ClickHouse, das es erm\u00f6glicht, FROM zu SELECT und INTO zu INSERT in die ClickHouse-Datenbank von einem PostgreSQL-Server v11.<\/p>\n<p><\/p>\n<p>FDW unterst\u00fctzt erweiterte Funktionen wie Aggregation und Joins. Dies erh\u00f6ht die Leistung erheblich, indem die Ressourcen des entfernten Servers f\u00fcr diese ressourcenintensiven Operationen genutzt werden.<\/p>\n<p><\/p>\n<h3 id=\"benchmark-environment\">Benchmark-Umgebung<\/h3>\n<p><\/p>\n<ul>\n<li>Supermicro-Server:\n<ul>\n<li>Intel&reg; Xeon&reg; CPU E5-2683 v3 @ 2.00GHz<\/li>\n<li>2 Sockel \/ 28 Kerne \/ 56 Threads<\/li>\n<li>Speicher: 256 GB RAM<\/li>\n<li>Speicher: Samsung SM863 1,9 TB Enterprise SSD<\/li>\n<li>Dateisystem: ext4\/xfs<\/li>\n<\/ul>\n<\/li>\n<li>Betriebssystem: Linux smblade01 4.15.0-42-generic #45~16.04.1-Ubuntu<\/li>\n<li>PostgreSQL: Version 11<\/li>\n<\/ul>\n<p><\/p>\n<h3 id=\"benchmark-tests\">Benchmark-Tests<\/h3>\n<p><\/p>\n<p>Anstelle eines maschinell generierten Datensatzes f\u00fcr diesen Test haben wir Daten zur \"Leistung \u00fcber die Zeit, gemeldete Betriebszeiten des Betreibers\" von 1987 bis 2018 verwendet. Sie k\u00f6nnen auf die Daten zugreifen <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Percona-Lab\/ontime-airline-performance\/blob\/master\/download.sh\">\u00fcber unser Skript, das hier verf\u00fcgbar ist<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>Die Gr\u00f6\u00dfe der Datenbank betr\u00e4gt 85 GB und bietet eine Tabelle mit 109 Spalten.<\/p>\n<p><\/p>\n<h4 id=\"benchmark-queries\">Benchmark-Abfragen<\/h4>\n<p><\/p>\n<p>Hier sind die Abfragen, die ich zum Vergleich von ClickHouse, clickhousedb_fdw und PostgreSQL verwendet habe.<\/p>\n<p><\/p>\n<p><strong>Q#<\/strong><br \/>\n<strong>Abfrage enth\u00e4lt Aggregationen und GROUP BY<\/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>Abfrage enth\u00e4lt Joins<\/strong><\/p>\n<p>Q14<br \/>\nW\u00c4HLEN Sie a.Jahr, c1\/c2 AUS (W\u00e4hlen Sie Jahr, Anzahl(<em>)<\/em>1000 als c1 von ontime WO DepDelay&gt;10 GRUPPIEREN NACH Jahr) a INNER JOIN (W\u00e4hlen Sie Jahr, Anzahl(*) als c2 von ontime GRUPPIEREN NACH Jahr) b ON a.Jahr=b.Jahr BESTELLEN NACH a.Jahr;<\/p>\n<p>Q15<br \/>\nW\u00c4HLEN Sie a.\u201dJahr\u201d, c1\/c2 AUS (W\u00e4hlen Sie \u201cJahr\u201d, Anzahl(<em>)<\/em>1000 als c1 VON fontime WO \u201cDepDelay\u201d&gt;10 GRUPPIEREN NACH \u201cJahr\u201d) a INNER JOIN (W\u00e4hlen Sie \u201cJahr\u201d, Anzahl(*) als c2 VON fontime GRUPPIEREN NACH \u201cJahr\u201d) b ON a.\u201dJahr\u201d=b.\u201dJahr\u201d;<\/p>\n<p><\/p>\n<p><em>Tabelle-1: Abfragen, die im Benchmark verwendet wurden<\/em><\/p>\n<p><\/p>\n<h4 id=\"query-executions\">Abfrageausf\u00fchrungen<\/h4>\n<p><\/p>\n<p>Hier sind die Ergebnisse jeder Abfrage bei Ausf\u00fchrung in verschiedenen Datenbankeinstellungen: PostgreSQL mit und ohne Indizes, eigenes ClickHouse und clickhousedb_fdw. Die Zeit wird in Millisekunden angezeigt.<\/p>\n<p><\/p>\n<p><strong>Q#<\/strong><br \/>\n<strong>PostgreSQL<\/strong><br \/>\n<strong>PostgreSQL (Indiziert)<\/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>Tabelle-1: Zeit, die ben\u00f6tigt wird, um die im Benchmark verwendeten Abfragen auszuf\u00fchren<\/em><\/p>\n<p><\/p>\n<p>Ergebnisse anzeigen<\/p>\n<p><\/p>\n<p>Das Diagramm zeigt die Ausf\u00fchrungszeit der Abfrage in Millisekunden, die X-Achse zeigt die Abfragenummer aus den obigen Tabellen, und die Y-Achse zeigt die Ausf\u00fchrungszeit in Millisekunden. Die Ergebnisse von ClickHouse und die aus Postgres mit clickhousedb_fdw erhaltenen Daten werden angezeigt. Aus der Tabelle geht hervor, dass es einen enormen Unterschied zwischen PostgreSQL und ClickHouse gibt, jedoch nur einen minimalen Unterschied zwischen ClickHouse und clickhousedb_fdw.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Leistungsanalyse von Abfragen in PostgreSQL, ClickHouse und clickhousedb_fdw (PostgreSQL)\" src=\"\/wp-content\/uploads\/2020\/07\/e084243ea7b327f30de5cb78339d3d3a.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Dieses Diagramm zeigt den Unterschied zwischen ClickhouseDB und clickhousedb_fdw. In den meisten Abfragen sind die Overheads von FDW nicht so gro\u00df und kaum sp\u00fcrbar, au\u00dfer bei Q12. Diese Abfrage enth\u00e4lt Joins und eine ORDER BY-Klausel. Aufgrund der ORDER BY GROUP\/BY und ORDER BY wird nicht auf ClickHouse verwiesen.<\/p>\n<p><\/p>\n<p>In Tabelle 2 sehen wir einen Anstieg der Zeit bei den Abfragen Q12 und Q13. Ich wiederhole, dies liegt an der ORDER BY-Klausel. Um dies zu best\u00e4tigen, habe ich die Abfragen Q-14 und Q-15 mit und ohne ORDER BY-Klausel ausgef\u00fchrt. Ohne ORDER BY betr\u00e4gt die Ausf\u00fchrungszeit 259 ms, mit ORDER BY hingegen 1364212. Zur Fehlersuche dieser Abfrage erkl\u00e4re ich beide Abfragen, und hier sind die Erkl\u00e4rungsergebnisse.<\/p>\n<p><\/p>\n<p>Q15: Ohne ORDER BY-Klausel<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">bm=# ERKL\u00c4REN VERBESSERT SELECT a.&quot;Jahr&quot;, c1\/c2 \n     VON (SELECT &quot;Jahr&quot;, count(*)*1000 AS c1 FROM fontime WHERE &quot;DepDelay&quot; &gt; 10 GROUP BY &quot;Jahr&quot;) a\n     INNER JOIN(SELECT &quot;Jahr&quot;, count(*) AS c2 FROM fontime GROUP BY &quot;Jahr&quot;) b ON a.&quot;Jahr&quot;=b.&quot;Jahr&quot;;<\/code><\/pre>\n<p><\/p>\n<p>Q15: Abfrage ohne ORDER BY-Klausel<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">ABFRAGEPLAN                                                      \nHash Join  (cost=2250.00..128516.06 rows=50000000 width=12)  \nAusgabe: fontime.&quot;Jahr&quot;, (((count(*) * 1000)) \/ b.c2)  \nInner Unique: true   Hash Cond: (fontime.&quot;Jahr&quot; = b.&quot;Jahr&quot;)  \n-&gt;  Ausl\u00e4ndischer Scan  (cost=1.00..-1.00 rows=100000 width=12)        \nAusgabe: fontime.&quot;Jahr&quot;, ((count(*) * 1000))        \nBeziehungen: Aggregat \u00fcber (fontime)        \nEntfernte SQL: SELECT &quot;Jahr&quot;, (count(*) * 1000) FROM &quot;default&quot;.ontime WHERE ((&quot;DepDelay&quot; &gt; 10)) GROUP BY &quot;Jahr&quot;  \n-&gt;  Hash  (cost=999.00..999.00 rows=100000 width=12)        \nAusgabe: b.c2, b.&quot;Jahr&quot;        \n-&gt;  Unterabfrage Scan auf b  (cost=1.00..999.00 rows=100000 width=12)              \nAusgabe: b.c2, b.&quot;Jahr&quot;              \n-&gt;  Ausl\u00e4ndischer Scan  (cost=1.00..-1.00 rows=100000 width=12)                    \nAusgabe: fontime_1.&quot;Jahr&quot;, (count(*))                    \nBeziehungen: Aggregat \u00fcber (fontime)                    \nEntfernte SQL: SELECT &quot;Jahr&quot;, count(*) FROM &quot;default&quot;.ontime GROUP BY &quot;Jahr&quot;(16 Zeilen)<\/code><\/pre>\n<p><\/p>\n<p>Q14: Abfrage mit ORDER BY-Klausel<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">bm=# ERKL\u00c4REN VERBESSERT SELECT a.&quot;Jahr&quot;, c1\/c2 VON(SELECT &quot;Jahr&quot;, count(*)*1000 AS c1 FROM fontime WHERE &quot;DepDelay&quot; &gt; 10 GROUP BY &quot;Jahr&quot;) a \n     INNER JOIN(SELECT &quot;Jahr&quot;, count(*) as c2 FROM fontime GROUP BY &quot;Jahr&quot;) b  ON a.&quot;Jahr&quot;= b.&quot;Jahr&quot; \n     ORDER BY a.&quot;Jahr&quot;;<\/code><\/pre>\n<p><\/p>\n<p>Q14: Abfrageplan mit ORDER BY-Klausel<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">ABFRAGEPLAN \nMerge Join\u00a0 (Kosten=2.00..628498.02 Zeilen=50000000 Breite=12)\u00a0\u00a0 \nAusgabe: fontime.\"Jahr\", (((count(*) * 1000)) \/(count(*)))\u00a0\u00a0 \nInnere Einzigartigkeit: wahr\u00a0\u00a0 Merge-Bedingung: (fontime.\"Jahr\" = fontime_1.\"Jahr\")\u00a0\u00a0 \n-&gt;\u00a0 GroupAggregate\u00a0 (Kosten=1.00..499.01 Zeilen=1 Breite=12)\u00a0 \u00a0 \u00a0 \u00a0 \nAusgabe: fontime.\"Jahr\", (count(*) * 1000)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \nGruppenschl\u00fcssel: fontime.\"Jahr\"\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \n-&gt;\u00a0 Fremdscan auf public.fontime\u00a0 (Kosten=1.00..-1.00 Zeilen=100000 Breite=4)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \nEntfernte SQL: SELECT \"Jahr\" FROM \"default\".ontime WHERE ((\"DepDelay\" &gt; 10)) \n            ORDER BY \"Jahr\" ASC\u00a0\u00a0 \n-&gt;\u00a0 GroupAggregate\u00a0 (Kosten=1.00..499.01 Zeilen=1 Breite=12)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \nAusgabe: fontime_1.\"Jahr\", count(*)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 Gruppenschl\u00fcssel: fontime_1.\"Jahr\"\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \n-&gt;\u00a0 Fremdscan auf public.fontime fontime_1\u00a0 (Kosten=1.00..-1.00 Zeilen=100000 Breite=4)\u00a0\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \nEntfernte SQL: SELECT \"Jahr\" FROM \"default\".ontime ORDER BY \"Jahr\" ASC(16 Zeilen)<\/code><\/pre>\n<p><\/p>\n<p>Fazit<\/p>\n<p><\/p>\n<p>Die Ergebnisse dieser Experimente zeigen, dass ClickHouse tats\u00e4chlich eine hervorragende Leistung bietet, w\u00e4hrend clickhousedb_fdw die Leistungsgewinne von ClickHouse in PostgreSQL zug\u00e4nglich macht. Obwohl bei der Verwendung von clickhousedb_fdw einige Overheadkosten anfallen, sind diese gering und vergleichbar mit der Leistung, die bei einem nativen Einsatz in der ClickHouse-Datenbank erreicht wird. Das best\u00e4tigt zudem, dass fdw in PostgreSQL bemerkenswerte Ergebnisse liefert.<\/p>\n<p><\/p>\n<p>Telegram-Chat zu ClickHouse <noindex><a rel=\"nofollow\" href=\"https:\/\/t.me\/clickhouse_ru\">https:\/\/t.me\/clickhouse_ru<\/a><\/noindex><br \/>\nTelegram-Chat zu PostgreSQL <noindex><a rel=\"nofollow\" href=\"https:\/\/t.me\/pgsql\">https:\/\/t.me\/pgsql<\/a><\/noindex><\/p>\n<p>Quelle: <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\/de\/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=\"de_DE\" \/>\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\/de\/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\udd47Performance-Tests von analytischen Abfragen in PostgreSQL, ClickHouse und clickhousedb_fdw (PostgreSQL) | ProHoster","description":"In dieser Studie wollte ich untersuchen, welche Leistungsverbesserungen erzielt werden k\u00f6nnen, wenn ich ClickHouse als Datenquelle anstelle von PostgreSQL verwende. Ich bin mir der Leistungsvorteile bewusst, die ich durch die Nutzung von ClickHouse erhalte. Werden diese Vorteile auch erhalten bleiben, wenn ich \u00fcber eine Foreign Data Wrapper (FDW) auf ClickHouse aus PostgreSQL zugreife? Die untersuchten Datenbankumgebungen sind PostgreSQL v11 und clickhousedb_fdw.","canonical_url":"https:\/\/prohoster.info\/de\/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":"de_DE","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\/de\/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\/de\/wp-json\/wp\/v2\/posts\/89498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/comments?post=89498"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/89498\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media\/89499"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media?parent=89498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/categories?post=89498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/tags?post=89498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}