{"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":"Leistungstest von analytischen 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 ich ClickHouse als Datenquelle anstelle von PostgreSQL verwende. Ich kenne die Leistungs Vorteile, die ich durch die Verwendung von ClickHouse erhalte. Werden diese Vorteile erhalten bleiben, wenn ich \u00fcber ein Foreign Data Wrapper (FDW) auf ClickHouse von PostgreSQL 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 aus PostgreSQL v11 verschiedene SQL-Abfragen ausf\u00fchren, die \u00fcber unser clickhousedb_fdw an die ClickHouse-Datenbank weitergeleitet werden. Dann werden wir sehen, wie sich die Leistung des FDW im Vergleich zu denselben Abfragen verh\u00e4lt, 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-Spaltenbasiertes Datenbankmanagementsystem, das eine Leistung von 100 bis 1000 Mal schneller erreichen kann als traditionelle Datenbankans\u00e4tze und in der Lage ist, mehr als eine Milliarde Zeilen in weniger als einer Sekunde zu verarbeiten.<\/p>\n<p><\/p>\n<h3 id=\"clickhousedb_fdw\">Clickhousedb_fdw<\/h3>\n<p><\/p>\n<p>clickhousedb_fdw ist ein Open-Source-Projekt von Percona, das ein Foreign Data Wrapper f\u00fcr die ClickHouse-Datenbank bereitstellt. <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 Blog geschrieben, in dem ich mehr \u00fcber unser FDW berichte.<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>Wie Sie sehen werden, bietet es ein FDW f\u00fcr ClickHouse, das es erm\u00f6glicht, SELECT from und INSERT INTO f\u00fcr die ClickHouse-Datenbank von PostgreSQL v11 auszuf\u00fchren.<\/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 Remote-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 Sockets \/ 28 Kerne \/ 56 Threads<\/li>\n<li>Speicher: 256 GB RAM<\/li>\n<li>Speicher: Samsung SM863 1.9TB 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>Statt einen von der Maschine generierten Datensatz f\u00fcr diesen Test zu verwenden, haben wir die Daten \"Leistungsberichte \u00fcber die Betriebsdauer 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\">mit unserem Skript, das hier verf\u00fcgbar ist<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>Die Datenbankgr\u00f6\u00dfe betr\u00e4gt 85 GB und enth\u00e4lt 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 verwendet habe, um ClickHouse, clickhousedb_fdw und PostgreSQL zu vergleichen.<\/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 \/>\nW\u00c4HLE TagDerWoche, COUNT(*) AS c VON ontime WO DepDelay&gt;10 UND Jahr &gt;= 2000 UND Jahr &lt;= 2008 GRUPPIERE NACH TagDerWoche BESTELLE NACH c DESC;<\/p>\n<p>Q3<br \/>\nW\u00c4HLE Herkunft, COUNT(*) AS c VON ontime WO DepDelay&gt;10 UND Jahr &gt;= 2000 UND Jahr &lt;= 2008 GRUPPIERE NACH Herkunft BESTELLE NACH c DESC LIMIT 10;<\/p>\n<p>Q4<br \/>\nW\u00c4HLE Anbieter, COUNT(<em>) VON ontime WO DepDelay&gt;10 UND Jahr = 2007 GRUPPIERE NACH Anbieter BESTELLE NACH COUNT(<\/em>) DESC;<\/p>\n<p>Q5<br \/>\nW\u00c4HLE a.Anbieter, c, c2, c<em>1000\/c2 als c3 VON (W\u00c4HLE Anbieter, COUNT(<\/em>) AS c VON ontime WO DepDelay&gt;10 UND Jahr=2007 GRUPPIERE NACH Anbieter) a INNEN VERBINDEN (W\u00c4HLE Anbieter, COUNT(*) AS c2 VON ontime WO Jahr=2007 GRUPPIERE NACH Anbieter)b ON a.Anbieter=b.Anbieter BESTELLE NACH c3 DESC;<\/p>\n<p>Q6<br \/>\nW\u00c4HLE a.Anbieter, c, c2, c<em>1000\/c2 als c3 VON (W\u00c4HLE Anbieter, COUNT(<\/em>) AS c VON ontime WO DepDelay&gt;10 UND Jahr &gt;= 2000 UND Jahr = 2000 UND Jahr &lt;= 2008 GRUPPIERE NACH Anbieter)b ON a.Anbieter=b.Anbieter BESTELLE NACH c3 DESC;<\/p>\n<p>Q7<br \/>\nW\u00c4HLE Anbieter, AVG(DepDelay) * 1000 AS c3 VON ontime WO Jahr &gt;= 2000 UND Jahr &lt;= 2008 GRUPPIERE NACH Anbieter;<\/p>\n<p>Q8<br \/>\nW\u00c4HLE Jahr, AVG(DepDelay) VON ontime GRUPPIERE NACH Jahr;<\/p>\n<p>Q9<br \/>\nW\u00c4HLE Jahr, COUNT(*) AS c1 VON ontime GRUPPIERE NACH Jahr;<\/p>\n<p>Q10<br \/>\nW\u00c4HLE AVG(cnt) VON (W\u00c4HLE Jahr, Monat, COUNT(*) AS cnt VON ontime WO DepDel15=1 GRUPPIERE NACH Jahr, Monat) a;<\/p>\n<p>Q11<br \/>\nW\u00c4HLE AVG(c1) VON (W\u00c4HLE Jahr, Monat, COUNT(*) AS c1 VON ontime GRUPPIERE NACH Jahr, Monat) a;<\/p>\n<p>Q12<br \/>\nW\u00c4HLE HerkunftsStadtName, ZielStadtName, COUNT(*) AS c VON ontime GRUPPIERE NACH HerkunftsStadtName, ZielStadtName BESTELLE NACH c DESC LIMIT 10;<\/p>\n<p>Q13<br \/>\nW\u00c4HLE HerkunftsStadtName, COUNT(*) AS c VON ontime GRUPPIERE NACH HerkunftsStadtName BESTELLE NACH c DESC LIMIT 10;<\/p>\n<p><strong>Abfrage Enth\u00e4lt Joins<\/strong><\/p>\n<p>Q14<br \/>\nW\u00c4HLE a.Jahr, c1\/c2 VON (W\u00c4HLE Jahr, COUNT(<em>)<\/em>1000 AS c1 VON ontime WO DepDelay&gt;10 GRUPPIERE NACH Jahr) a INNEN VERBINDEN (W\u00c4HLE Jahr, COUNT(*) AS c2 VON ontime GRUPPIERE NACH Jahr) b ON a.Jahr=b.Jahr BESTELLE NACH a.Jahr;<\/p>\n<p>Q15<br \/>\nW\u00c4HLE a.Jahr, c1\/c2 VON (W\u00c4HLE Jahr, COUNT(<em>)<\/em>1000 AS c1 VON fontime WO DepDelay&gt;10 GRUPPIERE NACH Jahr) a INNEN VERBINDEN (W\u00c4HLE Jahr, COUNT(*) AS c2 VON fontime GRUPPIERE NACH Jahr) b ON a.Jahr=b.Jahr;<\/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, die bei verschiedenen Datenbankkonfigurationen ausgef\u00fchrt wurden: PostgreSQL mit und ohne Indizes, hauseigenes 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 (Indexiert)<\/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 oben genannten Tabellen und die Y-Achse zeigt die Ausf\u00fchrungszeit in Millisekunden. Die Ergebnisse von ClickHouse und die Daten, die aus Postgres mit clickhousedb_fdw abgerufen wurden, werden angezeigt. Aus der Tabelle ist ersichtlich, dass es einen enormen Unterschied zwischen PostgreSQL und ClickHouse gibt, aber nur einen minimalen Unterschied zwischen ClickHouse und clickhousedb_fdw.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Leistungstest von analytischen 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. Bei den meisten Abfragen sind die Overhead-Kosten von FDW nicht so hoch und kaum sp\u00fcrbar, au\u00dfer bei Q12. Diese Abfrage umfasst Joins und die ORDER BY-Klausel. Aufgrund der ORDER BY-Klausel werden GROUP\/BY und ORDER BY nicht von ClickHouse \u00fcbersprungen.<\/p>\n<p><\/p>\n<p>In Tabelle 2 sehen wir einen Anstieg der Zeit in den Abfragen Q12 und Q13. Ich wiederhole, dies ist auf das ORDER BY-Vorschlag zur\u00fcckzuf\u00fchren. Um dies zu best\u00e4tigen, habe ich die Abfragen Q-14 und Q-15 mit und ohne das ORDER BY-Vorschlag ausgef\u00fchrt. Ohne das ORDER BY-Vorschlag betr\u00e4gt die Abschlusszeit 259 ms, mit dem ORDER BY-Vorschlag jedoch 1364212. Zur Fehlersuche dieser Abfrage erkl\u00e4re ich beide Abfragen, und hier sind die Ergebnisse der Erl\u00e4uterung.<\/p>\n<p><\/p>\n<p>Q15: Ohne ORDER BY-Klausel<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">bm=# ERKL\u00c4REN VERBOS SELECT a.&quot;Jahr&quot;, c1\/c2 \n     VON (SELECT &quot;Jahr&quot;, count(*)*1000 AS c1 VON fontime WO &quot;DepDelay&quot; &gt; 10 GRUPPIEREN NACH &quot;Jahr&quot;) a\n     INNER JOIN(SELECT &quot;Jahr&quot;, count(*) AS c2 VON fontime GRUPPIEREN NACH &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\">ABFRAGE PLAN                                                      \nHash Join  (cost=2250.00..128516.06 rows=50000000 width=12)  \nAusgabe: fontime.&quot;Jahr&quot;, (((count(*) * 1000)) \/ b.c2)  \nInner Unique: wahr   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 auf (fontime)        \nRemote SQL: SELECT &quot;Jahr&quot;, (count(*) * 1000) VON &quot;default&quot;.ontime WO ((&quot;DepDelay&quot; &gt; 10)) GRUPPIEREN NACH &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 auf (fontime)                    \nRemote SQL: SELECT &quot;Jahr&quot;, count(*) VON &quot;default&quot;.ontime GRUPPIEREN NACH &quot;Jahr&quot;(16 rows)<\/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 VERBOS SELECT a.&quot;Jahr&quot;, c1\/c2 VON(SELECT &quot;Jahr&quot;, count(*)*1000 AS c1 VON fontime WO &quot;DepDelay&quot; &gt; 10 GRUPPIEREN NACH &quot;Jahr&quot;) a \n     INNER JOIN(SELECT &quot;Jahr&quot;, count(*) als c2 VON fontime GRUPPIEREN NACH &quot;Jahr&quot;) b  ON a.&quot;Jahr&quot;= b.&quot;Jahr&quot; \n     BESTELLEN NACH 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\">ABFRAGE PLAN \nMerge Join\u00a0 (cost=2.00..628498.02 rows=50000000 width=12)\u00a0\u00a0 \nAusgabe: fontime.&quot;Jahr&quot;, (((count(*) * 1000)) \/ (count(*)))\u00a0\u00a0 \nInner Unique: wahr\u00a0\u00a0 Merge Cond: (fontime.&quot;Jahr&quot; = fontime_1.&quot;Jahr&quot;)\u00a0\u00a0 \n-&gt;\u00a0 GroupAggregate\u00a0 (cost=1.00..499.01 rows=1 width=12)\u00a0 \u00a0 \u00a0 \u00a0 \nAusgabe: fontime.&quot;Jahr&quot;, (count(*) * 1000)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \nGruppenschl\u00fcssel: fontime.&quot;Jahr&quot;\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \n-&gt;\u00a0 Ausl\u00e4ndischer Scan auf public.fontime\u00a0 (cost=1.00..-1.00 rows=100000 width=4)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \nRemote SQL: SELECT &quot;Jahr&quot; VON &quot;default&quot;.ontime WO ((&quot;DepDelay&quot; &gt; 10)) \n            BESTELLEN NACH &quot;Jahr&quot; ASC\u00a0\u00a0 \n-&gt;\u00a0 GroupAggregate\u00a0 (cost=1.00..499.01 rows=1 width=12)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \nAusgabe: fontime_1.&quot;Jahr&quot;, count(*)\u00a0\u00a0 \u00a0 \u00a0 \u00a0 Gruppenschl\u00fcssel: fontime_1.&quot;Jahr&quot;\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \n-&gt;\u00a0 Ausl\u00e4ndischer Scan auf public.fontime fontime_1\u00a0 (cost=1.00..-1.00 rows=100000 width=4)\u00a0\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \nRemote SQL: SELECT &quot;Jahr&quot; VON &quot;default&quot;.ontime BESTELLEN NACH &quot;Jahr&quot; ASC(16 rows)<\/code><\/pre>\n<p><\/p>\n<p>Ausgabe<\/p>\n<p><\/p>\n<p>Die Ergebnisse dieser Experimente zeigen, dass ClickHouse wirklich gute Leistung bietet und clickhousedb_fdw die Leistungsvorteile von ClickHouse aus PostgreSQL heraus anbietet. Obwohl bei der Verwendung von clickhousedb_fdw einige Overhead-Kosten anfallen, sind sie unbedeutend und stehen in einem Verh\u00e4ltnis zur Leistung, die bei einem nativen Betrieb in der ClickHouse-Datenbank erzielt wird. Dies best\u00e4tigt auch, dass fdw in PostgreSQL hervorragende 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 5.0.1.1 - 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.\" \/>\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) 5.0.1.1\" \/>\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.\" \/>\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 analytischer Abfragen in PostgreSQL, ClickHouse und clickhousedb_fdw (PostgreSQL) | ProHoster","description":"In dieser Studie wollte ich sehen, welche Leistungsverbesserungen m\u00f6glich sind, wenn man ClickHouse als Datenquelle anstelle von PostgreSQL verwendet.","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.","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","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"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}]}}