{"id":299807,"date":"2020-03-06T21:00:19","date_gmt":"2020-03-06T21:00:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299807"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299807","title":{"rendered":"\u041c\u0430\u043f\u043f\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0411\u0414"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/490550\/\">\u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0411\u0414 \u043d\u0435 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u041e\u0420\u041c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043b\u0438\u0431\u043e \u0438\u0437-\u0437\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0430\u043c\u043e\u0439 \u041e\u0420\u041c, \u043b\u0438\u0431\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0435\u044e. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0411\u0414 (\u0432 \u0442.\u0447 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 JOIN \u0437\u0430\u043f\u0440\u043e\u0441) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u201c\u043f\u043b\u043e\u0441\u043a\u043e\u0433\u043e\u201d \u0434\u0432\u0443\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u201c\u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u0443\u044e\u201d \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0430\u043a\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0432\u0438\u0434 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443.<\/p>\n<p>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e, \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u0435.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h3>\u041d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u0435<\/h3>\n<p>  \u0414\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438\u0441\u043f\u044b\u0442\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0435\u043d\u0434 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0442\u044b Eloquent. \u0414\u043b\u044f \u0437\u0430\u043c\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u0430\u043a\u0435\u0442 phpbench.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0442\u0435\u043d\u0434 \u0443 \u0441\u0435\u0431\u044f:<\/p>\n<p>  <code>git clone https:\/\/github.com\/hrustbb2\/env-arrayproc-bench.git<br \/>  cd env-arrayproc-bench<br \/>  .\/env<\/code><br \/>  \u0417\u0434\u0435\u0441\u044c \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u043c\u043e\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/488946\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0432 \u043c\u0435\u043d\u044e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c: 1 Develop, \u0437\u0430\u0442\u0435\u043c: 1 Build, \u0437\u0430\u0442\u0435\u043c 2 Deploy and Up;<br \/>  \u0417\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u0435\u0441\u0442\u044b 5. Run tests<\/p>\n<p>  \u0412 \u0431\u0430\u0437\u0435 3000 \u043a\u043d\u0438\u0433. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<pre><code class=\"bash\">+-----------------+-----+------+------+-------------+--------------+ | subject         | set | revs | iter | mem_peak    | time_rev     | +-----------------+-----+------+------+-------------+--------------+ | benchEloquent   | 0   | 1    | 0    | 76,442,912b | 12,781.612ms | | benchEloquentId | 0   | 10   | 0    | 5,123,224b  | 16.432ms     | | benchProc       | 0   | 1    | 0    | 36,364,176b | 1,053.937ms  | | benchProcId     | 0   | 10   | 0    | 4,462,696b  | 7.684ms      | +-----------------+-----+------+------+-------------+--------------+ <\/code><\/pre>\n<p>  <b>benchEloquent<\/b> \u2014 \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u043d\u0438\u0433\u0438 \u0441 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Eloquent<br \/>  <b>benchEloquentId<\/b> \u2014 \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443 \u0441 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Eloquent (10 \u0440\u0430\u0437)<\/p>\n<p>  <b>benchProc<\/b> \u2014 \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u043d\u0438\u0433\u0438 \u0441 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<br \/>  <b>benchProcId<\/b> \u2014 \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443 \u0441 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (10 \u0440\u0430\u0437)<\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0442\u0438\u0432\u043d\u044b, \u043d\u043e \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u0430, \u043a\u0430\u043a \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u043f\u043e \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h3>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c:<\/p>\n<p>  <code>composer require hrustbb2\/arrayproc:v1.0.0<\/code><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 (\u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e), \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0411\u0414 \u043a\u043d\u0438\u0433 \u0438 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tg\/ym\/aj\/tgymaj43aadmlwd-ouzsyzi_az8.png\" alt=\"image\"><\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0430 \u2014 \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0432\u0441\u0435 \u043a\u043d\u0438\u0433\u0438 \u0441 \u0438\u0445 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438.<\/p>\n<p>  \u0417\u0430\u043f\u0440\u043e\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">SELECT     books.id,     books.name,     authors.id,     authors.name FROM     books LEFT JOIN relations ON relations.books_id = books.id LEFT JOIN authors ON authors.id = relations.authors_id<\/code><\/pre>\n<p>  \u0412 \u043e\u0442\u0432\u0435\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<td>book.id<\/td>\n<td>book.name<\/td>\n<td>author.id<\/td>\n<td>author.name<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>book1<\/td>\n<td>2<\/td>\n<td>author2<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>book1<\/td>\n<td>4<\/td>\n<td>author4<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>book1<\/td>\n<td>6<\/td>\n<td>author6<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>book2<\/td>\n<td>2<\/td>\n<td>author2<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>book2<\/td>\n<td>3<\/td>\n<td>author3<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>book2<\/td>\n<td>6<\/td>\n<td>author6<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>book2<\/td>\n<td>7<\/td>\n<td>author7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041c\u0430\u0441\u0441\u0438\u0432 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0439, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044f \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">[ \t1 =&gt; [ \t\t'id' =&gt; 1, \t\t'name' =&gt; 'book1', \t\t'authors' =&gt; [ \t\t\t2 =&gt; [ \t\t\t\t'id' =&gt; 2, \t\t\t\t'name' =&gt; 'author2' \t\t\t], \t\t\t4 =&gt; [ \t\t\t\t'id' =&gt; 4, \t\t\t\t'name' =&gt; 'author4' \t\t\t], \t\t\t6 =&gt; [ \t\t\t\t'id' =&gt; 6, \t\t\t\t'name' =&gt; 'author6' \t\t\t], \t\t] \t], \t2 =&gt; [ \t\t'id' =&gt; 2, \t\t'name' =&gt; 'book2', \t\t'authors' =&gt; [ \t\t\t2 =&gt; [ \t\t\t\t'id' =&gt; 2, \t\t\t\t'name' =&gt; 'author2' \t\t\t], \t\t\t3 =&gt; [ \t\t\t\t'id' =&gt; 3, \t\t\t\t'name' =&gt; 'author3' \t\t\t], \t\t\t6 =&gt; [ \t\t\t\t'id' =&gt; 6, \t\t\t\t'name' =&gt; 'author6' \t\t\t], \t\t\t7 =&gt; [ \t\t\t\t'id' =&gt; 7, \t\t\t\t'name' =&gt; 'author7' \t\t\t], \t\t] \t], ] <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\"> SELECT     books.id AS book_id,     books.name AS book_name,     authors.id AS author_id,     authors.name AS author_name FROM     books LEFT JOIN relations ON relations.books_id = books.id LEFT JOIN authors ON authors.id = relations.authors_id <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 SELECT \u0437\u0430\u0434\u0430\u043b\u0438 \u0430\u043b\u0438\u0430\u0441\u044b: \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u043a\u043d\u0438\u0433\u0430\u0445 \u0430\u043b\u0438\u0430\u0441\u044b \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c &#8216;book_&#8217;, \u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e\u0431 \u0430\u0432\u0442\u043e\u0440\u0430\u0445 \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c &#8216;author&#8217;.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u043e\u0442\u0432\u0435\u0442 \u0411\u0414<\/p>\n<pre><code class=\"php\">use hrustbb2\\arrayproc\\ArrayProcessor;  $arrayProcessor = new ArrayProcessor(); $config = [ \t'prefix' =&gt; 'book_', \t'authors' =&gt; [ \t\t'prefix' =&gt; 'author_', \t] ] $booksData = $arrayProcessor-&gt;process($conf, $rows)-&gt;resultArray(); <\/code><\/pre>\n<p>  \u0433\u0434\u0435:<br \/>  $rows \u2014 \u043e\u0442\u0432\u0435\u0442 \u0411\u0414 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \/stdClass()<br \/>  $config \u2014 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432 $booksData \u0438\u043c\u0435\u0435\u043c \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0432 $config, \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  \u041a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a.<\/p><\/div>\n<p> \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\/post\/490550\/\"> https:\/\/habr.com\/ru\/post\/490550\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/490550\/\">\u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0411\u0414 \u043d\u0435 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u041e\u0420\u041c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043b\u0438\u0431\u043e \u0438\u0437-\u0437\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0430\u043c\u043e\u0439 \u041e\u0420\u041c, \u043b\u0438\u0431\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0435\u044e. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0411\u0414 (\u0432 \u0442.\u0447 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 JOIN \u0437\u0430\u043f\u0440\u043e\u0441) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u201c\u043f\u043b\u043e\u0441\u043a\u043e\u0433\u043e\u201d \u0434\u0432\u0443\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u201c\u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u0443\u044e\u201d \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0430\u043a\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0432\u0438\u0434 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443.<\/p>\n<p>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e, \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u0435.  <\/p>\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-299807","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299807","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=299807"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299807\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}