{"id":456712,"date":"2025-04-21T09:04:50","date_gmt":"2025-04-21T09:04:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=456712"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=456712","title":{"rendered":"<span>\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0442\u0435\u0441\u0442\u0430 TPC-H \u0432 PostgreSQL<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0430 TPC-H \u0441 PostgreSQL \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 Q17-Q20 \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p><strong>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u0435 \u0441 PostgreSQL \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442 pg_bench \u0441 &#171;TPC-B like&#187; \u0442\u0435\u0441\u0442\u043e\u043c. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0442\u0435\u0441\u0442\u044b TPC-R \u0434\u043b\u044f \u043e\u0442\u0447\u0451\u0442\u043e\u0432, TPC-D \u0434\u043b\u044f OLAP, TPC-W \u0434\u043b\u044f \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0432 \u0432\u0435\u0431-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f. \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 TPC-D \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u0430\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 TPC-H \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (&#171;OLAP \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430&#187;). \u0412 \u0442\u0435\u0441\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f 8 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 17 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438. \u0412 TPC-H \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u043d\u043e\u043c\u0438\u043d\u0430\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 &#171;\u0434\u043e 100\u0413\u0431&#187; \u0434\u043e\u00a0 30-100\u0422\u0431. \u0422\u0435\u0441\u0442 TPC-H \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f 22 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 Q1 &#8230; Q22.<\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0442\u0435\u0441\u0442\u0430 TPC-H \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0432\u0430\u043a\u0443\u0443\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0412 \u0442\u0435\u0441\u0442\u0430\u0445 TPC-B, TPC-C, TPC-E \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0435. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435, \u0447\u0435\u043c \u0432 \u044d\u0442\u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0421\u0423\u0411\u0414 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u0442\u0435\u0441\u0442\u0430 TPC-H. \u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0430\u0443\u0434\u0438\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0421\u0423\u0411\u0414 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 1\u0413\u0431 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0434 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0421\u0423\u0411\u0414 \u0438 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0421\u0423\u0411\u0414, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f PostgreSQL, Oracle Database, MySQL. \u041f\u043e\u0441\u043b\u0435 \u0442\u0435\u0441\u0442\u0430 TPC-H \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0442\u0435\u0441\u0442 TPC-DS \u0441 99 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u043d\u043e \u043e\u043d \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0435\u043d.<\/p>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0442\u0435\u0441\u0442\u0430 TPC-H<\/strong><\/p>\n<pre><code class=\"sql\">mkdir gotpc cd gotpc wget https:\/\/raw.githubusercontent.com\/pingcap\/go-tpc\/master\/install.sh chmod +x install.sh .\/install.sh cd $HOME\/.go-tpc\/bin time .\/go-tpc tpch prepare -d postgres -U postgres -p 'postgres' -D gotpch -H 127.0.0.1 -P 5432 --conn-params sslmode=disable psql -d gotpch \\dt+                                      List of relations  Schema |   Name   | Type  |  Owner   | Persistence | Access method |  Size   | Description  --------+----------+-------+----------+-------------+---------------+---------+  public | customer | table | postgres | permanent   | heap          | 30 MB   |   public | lineitem | table | postgres | permanent   | heap          | 973 MB  |   public | nation   | table | postgres | permanent   | heap          | 40 kB   |   public | orders   | table | postgres | permanent   | heap          | 221 MB  |   public | part     | table | postgres | permanent   | heap          | 34 MB   |   public | partsupp | table | postgres | permanent   | heap          | 146 MB  |   public | region   | table | postgres | permanent   | heap          | 40 kB   |   public | supplier | table | postgres | permanent   | heap          | 1912 kB |  (8 rows) select count(*) from lineitem;   count ---------  6001215 (1 row) <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442, \u043d\u043e \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041d\u0430 \u0432\u0441\u0435\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u043e\u0433\u043e PostgreSQL \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0434\u043e\u043b\u0433\u043e &#8212; \u0447\u0430\u0441 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435. \u0427\u0435\u043c \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e?<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0421\u0423\u0411\u0414 \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u0441\u0442 \u0438 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0421\u0423\u0411\u0414 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0437\u0430 \u043c\u0438\u043d\u0443\u0442\u0443, \u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0430\u0441-\u0434\u0432\u0430 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435. \u041a\u0442\u043e-\u0442\u043e \u0438\u0437 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0421\u0423\u0411\u0414 \u00a0&#171;\u043f\u043e\u0434\u0432\u0438\u0441\u043b\u0430&#187;, \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0421\u0423\u0411\u0414 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u043f\u0440\u043e\u0439\u0442\u0438 \u0442\u0435\u0441\u0442. \u0422\u0430\u043a\u0430\u044f \u0421\u0423\u0411\u0414 \u0432\u0440\u044f\u0434 \u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0421\u0423\u0411\u0414 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430 \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0442\u043e \u0432\u0435\u043b\u0438\u043a\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043e\u043d\u0430 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. \u0422\u043e, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 (\u0434\u043e \u043f\u043e\u043b\u0443\u0442\u043e\u0440\u0430 \u0440\u0430\u0437), \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430, \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u043e\u043b\u044c\u0448\u0435, \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438. \u0415\u0441\u043b\u0438, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0444\u043e\u0440\u043a\u0438 Greenplum \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b TPC-H, \u0442\u043e \u043e\u043d\u0438 \u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c\u0441\u044f, \u0432\u043c\u0435\u0441\u0442\u043e \u0444\u043e\u0440\u043a\u043e\u0432 PostgreSQL. \u0412 \u0442\u0435\u0441\u0442\u0435 TPC-H \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435 \u0432\u0435\u0440c\u0438\u0438 PostgreSQL \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u043e &#8212; \u0447\u0430\u0441 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435. \u042d\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 Q17.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 Q17<\/strong><\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 Q17 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0430\u0441\u0430. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e &#8212; \u0437\u0430 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0417\u0430\u043f\u0440\u043e\u0441\u044b Q18-Q20 \u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0433\u043e \u043d\u0430 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0438\u043b\u0438 \u0444\u043e\u0440\u043a\u0430\u0445 PostgreSQL.<\/p>\n<p>\u0412 \u00a02017 \u0433\u043e\u0434\u0443 (\u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432\u0435\u0440\u0441\u0438\u044f PostgreSQL 9.5) \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 Q20 \u043e\u0442 \u0447\u0430\u0441\u0430 \u0434\u043e 19 \u0447\u0430\u0441\u043e\u0432: <a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/CAOGQiiMsnM-cGjCfnpWQNyrzjf%3DFM0s_3hn1guqficSmwWWVfw%40mail.gmail.com\" rel=\"noopener noreferrer nofollow\">https:\/\/www.postgresql.org\/message-id\/flat\/CAOGQiiMsnM-cGjCfnpWQNyrzjf%3DFM0s_3hn1guqficSmwWWVfw%40mail.gmail.com<\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043b\u0433\u043e, \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0436\u0435\u043b\u0435\u0437\u0430. \u0427\u0435\u0440\u0435\u0437 3 \u043c\u0435\u0441\u044f\u0446\u0430 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 (\u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0434\u043b\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430) \u0422\u043e\u043c \u041b\u0435\u0439\u043d \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443: <code>Maybe not with the rest of them, but we're certainly having an issue there with Q20<\/code>.<\/p>\n<p>\u041f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 Q17 \u0442\u0430\u043a\u0438\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430 \u0432\u0441\u0435\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 PostgreSQL. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u044b\u043b\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430: <a href=\"https:\/\/www.enterprisedb.com\/blog\/tpc-h-performance-postgresql-83\" rel=\"noopener noreferrer nofollow\">https:\/\/www.enterprisedb.com\/blog\/tpc-h-performance-postgresql-83<\/a> \u0411\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e: &#171;We can clearly see that most of the queries (up to Q17) got faster, but then two of the queries (Q18 and Q20) got somewhat slower&#187;. <a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/17153-bd309320429d24b7%40postgresql.org\" rel=\"noopener noreferrer nofollow\">https:\/\/www.postgresql.org\/message-id\/flat\/17153-bd309320429d24b7%40postgresql.org<\/a><\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u0421\u0423\u0411\u0414 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u044d\u0442\u0438\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438. \u0417\u0430\u043f\u0440\u043e\u0441\u044b Q17..Q20 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u044b \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0411\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043d\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043a\u043b\u044e\u0447\u0430: <a href=\"https:\/\/www.percona.com\/blog\/improving_tpc_h_like_queries_q17\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.percona.com\/blog\/improving_tpc_h_like_queries_q17\/<\/a><\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0442\u0435\u0441\u0442\u0430 TPC-H \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0438\u0442\u043e\u043c. \u0411\u044b\u043b \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d \u0431\u0430\u0433 \u0440\u0435\u043f\u043e\u0440\u0442 <a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/17153-bd309320429d24b7%40postgresql.org\" rel=\"noopener noreferrer nofollow\">https:\/\/www.postgresql.org\/message-id\/flat\/17153-bd309320429d24b7%40postgresql.org<\/a> \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u0435\u0441\u0442\u043e\u0432 HammerDB \u0443\u0432\u0438\u0434\u0435\u0432, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0421\u0423\u0411\u0414 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0437\u0430 \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u043e \u0447\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043f\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043b\u044e\u0447\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438 \u0421\u0423\u0411\u0414 \u043d\u0435 \u0440\u0430\u0441\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0438\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0421\u0423\u0411\u0414. \u0415\u0441\u043b\u0438 \u0442\u0435\u0441\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0421\u0423\u0411\u0414, \u0442\u043e \u0442\u0435\u0441\u0442 \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c. \u0422\u0435\u0441\u0442 HammerDB \u043d\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u0442\u0435\u0441\u0442 TPC.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 Q17 \u043d\u0430 PostgreSQL \u0432\u0435\u0440\u0441\u0438\u0438 17<\/strong><\/p>\n<pre><code class=\"sql\">explain (analyze, buffers on, timing off) select sum(l_extendedprice) \/ 7.0 as avg_yearly from lineitem, part where p_partkey = l_partkey and p_brand = 'Brand#43' and p_container = 'LG PACK' and l_quantity &lt; ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey);                                  QUERY PLAN ---------------------------------------------------------------------  Aggregate  (cost=2202829.63..2202829.64 rows=1 width=32) (actual rows=1 loops=1)    Buffers: shared hit=59294965 read=696952753    -&gt;  Hash Join  (cost=7350.36..2202824.90 rows=1890 width=8) (actual rows=538 loops=1)          Hash Cond: (lineitem.l_partkey = part.p_partkey)          Join Filter: (lineitem.l_quantity &lt; (SubPlan 1))          Rows Removed by Join Filter: 5535          Buffers: shared hit=59294965 read=696952753          -&gt;  Seq Scan on lineitem  (cost=0.00..184517.24 rows=6001224 width=21) (actual rows=6001215 loops=1)                Buffers: shared hit=9731 read=114774          -&gt;  Hash  (cost=7348.00..7348.00 rows=189 width=8) (actual rows=203 loops=1)                Buckets: 1024  Batches: 1  Memory Usage: 16kB                Buffers: shared hit=161 read=4187                -&gt;  Seq Scan on part  (cost=0.00..7348.00 rows=189 width=8) (actual rows=203 loops=1)                      Filter: ((p_brand = 'Brand#43'::bpchar) AND (p_container = 'LG PACK'::bpchar))                      Rows Removed by Filter: 199797                      Buffers: shared hit=161 read=4187          SubPlan 1            -&gt;  Aggregate  (cost=199520.38..199520.39 rows=1 width=32) (actual rows=1 loops=6073)                  Buffers: shared hit=59285073 read=696833792                  -&gt;  Seq Scan on lineitem lineitem_1  (cost=0.00..199520.30 rows=32 width=5) (actual rows=31 loops=6073)                        Filter: (l_partkey = part.p_partkey)                        Rows Removed by Filter: 6001184                        Buffers: shared hit=59285073 read=696833792  Planning:    Buffers: shared hit=8  Planning Time: 0.247 ms   Execution Time: 4089201.631 ms (30 rows) Time: 4089203,084 ms (01:08:09,203) <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 Q17 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 <strong>\u0447\u0430\u0441\u0430<\/strong>.<\/p>\n<p><strong>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/strong><\/p>\n<pre><code class=\"sql\">CREATE INDEX LINEITEM_PART_SUPP_FKIDX ON LINEITEM (L_PARTKEY,L_SUPPKEY); explain (analyze, buffers, timing off) select sum(l_extendedprice) \/ 7.0 as avg_yearly from lineitem, part where p_partkey = l_partkey and p_brand = 'Brand#43' and p_container = 'LG PACK' and l_quantity &lt; ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey);                                                                QUERY PLAN -------------------------------------------------------  Aggregate  (cost=209175.16..209175.17 rows=1 width=32) (actual rows=1 loops=1)    Buffers: shared hit=205522 read=129512    -&gt;  Hash Join  (cost=7355.50..209170.16 rows=2000 width=8) (actual rows=538 loops=1)          Hash Cond: (lineitem.l_partkey = part.p_partkey)          Join Filter: (lineitem.l_quantity &lt; (SubPlan 1))          Rows Removed by Join Filter: 5535          Buffers: shared hit=205522 read=129512          -&gt;  Seq Scan on lineitem  (cost=0.00..184744.57 rows=6001057 width=21) (actual rows=6001215 loops=1)                Buffers: shared hit=5738 read=118996          -&gt;  Hash  (cost=7353.00..7353.00 rows=200 width=8) (actual rows=203 loops=1)                Buckets: 1024  Batches: 1  Memory Usage: 16kB                Buffers: shared read=4353                -&gt;  Seq Scan on part  (cost=0.00..7353.00 rows=200 width=8) (actual rows=203 loops=1)                      Filter: ((p_brand = 'Brand#43'::bpchar) AND (p_container = 'LG PACK'::bpchar))                      Rows Removed by Filter: 199797                      Buffers: shared read=4353          SubPlan 1            -&gt;  Aggregate  (cost=131.71..131.72 rows=1 width=32) (actual rows=1 loops=6073)                  Buffers: shared hit=199784 read=6163                  -&gt;  Bitmap Heap Scan on lineitem lineitem_1  (cost=4.68..131.62 rows=32 width=5) (actual rows=31 loops=6073)                        Recheck Cond: (l_partkey = part.p_partkey)                        Heap Blocks: exact=187549                        Buffers: shared hit=199784 read=6163                        -&gt;  Bitmap Index Scan on lineitem_part_supp_fkidx  (cost=0.00..4.67 rows=32 width=0) (actual rows=31 loops=6073)                              Index Cond: (l_partkey = part.p_partkey)                              Buffers: shared hit=18159 read=239  Planning:    Buffers: shared hit=4 read=12  Planning Time: 0.325 ms  Execution Time: 2118.095 ms (30 rows) Time: 2118.826 ms (00:02.119)<\/code><\/pre>\n<p>\u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f Bitmap Index Scan on lineitem_part_supp_fkidx \u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0442\u0430\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0437\u0430 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c &#171;\u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0438\u043d\u0434\u0435\u043a\u0441 \u0438 \u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b&#187;, \u043d\u043e \u0446\u0435\u043b\u044c \u0442\u0435\u0441\u0442\u0430 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441, \u0430 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 &#8212; \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0421\u0423\u0411\u0414 \u043f\u0440\u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0421\u0423\u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043b\u044e\u0431\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 &#8212; \u0431\u0435\u0437 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438, \u0442\u043e \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435.<\/p>\n<p><strong>\u041a\u0430\u043a \u0437\u0430\u043f\u0440\u043e\u0441 Q17 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 Oracle Database?<\/strong><\/p>\n<p>\u042d\u0442\u043e \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0430\u044f \u0421\u0423\u0411\u0414, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430. \u0414\u043e \u0432\u0435\u0440\u0441\u0438\u0438 9.0 \u0437\u0430\u043f\u0440\u043e\u0441 Q17 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0433\u043e &#8212; 5 \u043c\u0438\u043d\u0443\u0442, \u043d\u0435 \u0447\u0430\u0441\u044b. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 9i \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0431\u044b\u043b\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u044b \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 Q17 \u0437\u0430 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0437\u0430 \u0434\u043e\u043b\u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0443 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0421\u0423\u0411\u0414. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438\u0437-\u0437\u0430 \u0442\u0435\u0441\u0442\u0430 TPC-H, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 Q17, \u043f\u043e\u0448\u043b\u043e \u0440\u0430\u0441\u0445\u043e\u0436\u0435\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 &#171;PostgreSQL \u044d\u0442\u043e \u0443\u0440\u043e\u0432\u0435\u043d\u044c Oracle \u0432\u0435\u0440\u0441\u0438\u0438 8i&#187;. \u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0442\u0430\u043a \u0438 \u0435\u0441\u0442\u044c &#8212; \u0434\u0430\u0436\u0435 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 PostgreSQL \u0437\u0430\u043f\u0440\u043e\u0441 Q17 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 PostgreSQL. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Oracle \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043f\u043e\u0434 \u0442\u0435\u0441\u0442\u044b TPC. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a: \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u0437\u0430 \u0434\u043e\u043b\u0438 \u0441\u0435\u043a\u0443\u043d\u0434 \u043c\u0430\u043b\u043e\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u0421\u0423\u0411\u0414 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<p>\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 TPC-H\u0432 Oracle Database \u043e\u0442 \u0434\u043e\u043b\u0435\u0439 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0434\u043e 3 \u0441\u0435\u043a\u0443\u043d\u0434, \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c (\u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f dynamic sampling) \u043d\u0438 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 9 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435\u0442 &#171;\u0437\u0430\u0442\u044b\u043a\u043e\u0432&#187;. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0442\u044b\u0434\u043d\u043e \u0437\u0430 PostgreSQL, \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 TPC-H \u0432 Oracle Database \u0441\u043a\u0440\u044b\u0442\u044b:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<p><em>Elapsed: 00:00:03.132 Elapsed: 00:00:00.331 Elapsed: 00:00:01.116 Elapsed: 00:00:01.582 Elapsed: 00:00:01.112 Elapsed: 00:00:00.917 Elapsed: 00:00:01.935 Elapsed: 00:00:01.109 Elapsed: 00:00:00.634 Elapsed: 00:00:02.800 Elapsed: 00:00:00.946 Elapsed: 00:00:00.651 Elapsed: 00:00:00.674 Elapsed: 00:00:01.348 Elapsed: 00:00:01.334 Elapsed: 00:00:03.534 Elapsed: 00:00:02.395 Elapsed: 00:00:03.035 Elapsed: 00:00:00.260<\/em><\/p>\n<\/div>\n<\/details>\n<p><strong>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 Q17 \u0432 Oracle Database<\/strong><\/p>\n<pre><code class=\"sql\">select cast(sum(l_extendedprice) \/ 7.0 as dec(18,2)) as avg_yearly from lineitem,part where p_partkey = l_partkey and p_brand = 'Brand#23' and p_container = 'MED BOX' and l_quantity &lt; (select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey) ------------------------------------------------------------------------------------- | Id  | Operation               | Name      | Rows  | Bytes | Cost (%CPU)| Time     | ------------------------------------------------------------------------------------- |   0 | SELECT STATEMENT        |           |       |       | 60383 (100)|          | |   1 |  SORT AGGREGATE         |           |     1 |    13 |            |          | |   2 |   VIEW                  | VM_NWVW_2 | 81599 |  1035K| 60383   (1)| 00:00:03 | |*  3 |    FILTER               |           |       |       |            |          | |   4 |     HASH GROUP BY       |           | 81599 |     9M| 60383   (1)| 00:00:03 | |*  5 |      HASH JOIN          |           | 81599 |     9M| 60380   (1)| 00:00:03 | |*  6 |       HASH JOIN         |           |  3160 |   231K| 30713   (1)| 00:00:02 | |*  7 |        TABLE ACCESS FULL| PART      |   122 |  5978 |  1051   (1)| 00:00:01 | |   8 |        TABLE ACCESS FULL| LINEITEM  |  6319K|   156M| 29641   (1)| 00:00:02 | |   9 |       TABLE ACCESS FULL | LINEITEM  |  6319K|   307M| 29646   (1)| 00:00:02 | Predicate Information (identified by operation id): ---------------------------------------------------    3 - filter(\"L_QUANTITY\"&lt;.2*(SUM(\"L_QUANTITY\")\/COUNT(\"L_QUANTITY\")))    5 - access(\"P_PARTKEY\"=\"L_PARTKEY\")    6 - access(\"L_PARTKEY\"=\"P_PARTKEY\")    7 - filter((\"P_BRAND\"='Brand#23' AND \"P_CONTAINER\"='MED BOX'))  Note - dynamic statistics used: dynamic sampling (level=2) Elapsed: 00:00:00.658<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 Q17 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0430 0.7 \u0441\u0435\u043a\u0443\u043d\u0434<strong> \u0441 \u0444\u0443\u043b\u043b\u0441\u043a\u0430\u043d\u043e\u043c \u0442\u0430\u0431\u043b\u0438\u0446, \u0431\u0435\u0437 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/strong>, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0432 PostgreSQL \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0430\u0441\u0430, \u0430 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438 ~9 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>Oracle \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e complex view merging (\u0441\u0442\u0440\u043e\u043a\u0430 VIEW VM_NWVW_2) \u00a0<a href=\"https:\/\/blogs.oracle.com\/optimizer\/post\/optimizer-transformations-view-merging-part-2\" rel=\"noopener noreferrer nofollow\">https:\/\/blogs.oracle.com\/optimizer\/post\/optimizer-transformations-view-merging-part-2<\/a> <\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 Q17, \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c Oracle:<\/p>\n<pre><code class=\"sql\">Final query after transformations:******* UNPARSED QUERY IS ******* SELECT SUM(\"VW_WIF_1\".\"ITEM_1\")\/7.0 \"AVG_YEARLY\" FROM  (SELECT CASE  WHEN \"LINEITEM\".\"L_QUANTITY\"&lt;0.2*AVG(\"LINEITEM\".\"L_QUANTITY\") OVER ( PARTITION BY \"LINEITEM\".\"L_PARTKEY\") THEN \"LINEITEM\".\"L_EXTENDEDPRICE\" END  \"ITEM_1\" FROM \"TPCH_1GB\".\"PART\" \"PART\",\"TPCH_1GB\".\"LINEITEM\" \"LINEITEM\" WHERE \"PART\".\"P_CONTAINER\"='LG PACK' AND \"PART\".\"P_BRAND\"='Brand#43' AND \"PART\".\"P_PARTKEY\"=\"LINEITEM\".\"L_PARTKEY\") \"VW_WIF_1\"<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0443\u0431\u0440\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438, \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432 PostgreSQL:<\/p>\n<pre><code class=\"sql\">SELECT SUM(VW.ITEM_1)\/7.0 AVG_YEARLY FROM (SELECT CASE  WHEN l.L_QUANTITY&lt;0.2*AVG(l.L_QUANTITY)       OVER ( PARTITION BY l.L_PARTKEY)       THEN l.L_EXTENDEDPRICE END  ITEM_1 FROM PART p,       LINEITEM l WHERE p.P_CONTAINER='LG PACK'       AND p.P_BRAND='Brand#43' AND p.P_PARTKEY=l.L_PARTKEY) VW;<\/code><\/pre>\n<p>\u041d\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430 Oracle 8i \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f 5 \u043c\u0438\u043d\u0443\u0442. \u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e, \u043d\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043d\u0430 PostgreSQL:<\/p>\n<pre><code class=\"sql\">alter session set optimizer_features_enable='8.1.7'; set timing on; select sum(l_extendedprice) \/ 7.0 as avg_yearly from lineitem, part where p_partkey = l_partkey and p_brand = 'Brand#43' and p_container = 'LG PACK' and l_quantity &lt; ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey); AVG_YEARLY ---------- 309865.026 Elapsed: 00:05:19.398 SELECT * FROM table (dbms_xplan.display_cursor); ----------------------------------------------------------------- | Id  | Operation            | Name     | Rows  | Bytes | Cost  | |   0 | SELECT STATEMENT     |          |       |       | 17169 | |   1 |  SORT AGGREGATE      |          |     1 |    41 |       | |*  2 |   FILTER             |          |       |       |       | |*  3 |    HASH JOIN         |          |  6002 |   240K| 17169 | |*  4 |     TABLE ACCESS FULL| PART     |   202 |  5454 |   586 | |   5 |     TABLE ACCESS FULL| LINEITEM |  6001K|    80M| 16568 | |   6 |    SORT AGGREGATE    |          |     1 |     8 |       | |*  7 |     TABLE ACCESS FULL| LINEITEM |    30 |   240 | 16568 | -----------------------------------------------------------------   Predicate Information (identified by operation id): ---------------------------------------------------    2 - filter(\"L_QUANTITY\"&lt;)    3 - access(\"P_PARTKEY\"=\"L_PARTKEY\")    4 - filter((\"P_BRAND\"='Brand#43' AND \"P_CONTAINER\"='LG PACK'))    7 - filter(\"L_PARTKEY\"=:B1)<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430 PostgreSQL: \u0432 2010 \u0433\u043e\u0434\u0443 Greenplum \u0431\u044b\u043b \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b \u0442\u0435\u0441\u0442 TPC-H  (<a href=\"https:\/\/tholis.webnode.page\/news\/tpc-h-fun-with-greenplum-single-node-edition-\/\" rel=\"noopener noreferrer nofollow\">https:\/\/tholis.webnode.page\/news\/tpc-h-fun-with-greenplum-single-node-edition-\/<\/a>) \u0410 \u0441\u0435\u0439\u0447\u0430\u0441 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 Clickhouse \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u0430\u043a Greenplum 15 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 <a href=\"https:\/\/github.com\/ClickHouse\/ClickHouse\/issues\/6697\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/ClickHouse\/ClickHouse\/issues\/6697<\/a><\/p>\n<p><strong>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 PostgreSQL<\/strong><\/p>\n<p>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a Oracle \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441<\/p>\n<pre><code class=\"sql\">select sum(l_extendedprice) \/ 7.0 as avg_yearly from lineitem, part where p_partkey = l_partkey and p_brand = 'Brand#43' and p_container = 'LG PACK' and l_quantity &lt; ( select 0.2 * avg(l_quantity)                           from lineitem where l_partkey = p_partkey);<\/code><\/pre>\n<p>\u0432 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442:<\/p>\n<pre><code class=\"sql\">SELECT SUM(VW.ITEM_1)\/7.0 AVG_YEARLY FROM (SELECT CASE  WHEN l.L_QUANTITY&lt;0.2*AVG(l.L_QUANTITY)       OVER ( PARTITION BY l.L_PARTKEY)       THEN l.L_EXTENDEDPRICE END  ITEM_1 FROM PART p,       LINEITEM l WHERE p.P_CONTAINER='LG PACK'       AND p.P_BRAND='Brand#43' AND p.P_PARTKEY=l.L_PARTKEY) VW;<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c Oracle \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 PostgreSQL 17.<br \/>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 <strong>\u0443\u0431\u0435\u0440\u0451\u043c \u0447\u0438\u0442 (\u0438\u043d\u0434\u0435\u043a\u0441)<\/strong>:<\/p>\n<pre><code class=\"sql\">drop index lineitem_part_supp_fkidx;<\/code><\/pre>\n<pre><code class=\"sql\">set parallel_setup_cost = 1000000000; \\timing on \\\\ explain (analyze, buffers, timing off) SELECT SUM(VW.ITEM_1)\/7.0 \"AVG_YEARLY\" FROM  (SELECT CASE  WHEN l.L_QUANTITY&lt;0.2*AVG(l.L_QUANTITY) OVER ( PARTITION BY l.L_PARTKEY) THEN l.L_EXTENDEDPRICE END  ITEM_1 FROM PART p, LINEITEM l WHERE p.P_CONTAINER='LG PACK' AND p.P_BRAND='Brand#43' AND p.P_PARTKEY=l.L_PARTKEY) VW;                               QUERY PLAN  ----------------------------------------------------  Aggregate  (cost=208229.18..208229.19 rows=1 width=32) (actual rows=1 loops=1)    Buffers: shared hit=512 read=128340    -&gt;  WindowAgg  (cost=208009.69..208150.79 rows=6271 width=40) (actual rows=6073 loops=1)          Buffers: shared hit=512 read=128340          -&gt;  Sort  (cost=208009.69..208025.37 rows=6271 width=21) (actual rows=6073 loops=1)                Sort Key: l.l_partkey                Sort Method: quicksort  Memory: 477kB                Buffers: shared hit=512 read=128340                -&gt;  Hash Join  (cost=7349.61..207614.16 rows=6271 width=21) (actual rows=6073 loops=1)                      Hash Cond: (l.l_partkey = p.p_partkey)                      Buffers: shared hit=512 read=128340                      -&gt;  Seq Scan on lineitem l  (cost=0.00..184512.30 rows=6000730 width=21) (actual rows=6001215 loops=1)                            Buffers: shared hit=256 read=124249                      -&gt;  Hash  (cost=7347.00..7347.00 rows=209 width=8) (actual rows=203 loops=1)                            Buckets: 1024  Batches: 1  Memory Usage: 16kB                            Buffers: shared hit=256 read=4091                            -&gt;  Seq Scan on part p  (cost=0.00..7347.00 rows=209 width=8) (actual rows=203 loops=1)                                  Filter: ((p_container = 'LG PACK'::bpchar) AND (p_brand = 'Brand#43'::bpchar))                                  Rows Removed by Filter: 199797                                  Buffers: shared hit=256 read=4091  Planning:    Buffers: shared hit=8  Planning Time: 0.201 ms  Execution Time: 2079.081 ms (27 rows) Time: 2079,664 ms (00:02,080)<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 <strong>\u0431\u0435\u0437 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446 \u043d\u0430 PostgreSQL \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0441\u044f \u0437\u0430 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/strong>, \u0434\u0430\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p>\n<p>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043b\u0430\u043d\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u044c \u043f\u043b\u0430\u043d. \u0421 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u0435\u043c (2 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430) \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 798,561 ms. \u0420\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u0435 \u0432 PostgreSQL \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a Oracle Database \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u043e\u043d \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441. \u0421\u043b\u043e\u0436\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 Q17 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043a\u043e\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 Oracle Database \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"sql\">alter session set events '10053 trace name context forever,level 1'; alter session set max_dump_file_size = unlimited; \u0437\u0430\u043f\u0440\u043e\u0441\u044b; alter session set events '10053 trace name context off';<\/code><\/pre>\n<p>\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u043f\u043e\u0441\u043b\u0435 \u0444\u0440\u0430\u0437\u044b &#171;<code>Final query after transformations:<\/code>&#171;.<\/p>\n<p>\u0412 PostgreSQL \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>debug_print_rewritten<\/code>, \u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439, \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0432 PostgreSQL \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e.<\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 \u0432 OracleDatabase:<\/p>\n<p><code><sub>***************************************<br \/> join predicate push-down<br \/> filter push-down<br \/> predicate move-around<br \/> complex view merging<br \/> select-project-join<br \/> set join conversion<br \/> subquery unnesting<br \/> order by elimination<br \/> star transformation<br \/> count(col) to count(*) transformation<br \/> Join Elimination<br \/> join factorization<br \/> connect by<br \/> select list pruning<br \/> distinct placement<br \/> vector transformation<br \/> Approximate Aggregate Transformation<br \/> OR-Expansion<br \/> Legacy OR-Expansion<br \/> ***************************************    <\/sub><\/code><\/p>\n<p>\u0412 \u0441\u043f\u0438\u0441\u043a\u0435 \u0434\u0430\u0436\u0435 \u0435\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0449\u0430\u044f count(\u0441\u0442\u043e\u043b\u0431\u0435\u0446) \u043d\u0430 count(*), \u0442\u0430\u043a \u043a\u0430\u043a count(*) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Oracle Database, \u043d\u043e \u0438 PostgreSQL, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e\u043a\u0430 \u043d\u0435\u0442. \u0412\u0430\u0436\u043d\u044b \u043d\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439, \u0430 \u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u0422\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>complex view merging<\/code> \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0432 Oracle Database \u0438 \u0434\u043e 9i \u0432\u0435\u0440\u0441\u0438\u0438, \u043d\u043e \u0431\u0435\u0437 \u043e\u043a\u043e\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>\u0414\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u043e\u043a \u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0435\u0439, \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0439 \u043f\u043e\u043b\u0435\u0437\u043d\u044b. \u0422\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0432 PostgreSQL \u0438 \u0434\u0430\u044e\u0442, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c\u0441\u044f \u0432 PostgreSQL. \u041a\u043e\u0433\u0434\u0430 \u044f \u0433\u043e\u0442\u043e\u0432\u0438\u043b \u0441\u0442\u0430\u0442\u044c\u044e, \u043c\u043d\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u043d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435, \u0431\u044b\u043b \u0434\u043e\u043a\u043b\u0430\u0434 \u0421\u0435\u0440\u0433\u0435\u044f \u0421\u043e\u043b\u043e\u0432\u044c\u0451\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 Q17 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u0435\u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f PgBootcamp <a href=\"https:\/\/pgbootcamp.ru\/\" rel=\"noopener noreferrer nofollow\">https:\/\/pgbootcamp.ru\/<\/a>. \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430, \u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u043e\u043d\u043b\u0430\u0439\u043d, \u043d\u043e \u044d\u0442\u043e\u0442 \u0434\u043e\u043a\u043b\u0430\u0434 \u044f \u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0435\u043c \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6ac\/7e5\/a0c\/6ac7e5a0cca808aed9f72980d29b8f16.jpg\" alt=\"\u0434\u043e\u043a\u043b\u0430\u0434 \u0421\u0435\u0440\u0433\u0435\u044f \u0421\u043e\u043b\u043e\u0432\u044c\u0451\u0432\u0430 \u043d\u0430 PgBootcamp 2025\" title=\"\u0434\u043e\u043a\u043b\u0430\u0434 \u0421\u0435\u0440\u0433\u0435\u044f \u0421\u043e\u043b\u043e\u0432\u044c\u0451\u0432\u0430 \u043d\u0430 PgBootcamp 2025\" width=\"808\" height=\"420\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/6ac\/7e5\/a0c\/6ac7e5a0cca808aed9f72980d29b8f16.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6ac\/7e5\/a0c\/6ac7e5a0cca808aed9f72980d29b8f16.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0434\u043e\u043a\u043b\u0430\u0434 \u0421\u0435\u0440\u0433\u0435\u044f \u0421\u043e\u043b\u043e\u0432\u044c\u0451\u0432\u0430 \u043d\u0430 PgBootcamp 2025<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0432 \u0434\u043e\u043a\u043b\u0430\u0434\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f &#171;\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 Q17&#187; \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0414\u043e\u043a\u043b\u0430\u0434\u0447\u0438\u043a \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043a\u0430\u043a\u0443\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 Q17, \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043d\u0430 &#171;what-if&#187;: \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b \u0433\u043e\u0434\u043e\u0432\u043e\u0439 \u0432\u044b\u0440\u0443\u0447\u043a\u0438 \u0431\u044b\u043b\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u0437\u0430\u043a\u0430\u0437\u044b \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0430\u0440\u0442\u0438\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0430 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u043b\u0430 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043f\u0440\u0438\u0431\u044b\u043b\u044c.<\/p>\n<p>\u041d\u0430 PgConf \u043c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0434\u043e\u043a\u043b\u0430\u0434 \u041f\u0430\u0432\u043b\u0430 \u041b\u0443\u0437\u0430\u043d\u043e\u0432\u0430, \u0430 \u043d\u0430 PgBootcamp \u0432\u0441\u0442\u0443\u043f\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0447\u044c \u0411\u0440\u044e\u0441\u0430 \u041c\u043e\u043c\u0436\u0430\u043d\u0430. \u041a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 \u043f\u0440\u043e\u0448\u043b\u0438 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0438 \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043e\u043a\u043b\u0430\u0434\u043e\u0432 \u043e\u0431\u0435\u0438\u0445 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043a\u043e\u0440\u043e \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f.<\/p>\n<p>\u041a\u043e\u0434 \u043f\u0430\u0442\u0447\u0430 \u0432\u044b\u043b\u043e\u0436\u0435\u043d \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f <a href=\"https:\/\/github.com\/TantorLabs\/meetups\/tree\/main\/2025-04-10_Ekb\/Maxim%20Milutin%2C%20Sergey%20Solovev%20-%20Hacking%20query%20planner%2C%20again...%20and%20again\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/TantorLabs\/meetups\/tree\/main\/2025-04-10_Ekb\/Maxim%20Milutin%2C%20Sergey%20Solovev%20-%20Hacking%20query%20planner%2C%20again&#8230;%20and%20again<\/a> \u0422\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0444\u043e\u0440\u043a\u043e\u0432 PostgreSQL \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430\u0434 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430. \u041f\u0430\u0442\u0447 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u043d\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0441\u044f\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<p>\u0412 PostgreSQL \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b CREATE RULE \u0438 \u0434\u0430\u0436\u0435 CREATE TRANSFORM, \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u043a \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0443 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0434\u0435\u043a\u0430\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 &#171;\u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u0438 PostgreSQL&#187;, \u043a\u043e\u0434 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u0443\u0436\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u044f\u0434\u0440\u043e PostgreSQL. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u044f\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u0434\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430. \u041d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441 \u0442\u043e, \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e &#8212; \u0432 12 \u0432\u0435\u0440\u0441\u0438\u0438 PostgreSQL.<\/p>\n<p><strong>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 Q17 \u0442\u0435\u0441\u0442\u0430 TPC-H \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0434\u043e\u043b\u0433\u043e \u0432 PostgreSQL. \u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445. \u0417\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0437\u0430 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (queryrewrite\/transform), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u042d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442 \u0431\u044b\u043b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c Oracle Database. \u0423 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 Oracle \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0427\u0430\u0441\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043a\u0438. \u0411\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c Oracle \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0422\u0430\u043a\u0436\u0435 \u0431\u044b\u043b \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 Q17 \u043f\u0443\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c. \u0414\u0430\u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0430\u0442\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a PostgreSQL.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/901528\/\"> https:\/\/habr.com\/ru\/articles\/901528\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0430 TPC-H \u0441 PostgreSQL \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 Q17-Q20 \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p><strong>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u0435 \u0441 PostgreSQL \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442 pg_bench \u0441 &#171;TPC-B like&#187; \u0442\u0435\u0441\u0442\u043e\u043c. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0442\u0435\u0441\u0442\u044b TPC-R \u0434\u043b\u044f \u043e\u0442\u0447\u0451\u0442\u043e\u0432, TPC-D \u0434\u043b\u044f OLAP, TPC-W \u0434\u043b\u044f \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0432 \u0432\u0435\u0431-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f. \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 TPC-D \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u0430\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 TPC-H \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (&#171;OLAP \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430&#187;). \u0412 \u0442\u0435\u0441\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f 8 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 17 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438. \u0412 TPC-H \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u043d\u043e\u043c\u0438\u043d\u0430\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 &#171;\u0434\u043e 100\u0413\u0431&#187; \u0434\u043e\u00a0 30-100\u0422\u0431. \u0422\u0435\u0441\u0442 TPC-H \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f 22 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 Q1 &#8230; Q22.<\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0442\u0435\u0441\u0442\u0430 TPC-H \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0432\u0430\u043a\u0443\u0443\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0412 \u0442\u0435\u0441\u0442\u0430\u0445 TPC-B, TPC-C, TPC-E \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0435. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435, \u0447\u0435\u043c \u0432 \u044d\u0442\u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0421\u0423\u0411\u0414 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u0442\u0435\u0441\u0442\u0430 TPC-H. \u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0430\u0443\u0434\u0438\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0421\u0423\u0411\u0414 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 1\u0413\u0431 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0434 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0421\u0423\u0411\u0414 \u0438 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0421\u0423\u0411\u0414, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f PostgreSQL, Oracle Database, MySQL. \u041f\u043e\u0441\u043b\u0435 \u0442\u0435\u0441\u0442\u0430 TPC-H \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0442\u0435\u0441\u0442 TPC-DS \u0441 99 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u043d\u043e \u043e\u043d \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0435\u043d.<\/p>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0442\u0435\u0441\u0442\u0430 TPC-H<\/strong><\/p>\n<pre><code class=\"sql\">mkdir gotpc cd gotpc wget https:\/\/raw.githubusercontent.com\/pingcap\/go-tpc\/master\/install.sh chmod +x install.sh .\/install.sh cd $HOME\/.go-tpc\/bin time .\/go-tpc tpch prepare -d postgres -U postgres -p 'postgres' -D gotpch -H 127.0.0.1 -P 5432 --conn-params sslmode=disable psql -d gotpch \\dt+                                      List of relations  Schema |   Name   | Type  |  Owner   | Persistence | Access method |  Size   | Description  --------+----------+-------+----------+-------------+---------------+---------+  public | customer | table | postgres | permanent   | heap          | 30 MB   |   public | lineitem | table | postgres | permanent   | heap          | 973 MB  |   public | nation   | table | postgres | permanent   | heap          | 40 kB   |   public | orders   | table | postgres | permanent   | heap          | 221 MB  |   public | part     | table | postgres | permanent   | heap          | 34 MB   |   public | partsupp | table | postgres | permanent   | heap          | 146 MB  |   public | region   | table | postgres | permanent   | heap          | 40 kB   |   public | supplier | table | postgres | permanent   | heap          | 1912 kB |  (8 rows) select count(*) from lineitem;   count ---------  6001215 (1 row) <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442, \u043d\u043e \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041d\u0430 \u0432\u0441\u0435\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u043e\u0433\u043e PostgreSQL \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0434\u043e\u043b\u0433\u043e &#8212; \u0447\u0430\u0441 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435. \u0427\u0435\u043c \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e?<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0421\u0423\u0411\u0414 \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u0441\u0442 \u0438 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0421\u0423\u0411\u0414 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0437\u0430 \u043c\u0438\u043d\u0443\u0442\u0443, \u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0430\u0441-\u0434\u0432\u0430 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435. \u041a\u0442\u043e-\u0442\u043e \u0438\u0437 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0421\u0423\u0411\u0414 \u00a0&#171;\u043f\u043e\u0434\u0432\u0438\u0441\u043b\u0430&#187;, \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0421\u0423\u0411\u0414 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u043f\u0440\u043e\u0439\u0442\u0438 \u0442\u0435\u0441\u0442. \u0422\u0430\u043a\u0430\u044f \u0421\u0423\u0411\u0414 \u0432\u0440\u044f\u0434 \u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0421\u0423\u0411\u0414 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430 \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0442\u043e \u0432\u0435\u043b\u0438\u043a\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043e\u043d\u0430 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. \u0422\u043e, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 (\u0434\u043e \u043f\u043e\u043b\u0443\u0442\u043e\u0440\u0430 \u0440\u0430\u0437), \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430, \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u043e\u043b\u044c\u0448\u0435, \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438. \u0415\u0441\u043b\u0438, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0444\u043e\u0440\u043a\u0438 Greenplum \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b TPC-H, \u0442\u043e \u043e\u043d\u0438 \u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c\u0441\u044f, \u0432\u043c\u0435\u0441\u0442\u043e \u0444\u043e\u0440\u043a\u043e\u0432 PostgreSQL. \u0412 \u0442\u0435\u0441\u0442\u0435 TPC-H \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435 \u0432\u0435\u0440c\u0438\u0438 PostgreSQL \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u043e &#8212; \u0447\u0430\u0441 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435. \u042d\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 Q17.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 Q17<\/strong><\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 Q17 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0430\u0441\u0430. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e &#8212; \u0437\u0430 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0417\u0430\u043f\u0440\u043e\u0441\u044b Q18-Q20 \u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0433\u043e \u043d\u0430 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0438\u043b\u0438 \u0444\u043e\u0440\u043a\u0430\u0445 PostgreSQL.<\/p>\n<p>\u0412 \u00a02017 \u0433\u043e\u0434\u0443 (\u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432\u0435\u0440\u0441\u0438\u044f PostgreSQL 9.5) \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 Q20 \u043e\u0442 \u0447\u0430\u0441\u0430 \u0434\u043e 19 \u0447\u0430\u0441\u043e\u0432: <a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/CAOGQiiMsnM-cGjCfnpWQNyrzjf%3DFM0s_3hn1guqficSmwWWVfw%40mail.gmail.com\" rel=\"noopener noreferrer nofollow\">https:\/\/www.postgresql.org\/message-id\/flat\/CAOGQiiMsnM-cGjCfnpWQNyrzjf%3DFM0s_3hn1guqficSmwWWVfw%40mail.gmail.com<\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043b\u0433\u043e, \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0436\u0435\u043b\u0435\u0437\u0430. \u0427\u0435\u0440\u0435\u0437 3 \u043c\u0435\u0441\u044f\u0446\u0430 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 (\u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0434\u043b\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430) \u0422\u043e\u043c \u041b\u0435\u0439\u043d \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443: <code>Maybe not with the rest of them, but we're certainly having an issue there with Q20<\/code>.<\/p>\n<p>\u041f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 Q17 \u0442\u0430\u043a\u0438\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430 \u0432\u0441\u0435\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 PostgreSQL. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u044b\u043b\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430: <a href=\"https:\/\/www.enterprisedb.com\/blog\/tpc-h-performance-postgresql-83\" rel=\"noopener noreferrer nofollow\">https:\/\/www.enterprisedb.com\/blog\/tpc-h-performance-postgresql-83<\/a> \u0411\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e: &#171;We can clearly see that most of the queries (up to Q17) got faster, but then two of the queries (Q18 and Q20) got somewhat slower&#187;. <a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/17153-bd309320429d24b7%40postgresql.org\" rel=\"noopener noreferrer nofollow\">https:\/\/www.postgresql.org\/message-id\/flat\/17153-bd309320429d24b7%40postgresql.org<\/a><\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u0421\u0423\u0411\u0414 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u044d\u0442\u0438\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438. \u0417\u0430\u043f\u0440\u043e\u0441\u044b Q17..Q20 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u044b \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0411\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043d\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043a\u043b\u044e\u0447\u0430: <a href=\"https:\/\/www.percona.com\/blog\/improving_tpc_h_like_queries_q17\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.percona.com\/blog\/improving_tpc_h_like_queries_q17\/<\/a><\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0442\u0435\u0441\u0442\u0430 TPC-H \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0438\u0442\u043e\u043c. \u0411\u044b\u043b \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d \u0431\u0430\u0433 \u0440\u0435\u043f\u043e\u0440\u0442 <a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/17153-bd309320429d24b7%40postgresql.org\" rel=\"noopener noreferrer nofollow\">https:\/\/www.postgresql.org\/message-id\/flat\/17153-bd309320429d24b7%40postgresql.org<\/a> \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u0435\u0441\u0442\u043e\u0432 HammerDB \u0443\u0432\u0438\u0434\u0435\u0432, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0421\u0423\u0411\u0414 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0437\u0430 \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u043e \u0447\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043f\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043b\u044e\u0447\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438 \u0421\u0423\u0411\u0414 \u043d\u0435 \u0440\u0430\u0441\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0438\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0421\u0423\u0411\u0414. \u0415\u0441\u043b\u0438 \u0442\u0435\u0441\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0421\u0423\u0411\u0414, \u0442\u043e \u0442\u0435\u0441\u0442 \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c. \u0422\u0435\u0441\u0442 HammerDB \u043d\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u0442\u0435\u0441\u0442 TPC.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 Q17 \u043d\u0430 PostgreSQL \u0432\u0435\u0440\u0441\u0438\u0438 17<\/strong><\/p>\n<pre><code class=\"sql\">explain (analyze, buffers on, timing off) select sum(l_extendedprice) \/ 7.0 as avg_yearly from lineitem, part where p_partkey = l_partkey and p_brand = 'Brand#43' and p_container = 'LG PACK' and l_quantity &lt; ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey);                                  QUERY PLAN ---------------------------------------------------------------------  Aggregate  (cost=2202829.63..2202829.64 rows=1 width=32) (actual rows=1 loops=1)    Buffers: shared hit=59294965 read=696952753    -&gt;  Hash Join  (cost=7350.36..2202824.90 rows=1890 width=8) (actual rows=538 loops=1)          Hash Cond: (lineitem.l_partkey = part.p_partkey)          Join Filter: (lineitem.l_quantity &lt; (SubPlan 1))          Rows Removed by Join Filter: 5535          Buffers: shared hit=59294965 read=696952753          -&gt;  Seq Scan on lineitem  (cost=0.00..184517.24 rows=6001224 width=21) (actual rows=6001215 loops=1)                Buffers: shared hit=9731 read=114774          -&gt;  Hash  (cost=7348.00..7348.00 rows=189 width=8) (actual rows=203 loops=1)                Buckets: 1024  Batches: 1  Memory Usage: 16kB                Buffers: shared hit=161 read=4187                -&gt;  Seq Scan on part  (cost=0.00..7348.00 rows=189 width=8) (actual rows=203 loops=1)                      Filter: ((p_brand = 'Brand#43'::bpchar) AND (p_container = 'LG PACK'::bpchar))                      Rows Removed by Filter: 199797                      Buffers: shared hit=161 read=4187          SubPlan 1            -&gt;  Aggregate  (cost=199520.38..199520.39 rows=1 width=32) (actual rows=1 loops=6073)                  Buffers: shared hit=59285073 read=696833792                  -&gt;  Seq Scan on lineitem lineitem_1  (cost=0.00..199520.30 rows=32 width=5) (actual rows=31 loops=6073)                        Filter: (l_partkey = part.p_partkey)                        Rows Removed by Filter: 6001184                        Buffers: shared hit=59285073 read=696833792  Planning:    Buffers: shared hit=8  Planning Time: 0.247 ms   Execution Time: 4089201.631 ms (30 rows) Time: 4089203,084 ms (01:08:09,203) <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 Q17 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 <strong>\u0447\u0430\u0441\u0430<\/strong>.<\/p>\n<p><strong>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/strong><\/p>\n<pre><code class=\"sql\">CREATE INDEX LINEITEM_PART_SUPP_FKIDX ON LINEITEM (L_PARTKEY,L_SUPPKEY); explain (analyze, buffers, timing off) select sum(l_extendedprice) \/ 7.0 as avg_yearly from lineitem, part where p_partkey = l_partkey and p_brand = 'Brand#43' and p_container = 'LG PACK' and l_quantity &lt; ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey);                                                                QUERY PLAN -------------------------------------------------------  Aggregate  (cost=209175.16..209175.17 rows=1 width=32) (actual rows=1 loops=1)    Buffers: shared hit=205522 read=129512    -&gt;  Hash Join  (cost=7355.50..209170.16 rows=2000 width=8) (actual rows=538 loops=1)          Hash Cond: (lineitem.l_partkey = part.p_partkey)          Join Filter: (lineitem.l_quantity &lt; (SubPlan 1))          Rows Removed by Join Filter: 5535          Buffers: shared hit=205522 read=129512          -&gt;  Seq Scan on lineitem  (cost=0.00..184744.57 rows=6001057 width=21) (actual rows=6001215 loops=1)                Buffers: shared hit=5738 read=118996          -&gt;  Hash  (cost=7353.00..7353.00 rows=200 width=8) (actual rows=203 loops=1)                Buckets: 1024  Batches: 1  Memory Usage: 16kB                Buffers: shared read=4353                -&gt;  Seq Scan on part  (cost=0.00..7353.00 rows=200 width=8) (actual rows=203 loops=1)                      Filter: ((p_brand = 'Brand#43'::bpchar) AND (p_container = 'LG PACK'::bpchar))                      Rows Removed by Filter: 199797                      Buffers: shared read=4353          SubPlan 1            -&gt;  Aggregate  (cost=131.71..131.72 rows=1 width=32) (actual rows=1 loops=6073)                  Buffers: shared hit=199784 read=6163                  -&gt;  Bitmap Heap Scan on lineitem lineitem_1<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-456712","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/456712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=456712"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/456712\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=456712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=456712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=456712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}