{"id":159447,"date":"2012-11-20T12:36:04","date_gmt":"2012-11-20T08:36:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=159447"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=159447","title":{"rendered":"<span class=\"post_title\">\u0420\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0442\u0435\u043c\u0443 Query Rewrite<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430. \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438, \u044f \u043f\u0438\u0448\u0443 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438. \u0415\u0441\u043b\u0438 \u044d\u0442\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0443\u0442 \u043c\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 Postgress, MySQL \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0421\u0423\u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u043c\u043d\u0435 \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u043d\u0435 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u044f \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430, \u044f \u0431\u0443\u0434\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430, \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (<a href=\"http:\/\/docs.oracle.com\/cd\/B19306_01\/network.102\/b14266\/apdvcntx.htm\">FGAC<\/a>), \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f (<a href=\"http:\/\/docs.oracle.com\/cd\/B10501_01\/server.920\/a96567\/repmview.htm\">Materialized View<\/a>) \u0438 <a href=\"http:\/\/www.oracle-base.com\/articles\/8i\/partitioned-tables-and-indexes.php\">Partitioning<\/a> \u0431\u044b\u043b\u0438 \u0431\u044b \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c\u0438. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, Oracle Enterprise Edition \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (Query Rewrite). \u0412\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043e \u0447\u0435\u043c, \u0435\u0441\u043b\u0438-\u0431\u044b \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u041f\u041e. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0438\u0434\u0435\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u0443\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 Query Rewrite \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e, \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c, SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0432 \u0444\u0440\u0430\u0437\u0443 where \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u0430 \u043f\u0440\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043d\u0435\u043a\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0443\u044e \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u044b\u043c \u0435\u0433\u043e \u0432\u044b\u0432\u043e\u0434, \u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Query Rewrite, Oracle \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0433\u0434\u0435-\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0435\u0449\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a\u0430\u044f \u0438\u0437 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0421\u0423\u0411\u0414 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0421\u0423\u0411\u0414-\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-xLtxf_YKbVY\/UKjYs8seaJI\/AAAAAAAAALA\/C4yiZrgParA\/s640\/0001.PNG\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0430\u0431\u043b\u0438\u0446\u0430 entity, \u043a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041a \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b entity_attribute \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0435\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432. \u041e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442-\u0436\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 attribute. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e is_mandatory, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u043c, \u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c (\u0438\u043b\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c NULL-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435).<\/p>\n<p>  \u0421\u0442\u0440\u043e\u043a\u0438 entity_attribute \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 columns, \u0438\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c expression. \u0421\u0442\u043e\u043b\u0431\u0446\u044b, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 tables.<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f entity, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u043d\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0447\u0438\u043d\u0435\u043d\u043d\u043e\u0439 \u0438 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 condition \u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (0 \u0438\u043b\u0438 1) \u043f\u043e\u0434\u0447\u0438\u043d\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u044b\u043b\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 condition \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u043d\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e column_id \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e value \u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u043c\u0443 foreign_column_id.<\/p>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438, \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0438\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 entity. \u0415\u0441\u043b\u0438 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0438\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 foreign_entity_id, \u044d\u0442\u043e\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043b\u044e\u0447\u043e\u043c, \u0441\u0441\u044b\u043b\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-KjC1j4-DvTw\/UKjZH-ENahI\/AAAAAAAAALI\/yw0udAcmnlI\/s400\/0001.PNG\" alt=\"image\"\/><\/p>\n<p>  \u041c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <u><b>tables:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>n<\/b><b>ame<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>1<\/b>  <\/td>\n<td>transaction_data  <\/td>\n<td>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0434\u0430\u0436\u0438  <\/td>\n<\/tr>\n<tr>\n<td><b>2<\/b>  <\/td>\n<td>transaction_detail  <\/td>\n<td>\u0414\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0438  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>columns:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>table_<\/b><b>id<\/b>  <\/td>\n<td><b>name<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>1<\/b>  <\/td>\n<td>1  <\/td>\n<td>id  <\/td>\n<td>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447  <\/td>\n<\/tr>\n<tr>\n<td><b>2<\/b>  <\/td>\n<td>1  <\/td>\n<td>transaction_date  <\/td>\n<td>\u0414\u0430\u0442\u0430 \u043f\u0440\u043e\u0434\u0430\u0436\u0438  <\/td>\n<\/tr>\n<tr>\n<td><b>3<\/b>  <\/td>\n<td>1  <\/td>\n<td>total_price  <\/td>\n<td>\u0421\u0443\u043c\u043c\u0430\u0440\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c  <\/td>\n<\/tr>\n<tr>\n<td><b>4<\/b>  <\/td>\n<td>2  <\/td>\n<td>id  <\/td>\n<td>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447  <\/td>\n<\/tr>\n<tr>\n<td><b>5<\/b>  <\/td>\n<td>2  <\/td>\n<td>transaction_id  <\/td>\n<td>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u0436\u0443  <\/td>\n<\/tr>\n<tr>\n<td><b>6<\/b>  <\/td>\n<td>2  <\/td>\n<td>code  <\/td>\n<td>\u041a\u043e\u0434 \u0442\u043e\u0432\u0430\u0440\u0430  <\/td>\n<\/tr>\n<tr>\n<td><b>7<\/b>  <\/td>\n<td>2  <\/td>\n<td>price  <\/td>\n<td>\u0426\u0435\u043d\u0430 \u0442\u043e\u0432\u0430\u0440\u0430  <\/td>\n<\/tr>\n<tr>\n<td><b>8<\/b>  <\/td>\n<td>2  <\/td>\n<td>quantity  <\/td>\n<td>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0432\u0430\u0440\u0430  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>condition:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>column_id<\/b>  <\/td>\n<td><b>foreign_column_id<\/b>  <\/td>\n<td><b>value<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>1<\/b>  <\/td>\n<td>5  <\/td>\n<td>1  <\/td>\n<td>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>entity_type:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>n<\/b><b>ame<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>1<\/b>  <\/td>\n<td>operational<br \/>   data  <\/td>\n<td>\u041e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435  <\/td>\n<\/tr>\n<tr>\n<td><b>2<\/b>  <\/td>\n<td>dictionary<br \/>   data  <\/td>\n<td>\u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>attribute_type:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>n<\/b><b>ame<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>1<\/b>  <\/td>\n<td>key  <\/td>\n<td>\u041a\u043b\u044e\u0447  <\/td>\n<\/tr>\n<tr>\n<td><b>2<\/b>  <\/td>\n<td>string  <\/td>\n<td>\u0421\u0442\u0440\u043e\u043a\u0430  <\/td>\n<\/tr>\n<tr>\n<td><b>3<\/b>  <\/td>\n<td>number  <\/td>\n<td>\u0427\u0438\u0441\u043b\u043e  <\/td>\n<\/tr>\n<tr>\n<td><b>4<\/b>  <\/td>\n<td>date  <\/td>\n<td>\u0414\u0430\u0442\u0430  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>entity:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>entity_type_<\/b><b>id<\/b>  <\/td>\n<td><b>table_id<\/b>  <\/td>\n<td><b>name<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>1<\/b>  <\/td>\n<td>1  <\/td>\n<td>1  <\/td>\n<td>transaction  <\/td>\n<td>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0434\u0430\u0436\u0438  <\/td>\n<\/tr>\n<tr>\n<td><b>2<\/b>  <\/td>\n<td>1  <\/td>\n<td>2  <\/td>\n<td>detail  <\/td>\n<td>\u0414\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0438  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>attribute:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>attr_type_id<\/b>  <\/td>\n<td><b>name<\/b>  <\/td>\n<td><b>is_mandatory<\/b>  <\/td>\n<td><b>foreign_entity_id<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>1<\/b>  <\/td>\n<td>1  <\/td>\n<td>id  <\/td>\n<td>1  <\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td><b>2<\/b>  <\/td>\n<td>4  <\/td>\n<td>transaction_date  <\/td>\n<td>1  <\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td><b>3<\/b>  <\/td>\n<td>3  <\/td>\n<td>total_price  <\/td>\n<td>1  <\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td><b>4<\/b>  <\/td>\n<td>1  <\/td>\n<td>transaction_id  <\/td>\n<td>1  <\/td>\n<td>1  <\/td>\n<\/tr>\n<tr>\n<td><b>5<\/b>  <\/td>\n<td>2  <\/td>\n<td>code  <\/td>\n<td>1  <\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td><b>6<\/b>  <\/td>\n<td>3  <\/td>\n<td>price  <\/td>\n<td>1  <\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td><b>7<\/b>  <\/td>\n<td>3  <\/td>\n<td>quantity  <\/td>\n<td>1  <\/td>\n<td>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>entity_attribute:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>entity_id<\/b>  <\/td>\n<td><b>attr_id<\/b>  <\/td>\n<td><b>column_id<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>1<\/b>  <\/td>\n<td>1  <\/td>\n<td>1  <\/td>\n<td>1  <\/td>\n<td>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439<br \/>   \u043a\u043b\u044e\u0447  <\/td>\n<\/tr>\n<tr>\n<td><b>2<\/b>  <\/td>\n<td>1  <\/td>\n<td>2  <\/td>\n<td>2  <\/td>\n<td>\u0414\u0430\u0442\u0430 \u043f\u0440\u043e\u0434\u0430\u0436\u0438  <\/td>\n<\/tr>\n<tr>\n<td><b>3<\/b>  <\/td>\n<td>1  <\/td>\n<td>3  <\/td>\n<td>3  <\/td>\n<td>\u0421\u0443\u043c\u043c\u0430\u0440\u043d\u0430\u044f<br \/>   \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c  <\/td>\n<\/tr>\n<tr>\n<td><b>4<\/b>  <\/td>\n<td>2  <\/td>\n<td>1  <\/td>\n<td>4  <\/td>\n<td>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439<br \/>   \u043a\u043b\u044e\u0447  <\/td>\n<\/tr>\n<tr>\n<td><b>5<\/b>  <\/td>\n<td>2  <\/td>\n<td>4  <\/td>\n<td>5  <\/td>\n<td>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u0436\u0443  <\/td>\n<\/tr>\n<tr>\n<td><b>6<\/b>  <\/td>\n<td>2  <\/td>\n<td>5  <\/td>\n<td>6  <\/td>\n<td>\u041a\u043e\u0434<br \/>   \u0442\u043e\u0432\u0430\u0440\u0430  <\/td>\n<\/tr>\n<tr>\n<td><b>7<\/b>  <\/td>\n<td>2  <\/td>\n<td>6  <\/td>\n<td>7  <\/td>\n<td>\u0426\u0435\u043d\u0430<br \/>   \u0442\u043e\u0432\u0430\u0440\u0430  <\/td>\n<\/tr>\n<tr>\n<td><b>8<\/b>  <\/td>\n<td>2  <\/td>\n<td>7  <\/td>\n<td>8  <\/td>\n<td>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e<br \/>   \u0442\u043e\u0432\u0430\u0440\u0430  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u0422\u0430\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u043c (\u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430), \u043d\u043e \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u0430\u0442. \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-Y5hiuKa9_U8\/UKphtRLUtlI\/AAAAAAAAAL4\/yRDsCiimeWc\/s640\/0001.PNG\" alt=\"image\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0430\u0442. \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u044e, \u0442\u0430\u0431\u043b\u0438\u0446\u0430 mview \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 entity. \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b mview_attribute \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0430 entity_attribute, \u0434\u043b\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0442. \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u041d\u043e, \u043f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, mview_attribute \u0438\u043c\u0435\u0435\u0442 \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u0441\u0441\u044b\u043b\u043a\u0443 (src_attr_id) \u043d\u0430 entity_attribute, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0443\u044e, \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u0430\u043a\u043e\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043c\u0430\u0442. \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0422\u043e, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043c\u0430\u0442. \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 mview_attr_type. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 interval_type \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u0432 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043e\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0435 \u043c\u0430\u0442. \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e, \u043a\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0430 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0434\u0430\u043d\u043e \u0432 \u0434\u0435\u043d\u044c:<\/p>\n<pre><code class=\"sql\">select trunc(a.transaction_date, 'DAY') transaction_date,         b.code code, sum(b.quantity) quantity from   transaction_data a, transaction_detail b where  b.transaction_id = a.id group  by trunc(a.transaction_date, 'DAY'), b.code <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f trunc(a.transaction_date, &#8216;DAY&#8217;) \u043e\u0442\u0441\u0435\u043a\u0430\u0435\u0442 \u043e\u0442 \u0434\u0430\u0442\u044b \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0432\u0440\u0435\u043c\u044f, \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u044f \u0434\u0430\u0442\u0443 \u0434\u043e \u0441\u0443\u0442\u043e\u043a. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c &#8216;WEEK&#8217; \u0438 &#8216;MONTH&#8217; \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0434\u043e \u043d\u0435\u0434\u0435\u043b\u0438 \u0438\u043b\u0438 \u043c\u0435\u0441\u044f\u0446\u0430.<\/p>\n<p>  <u><b>tables:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>n<\/b><b>ame<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>3<\/b>  <\/td>\n<td>mat_view  <\/td>\n<td>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>columns:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>t<\/b><b>able_<\/b><b>id<\/b>  <\/td>\n<td><b>name<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td>9  <\/td>\n<td>3  <\/td>\n<td>transaction_date  <\/td>\n<td>\u0414\u0430\u0442\u0430 \u043f\u0440\u043e\u0434\u0430\u0436\u0438  <\/td>\n<\/tr>\n<tr>\n<td>10  <\/td>\n<td>3  <\/td>\n<td>code  <\/td>\n<td>\u041a\u043e\u0434 \u0442\u043e\u0432\u0430\u0440\u0430  <\/td>\n<\/tr>\n<tr>\n<td>11  <\/td>\n<td>3  <\/td>\n<td>quantity  <\/td>\n<td>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0432\u0430\u0440\u0430  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>entity:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>entity_<\/b><b>type_<\/b><b>id<\/b>  <\/td>\n<td><b>table_id<\/b>  <\/td>\n<td><b>name<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>3<\/b>  <\/td>\n<td>1  <\/td>\n<td>3  <\/td>\n<td>mat_view  <\/td>\n<td>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>entity_attribute:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>entity_id<\/b>  <\/td>\n<td><b>attr_id<\/b>  <\/td>\n<td><b>column_id<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>9<\/b>  <\/td>\n<td>3  <\/td>\n<td>4  <\/td>\n<td>9  <\/td>\n<td>\u0414\u0430\u0442\u0430 \u043f\u0440\u043e\u0434\u0430\u0436\u0438  <\/td>\n<\/tr>\n<tr>\n<td><b>10<\/b>  <\/td>\n<td>3  <\/td>\n<td>5  <\/td>\n<td>10  <\/td>\n<td>\u041a\u043e\u0434 \u0442\u043e\u0432\u0430\u0440\u0430  <\/td>\n<\/tr>\n<tr>\n<td><b>11<\/b>  <\/td>\n<td>3  <\/td>\n<td>7  <\/td>\n<td>11  <\/td>\n<td>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0432\u0430\u0440\u0430  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>interval_type:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>n<\/b><b>ame<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td><b>1<\/b>  <\/td>\n<td>DAY  <\/td>\n<td>\u0421\u0443\u0442\u043a\u0438  <\/td>\n<\/tr>\n<tr>\n<td><b>2<\/b>  <\/td>\n<td>WEEK  <\/td>\n<td>\u041d\u0435\u0434\u0435\u043b\u044f  <\/td>\n<\/tr>\n<tr>\n<td><b>3<\/b>  <\/td>\n<td>MONTH  <\/td>\n<td>\u041c\u0435\u0441\u044f\u0446  <\/td>\n<\/tr>\n<tr>\n<td><b>4<\/b>  <\/td>\n<td>YEAR  <\/td>\n<td>\u0413\u043e\u0434  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>mview_attr_type:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>interval_type_id<\/b>  <\/td>\n<td><b>name<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td>1  <\/td>\n<td>\n<\/td>\n<td>KEY  <\/td>\n<td>\u041a\u043b\u044e\u0447 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f  <\/td>\n<\/tr>\n<tr>\n<td>2  <\/td>\n<td>1  <\/td>\n<td>DAY  <\/td>\n<td>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b \u0434\u043e \u0441\u0443\u0442\u043e\u043a  <\/td>\n<\/tr>\n<tr>\n<td>3  <\/td>\n<td>2  <\/td>\n<td>WEEK  <\/td>\n<td>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b \u0434\u043e \u043d\u0435\u0434\u0435\u043b\u0438  <\/td>\n<\/tr>\n<tr>\n<td>4  <\/td>\n<td>3  <\/td>\n<td>MONTH  <\/td>\n<td>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b \u0434\u043e \u043c\u0435\u0441\u044f\u0446\u0430  <\/td>\n<\/tr>\n<tr>\n<td>5  <\/td>\n<td>4  <\/td>\n<td>YEAR  <\/td>\n<td>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b \u0434\u043e \u0433\u043e\u0434\u0430  <\/td>\n<\/tr>\n<tr>\n<td>6  <\/td>\n<td>\n<\/td>\n<td>SUM  <\/td>\n<td>\u0421\u0443\u043c\u043c\u0430  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>mview:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>entity<\/b><b>_id<\/b>  <\/td>\n<td><b>description<\/b>  <\/td>\n<\/tr>\n<tr>\n<td>1  <\/td>\n<td>3  <\/td>\n<td>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>mview_attribute:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td><b>type_id<\/b>  <\/td>\n<td><b>mview_id<\/b>  <\/td>\n<td><b>attribute_id<\/b>  <\/td>\n<td><b>src_attr_id<\/b>  <\/td>\n<\/tr>\n<tr>\n<td>1  <\/td>\n<td>2  <\/td>\n<td>1  <\/td>\n<td>9  <\/td>\n<td>2  <\/td>\n<\/tr>\n<tr>\n<td>2  <\/td>\n<td>1  <\/td>\n<td>1  <\/td>\n<td>10  <\/td>\n<td>6  <\/td>\n<\/tr>\n<tr>\n<td>3  <\/td>\n<td>6  <\/td>\n<td>1  <\/td>\n<td>11  <\/td>\n<td>8  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u041f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u043e\u0439:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-3EvP9wZL5_o\/UKs3tYTfPnI\/AAAAAAAAAMM\/rt2Fx8RG0pA\/s640\/0001.PNG\" alt=\"image\"\/><\/p>\n<p>  \u0421 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440\u043e\u043c part_key. \u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438, \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 tables, \u0430 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 (\u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0411\u0414), \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 parts. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u043c\u0438 \u043c\u0430\u0442.\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0434\u0430\u0442\u0435 \u043f\u0440\u043e\u0434\u0430\u0436\u0438, \u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c 1 \u043c\u0435\u0441\u044f\u0446.<\/p>\n<p>  <u><b>parts:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td> <b>table_id<\/b>  <\/td>\n<td> <b>name<\/b>  <\/td>\n<\/tr>\n<tr>\n<td> 1  <\/td>\n<td> 3  <\/td>\n<td> mat_view_000001  <\/td>\n<\/tr>\n<tr>\n<td> 2  <\/td>\n<td> 3  <\/td>\n<td> mat_view_000002  <\/td>\n<\/tr>\n<tr>\n<td> 3  <\/td>\n<td> 3  <\/td>\n<td> mat_view_000004  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <u><b>part_key:<\/b><\/u>  <\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><b>Id<\/b>  <\/td>\n<td> <b>part_id<\/b>  <\/td>\n<td> <b>attr_id<\/b>  <\/td>\n<td> <b>min_value<\/b>  <\/td>\n<td> <b>max_value<\/b>  <\/td>\n<\/tr>\n<tr>\n<td> 1  <\/td>\n<td> 1  <\/td>\n<td> 9  <\/td>\n<td> 20120101  <\/td>\n<td> 20120201  <\/td>\n<\/tr>\n<tr>\n<td> 2  <\/td>\n<td> 2  <\/td>\n<td> 9  <\/td>\n<td> 20120201  <\/td>\n<td> 20120301  <\/td>\n<\/tr>\n<tr>\n<td> 3  <\/td>\n<td> 3  <\/td>\n<td> 9  <\/td>\n<td> 20120301  <\/td>\n<td> 20120401  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u041d\u0430\u0441 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u0430\u0442. \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439. \u042f \u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u0411\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c SQL-\u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0435\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0411\u0414.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0430 \u0437\u0430 \u0434\u0432\u0430 \u043c\u0435\u0441\u044f\u0446\u0430, \u043c\u044b \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u044f \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0442\u0430\u043a, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u044d\u0442\u043e \u0431\u044b\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\">select code, sum(quantity) from   thransaction_detail where  transaction_date &gt;= '20120201' and transaction_date &lt; '20120401' group  by code <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f, \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"sql\">select code, sum(quantity) from  ( select code code, quantity quantity         from   mat_view_000001         where  transaction_date &gt;= '20120201' and transaction_date &lt; '20120401'         union  all         select code, quantity         from   mat_view_000002          where  transaction_date &gt;= '20120201' and transaction_date &lt; '20120401') group   by code <\/code><\/pre>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u0443\u0434\u0430\u0447\u043d\u0430\u044f \u0438\u0434\u0435\u044f, \u043d\u043e \u043c\u043d\u0435, \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e, \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0435\u0439 \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f.      \t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/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=\"http:\/\/habrahabr.ru\/post\/159447\/\"> http:\/\/habrahabr.ru\/post\/159447\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430. \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438, \u044f \u043f\u0438\u0448\u0443 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438. \u0415\u0441\u043b\u0438 \u044d\u0442\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0443\u0442 \u043c\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 Postgress, MySQL \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0421\u0423\u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u043c\u043d\u0435 \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u043d\u0435 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u044f \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430, \u044f \u0431\u0443\u0434\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430, \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (<a href=\"http:\/\/docs.oracle.com\/cd\/B19306_01\/network.102\/b14266\/apdvcntx.htm\">FGAC<\/a>), \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f (<a href=\"http:\/\/docs.oracle.com\/cd\/B10501_01\/server.920\/a96567\/repmview.htm\">Materialized View<\/a>) \u0438 <a href=\"http:\/\/www.oracle-base.com\/articles\/8i\/partitioned-tables-and-indexes.php\">Partitioning<\/a> \u0431\u044b\u043b\u0438 \u0431\u044b \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c\u0438. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, Oracle Enterprise Edition \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (Query Rewrite). \u0412\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043e \u0447\u0435\u043c, \u0435\u0441\u043b\u0438-\u0431\u044b \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u041f\u041e. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0438\u0434\u0435\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.  <\/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-159447","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/159447","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=159447"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/159447\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=159447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=159447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=159447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}