{"id":445,"date":"2004-08-02T13:48:25","date_gmt":"2004-08-02T11:48:25","guid":{"rendered":"http:\/\/vasil.ludost.net\/blog\/?p=445"},"modified":"2004-08-02T13:48:25","modified_gmt":"2004-08-02T11:48:25","slug":"2004-08-02-1348","status":"publish","type":"post","link":"https:\/\/vasil.ludost.net\/blog\/?p=445","title":{"rendered":"2004-08-02 13:48"},"content":{"rendered":"<p>\u0423\u0423\u0443\u0443\u0443\u0443\u0443\u0443\u0443\u0443\u0443\u0443\u0442\u0440\u043e&#8230;.<\/p>\n<p>\u0421\u043d\u043e\u0449\u0438 \u043f\u043e \u043d\u0438\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u0435 \u043c\u0438 \u0434\u043e\u0439\u0434\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435\u0442\u043e \u0434\u0430 \u0442\u0435\u0441\u0442\u0432\u0430\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u043d\u0430 \u0431\u0430\u0437\u0430\u0442\u0430, \u043a\u043e\u0439\u0442\u043e \u0431\u044f\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u043b \u0437\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0442\u0430 \u043d\u0430 \u0412\u0435\u043b\u0438\u043d, \u0438 \u043e\u0442\u043a\u0440\u0438\u0445, \u0447\u0435 \u0435 \u043a\u043e\u0448\u043c\u0430\u0440\u043d\u043e \u0431\u0430\u0432\u0435\u043d, \u0442\u0430 \u0434\u043d\u0435\u0441 \u0449\u0435 \u0441\u0438 \u0438\u0433\u0440\u0430\u044f \u0434\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0430 explain-\u0430 \u0438 \u0434\u0430 \u0432\u0438\u0434\u044f \u0437\u0430\u0449\u043e \u0442\u0430\u043a\u0430. \u041c\u043e\u0436\u0435 \u0432 \u043a\u0440\u0430\u0439\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430 \u0434\u0430 \u0433\u043e \u043f\u0440\u043e\u043c\u0435\u043d\u044f. \u0410 \u0437\u0430 \u0436\u0435\u043b\u0430\u0435\u0449\u0438\u0442\u0435 \u0435\u0442\u043e \u0435\u0434\u0438\u043d \u0437\u0430\u0431\u0430\u0432\u0435\u043d explain:<\/p>\n<pre>\r\nvelin=> EXPLAIN\r\nvelin-> SELECT b.orig_name, a.name as author, v.path ,g.name as genre\r\nvelin->         FROM \r\nvelin->                  books b, authors a, variants v, genres g, relations r, relations r1, relations r2\r\nvelin->         WHERE \r\nvelin->                 (b.id=r.id1 AND a.id=r.id2 AND r.rel='BA') AND\r\nvelin->                 (b.id=r1.id1 AND v.id=r1.id2 AND r1.rel='BV') AND\r\nvelin->                 (b.id=r2.id1 AND g.id=r2.id2 AND r2.rel='BG');\r\n                                                     QUERY PLAN                                                     \r\n--------------------------------------------------------------------------------------------------------------------\r\n Nested Loop  (cost=0.00..22.52 rows=1 width=890)\r\n   ->  Nested Loop  (cost=0.00..17.68 rows=1 width=816)\r\n         ->  Nested Loop  (cost=0.00..12.85 rows=1 width=308)\r\n               ->  Nested Loop  (cost=0.00..8.01 rows=1 width=186)\r\n                     Join Filter: (\"inner\".id1 = \"outer\".id1)\r\n                     ->  Nested Loop  (cost=0.00..6.95 rows=1 width=170)\r\n                           Join Filter: (\"inner\".id1 = \"outer\".id1)\r\n                           ->  Nested Loop  (cost=0.00..5.89 rows=1 width=154)\r\n                                 ->  Seq Scan on relations r  (cost=0.00..1.05 rows=1 width=16)\r\n                                       Filter: (rel = 'BA'::bpchar)\r\n                                 ->  Index Scan using authors_pkey on authors a  (cost=0.00..4.82 rows=1 width=154)\r\n                                       Index Cond: (a.id = \"outer\".id2)\r\n                           ->  Seq Scan on relations r2  (cost=0.00..1.05 rows=1 width=16)\r\n                                 Filter: (rel = 'BG'::bpchar)\r\n                     ->  Seq Scan on relations r1  (cost=0.00..1.05 rows=1 width=16)\r\n                           Filter: (rel = 'BV'::bpchar)\r\n               ->  Index Scan using books_pkey on books b  (cost=0.00..4.82 rows=1 width=154)\r\n                     Index Cond: (b.id = \"outer\".id1)\r\n         ->  Index Scan using variants_pkey on variants v  (cost=0.00..4.82 rows=1 width=524)\r\n               Index Cond: (v.id = \"outer\".id2)\r\n   ->  Index Scan using genres_pkey on genres g  (cost=0.00..4.82 rows=1 width=90)\r\n         Index Cond: (g.id = \"outer\".id2)\r\n(22 rows)\r\n<\/pre>\n<p>(\u0412 \u043e\u0431\u0449\u0438 \u043b\u0438\u043d\u0438\u0438 \u0438\u0434\u0435\u044f\u0442\u0430 \u0435 \u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0438, \u0438 \u0435\u0434\u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u043d\u0430, \u043a\u043e\u044f\u0442\u043e \u043e\u043f\u0438\u0441\u0432\u0430 \u0412\u0421\u0418\u0427\u041a\u0418 \u0440\u0435\u043b\u0430\u0446\u0438\u0438 \u043c\/\u0443 \u0442\u044f\u0445. \u041c\u0430\u0439 \u043d\u0435 \u0441\u0435 \u0445\u0430\u0440\u0435\u0441\u0430 \u043d\u0430 postgresql-\u0430).<\/p>\n<p>\u0422\u0430\u0437\u0438 \u043d\u043e\u0449 \u043d\u0430\u0439-\u043d\u0430\u043a\u0440\u0430\u044f \u0438\u0437\u0447\u0435\u0442\u043e\u0445 &#8220;\u041b\u0443\u043d\u0430\u0442\u0430 \u0435 \u043d\u0430\u0441\u0442\u0430\u0432\u043d\u0438\u0446\u0430 \u0441\u0443\u0440\u043e\u0432\u0430&#8221; \u043d\u0430 \u0425\u0430\u0439\u043d\u043b\u0430\u0439\u043d &#8211; \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438, \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u0430\u043d\u0430 \u043d\u0430 \u043e\u043a\u043e\u043b\u043e 80 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0438 (\u0441 7pt \u0448\u0440\u0438\u0444\u0442, \u0432 2 \u043a\u043e\u043b\u043e\u043d\u043a\u0438). \u0421\u0442\u0440\u0443\u0432\u0430\u0448\u0435 \u0441\u0438 \u0434\u0430 \u0441\u0435 \u043f\u0440\u043e\u0447\u0435\u0442\u0435 :)<\/p>\n<p>\u0414\u043d\u0435\u0441 \u0432\u0441\u0438\u0447\u043a\u043e \u0441\u0438 \u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e &#8211; \u0432\u0447\u0435\u0440\u0430 \u0441\u0435 \u0445\u0432\u0430\u043d\u0430\u0445 \u0434\u0430 \u0438\u0437\u0447\u0438\u0441\u0442\u044f, \u0434\u0430 \u0441\u0438 \u043f\u0440\u0435\u043c\u0435\u0441\u0442\u044f \u043c\u0430\u0448\u0438\u043d\u0430\u0442\u0430 \u043f\u0430\u043a \u0432 \u0433\u043e\u043b\u044f\u043c\u0430\u0442\u0430 \u0441\u0442\u0430\u044f (\u0438 \u043c\u043e\u0436\u0435 \u043f\u0430\u043a \u0434\u0430 \u043a\u0430\u0447\u0430 \u0441\u043d\u0438\u043c\u043a\u0438), \u0441\u0435\u0433\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0446\u044f\u043b\u0430\u0442\u0430 \u043a\u044a\u0449\u0430 \u0438\u0437\u0433\u043b\u0435\u0436\u0434\u0430 \u043f\u043e-\u0434\u043e\u0431\u0440\u0435. \u041e\u0441\u0442\u0430\u043d\u0430\u0445\u0430 \u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0434\u0440\u0435\u0431\u043e\u043b\u0438\u0438 \u0438\u0437 \u0431\u0430\u043d\u044f\u0442\u0430, \u0438 \u043c\u043e\u0436\u0435 \u0434\u0430 \u043f\u043e\u043c\u0438\u0441\u043b\u044f \u043a\u0430\u043a\u0432\u043e \u0434\u0430 \u043f\u0440\u0430\u0432\u044f \u0441 \u043c\u043d\u043e\u0433\u043e\u0442\u043e \u043f\u0440\u0430\u0437\u043d\u0438 \u0431\u0443\u0442\u0438\u043b\u043a\u0438, \u0430\u043c\u0430 \u0437\u0430 \u0442\u043e\u0432\u0430 \u0438\u043c\u0430 \u0432\u0440\u0435\u043c\u0435.<\/p>\n<p>\u041d\u0435\u0449\u043e, \u043a\u043e\u0435\u0442\u043e \u043e\u0442\u043a\u0440\u0438\u0445 \u0442\u0430\u044f \u0441\u0443\u0442\u0440\u0438\u043d &#8211; \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0441\u0438 \u0438\u0437\u043a\u043b\u044e\u0447\u0430 \u0437\u0432\u044a\u043d\u0435\u0446\u0430. \u0414\u0430 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0441\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430 \u043a\u0430\u0442\u043e \u0441\u044a\u043c \u0431\u0443\u0434\u0435\u043d \u0438 \u0434\u0430 \u0441\u0435 \u0441\u043f\u0438\u0440\u0430, \u043f\u0440\u0435\u0434\u0438 \u0434\u0430 \u0441\u0438 \u043b\u0435\u0433\u043d\u0430. \u0410\u043a\u043e \u0431\u044f\u0445 \u043f\u043e-\u0437\u043b\u043e\u0431\u0435\u043d, \u0449\u044f\u0445 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u044f \u0438 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u0448\u043e\u043a \u0437\u0430 \u043d\u0430\u0442\u0438\u0441\u043a\u0430\u0449\u0438\u0442\u0435 \u0433\u043e \u0434\u043e\u043a\u0430\u0442\u043e \u0441\u043f\u044f &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423\u0423\u0443\u0443\u0443\u0443\u0443\u0443\u0443\u0443\u0443\u0443\u0442\u0440\u043e&#8230;. \u0421\u043d\u043e\u0449\u0438 \u043f\u043e \u043d\u0438\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u0435 \u043c\u0438 \u0434\u043e\u0439\u0434\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435\u0442\u043e \u0434\u0430 \u0442\u0435\u0441\u0442\u0432\u0430\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u043d\u0430 \u0431\u0430\u0437\u0430\u0442\u0430, \u043a\u043e\u0439\u0442\u043e \u0431\u044f\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u043b \u0437\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0442\u0430 \u043d\u0430 \u0412\u0435\u043b\u0438\u043d, \u0438 \u043e\u0442\u043a\u0440\u0438\u0445, \u0447\u0435 \u0435 \u043a\u043e\u0448\u043c\u0430\u0440\u043d\u043e \u0431\u0430\u0432\u0435\u043d, \u0442\u0430 \u0434\u043d\u0435\u0441 \u0449\u0435 \u0441\u0438 \u0438\u0433\u0440\u0430\u044f \u0434\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0430 explain-\u0430 \u0438 \u0434\u0430 \u0432\u0438\u0434\u044f \u0437\u0430\u0449\u043e \u0442\u0430\u043a\u0430. \u041c\u043e\u0436\u0435 \u0432 \u043a\u0440\u0430\u0439\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430 \u0434\u0430 \u0433\u043e \u043f\u0440\u043e\u043c\u0435\u043d\u044f. \u0410 \u0437\u0430 \u0436\u0435\u043b\u0430\u0435\u0449\u0438\u0442\u0435 \u0435\u0442\u043e \u0435\u0434\u0438\u043d \u0437\u0430\u0431\u0430\u0432\u0435\u043d explain: velin=> EXPLAIN [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-445","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=445"}],"version-history":[{"count":0,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/445\/revisions"}],"wp:attachment":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}