{"id":317788,"date":"2021-02-10T15:00:27","date_gmt":"2021-02-10T15:00:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=317788"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=317788","title":{"rendered":"Oracle: Deterministic functions, result_cache and operators"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/en\/post\/541152\/\" rel=\"noopener noreferrer nofollow\">Oracle: \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 deterministic \u0438 result_cache<\/a> \u043e\u0442 Steven Feuerstein, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u0434\u0435\u0442\u0430\u043b\u044f\u043c\u0438 \u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u044d\u0442\u0438 \u0442\u0435\u043c\u044b, \u043d\u043e \u0442\u0443\u0442 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0435 \u0440\u0435\u0437\u044e\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435.<\/p>\n<h3>1. \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0432 PL\/SQL \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043d\u0435 \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u044b \u0441\u0430\u043c\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u0438\u0445 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c\u0443<\/h3>\n<p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 &#171;\u0432\u0438\u0434\u044f\u0442&#187; \u0434\u0430\u043d\u043d\u044b\u0435 (\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u044b\/\u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u044b) \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u0430 \u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0445 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e. \u0418 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0434\u0430\u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432 WITH clause \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0422\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0437\u0430 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0440\u0442\u043e\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u044b <a href=\"http:\/\/orasql.org\/2019\/12\/30\/pl-sql-functions-and-statement-level-consistency\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442 <\/a>\u0438 <a href=\"http:\/\/orasql.org\/2013\/07\/03\/oracle-12c-inconsistency-of-inline-functions\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043b\u0438\u0431\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438, \u043b\u0438\u0431\u043e \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c SQL \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043d\u0435\u0435, \u043f\u0440\u0438\u043c\u0435\u0440: \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 f1_op \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 f1:<\/p>\n<pre><code class=\"sql\">CREATE OPERATOR f1_op    BINDING (INT)     RETURN INT    USING F1;<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 Oracle 21 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f SQL Macros: \u043e\u043d\u0438 \u043f\u043e\u043a\u0430 \u0432\u0435\u0441\u044c\u043c\u0430 \u0433\u043b\u044e\u0447\u043d\u044b, \u043d\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0447\u0442\u043e \u0434\u0430\u0441\u0442 \u043a\u0430\u043a \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0442\u0430\u043a \u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u0442 \u043e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>2. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0437-\u0437\u0430 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code>select * from (      select xf(t10.id) a      from t10       ) where a*a &gt;= 25; -- \u0442\u0430\u0431\u043b\u0438\u0446\u0430 t10: \/* SQL&gt; select id from t10;           ID ----------          1          2          3          4          5          6          7          8          9         10   10 rows selected. *\/<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u044b \u0434\u0443\u043c\u0430\u0435\u0442\u0435 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f xf?<\/p>\n<p>\u041e\u0442\u0432\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440: \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d merge \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442 \u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u043b\u0438 filter pushdown: \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043b\u0430\u043d\u043e\u0432:<\/p>\n<pre><code class=\"sql\">-------------------------------------------------- -- Plan 1: Plan hash value: 2919944937 -------------------------------------------------- | Id  | Operation         | Name | Rows  | Bytes | -------------------------------------------------- |   0 | SELECT STATEMENT  |      |     1 |     3 | |*  1 |  TABLE ACCESS FULL| T10  |     1 |     3 | -------------------------------------------------- Predicate Information (identified by operation id): ---------------------------------------------------    1 - filter(\"XF\"(\"T10\".\"ID\")*\"XF\"(\"T10\".\"ID\")&gt;=25)  -------------------------------------------------- -- Plan 2: Plan hash value: 2027387203 --------------------------------------------------- | Id  | Operation          | Name | Rows  | Bytes | --------------------------------------------------- |   0 | SELECT STATEMENT   |      |     1 |    13 | |   1 |  VIEW              |      |     1 |    13 | |*  2 |   TABLE ACCESS FULL| T10  |     1 |     3 | --------------------------------------------------- Predicate Information (identified by operation id): ---------------------------------------------------    2 - filter(\"XF\"(\"T10\".\"ID\")*\"XF\"(\"T10\".\"ID\")&gt;=25)  --------------------------------------------------- -- Plan 3: --------------------------------------------------- | Id  | Operation          | Name | Rows  | Bytes | --------------------------------------------------- |   0 | SELECT STATEMENT   |      |     1 |    13 | |*  1 |  VIEW              |      |     1 |    13 | |   2 |   TABLE ACCESS FULL| T10  |     1 |     3 | --------------------------------------------------- Predicate Information (identified by operation id): ---------------------------------------------------    3 - filter(\"A\"*\"A\"&gt;=25)  Column Projection Information  ------------------------------      1 - \"A\"[NUMBER,22]    2 - \"A\"[NUMBER,22]<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <a href=\"http:\/\/orasql.org\/2013\/06\/10\/too-many-function-executions\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2013\/06\/10\/too-many-function-executions\/<\/a><\/p>\n<h3>3. \u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 deterministic \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 SQL<\/h3>\n<h4>3.1 \u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 deterministic \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 hash-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 scalar subquery caching<\/h4>\n<p>\u0418 Scalar Subquery Caching(\u0434\u0430\u043b\u0435\u0435 SSC) \u0438 Deterministic Functions Caching \u0445\u044d\u0448\u0438\u0440\u0443\u044e\u0442 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b hash-\u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0438.<\/p>\n<h4>3.2 \u041a\u044d\u0448 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e fetch-call&#8217;a<\/h4>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 fetch size (arraysize \u0432 sql*plus) \u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c Fetch call \u043a\u044d\u0448 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0415\u0441\u0442\u044c \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: \u043a\u043e\u0433\u0434\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044d\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b-\u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b. \u0423 SSC \u0442\u0430\u043a\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0442. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0443 SSC \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u043e\u043d \u0445\u0440\u0430\u043d\u0438\u0442 \u043a\u044d\u0448 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 hash-\u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0438.<\/p>\n<h4>3.3 \u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u044d\u0448\u0430 \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0445\u044d\u0448-\u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 &#171;_query_execution_cache_max_size&#187;<\/h4>\n<p>\u041e\u0442 \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0438 SSC. <\/p>\n<h4>3.4 \u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b-\u0432\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a<\/h4>\n<p>\u042d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 &#171;_plsql_minimum_cache_hit_percent&#187;. \u0423 SSC \u0435\u0441\u0442\u044c \u0438 \u0442\u0443\u0442 \u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043b-\u0432\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a, \u0445\u043e\u0442\u044f \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f, \u0443\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u043d \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0442\u0443\u0442: <br \/> <a href=\"http:\/\/orasql.org\/2013\/02\/10\/deterministic-function-vs-scalar-subquery-caching-part-1\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2013\/02\/10\/deterministic-function-vs-scalar-subquery-caching-part-1\/<\/a><br \/> <a href=\"http:\/\/orasql.org\/2013\/02\/11\/deterministic-function-vs-scalar-subquery-caching-part-2\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2013\/02\/11\/deterministic-function-vs-scalar-subquery-caching-part-2\/<\/a><br \/> <a href=\"http:\/\/orasql.org\/2013\/02\/11\/deterministic-function-vs-scalar-subquery-caching-part-3\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2013\/02\/11\/deterministic-function-vs-scalar-subquery-caching-part-3\/<\/a><\/p>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e deterministic + result cache, operator + deterministic + result cache: <a href=\"http:\/\/orasql.org\/2014\/03\/31\/deterministic-functions-result_cache-and-operators\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2014\/03\/31\/deterministic-functions-result_cache-and-operators\/<\/a><\/p>\n<h3>4. \u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 deterministic \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 PL\/SQL<\/h3>\n<p>\u0412\u044b\u0437\u043e\u0432 deterministic \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043d\u0435\u0441\u0435\u043d \u0438\u0437 \u0442\u0435\u043b\u0430 \u0446\u0438\u043a\u043b\u0430 \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445:<\/p>\n<ol>\n<li>\n<p><code>PLSQL_OPTIMIZE_LEVEL<\/code> &gt;= 2<\/p>\n<\/li>\n<li>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043b\u0435 \u0446\u0438\u043a\u043b\u0430<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0435\u044f\u0432\u043d\u044b\u0445 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (implicit conversions)<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u043e \u043d\u0435-&#171;\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445&#187; \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (\u043a\u0440\u043e\u043c\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a to_date, to_char, nvl) \u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: <a href=\"http:\/\/orasql.org\/2013\/03\/13\/optimization-of-loops-in-plsql-part-1\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2013\/03\/13\/optimization-of-loops-in-plsql-part-1\/<\/a><\/p>\n<h3>5. Result cache<\/h3>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 SSC and Deterministic functions caching, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 CGA, Result cache &#8212; \u044d\u0442\u043e shared cache \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0435\u0441\u0441\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 (\u0432 shared pool), \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u044b\u0442\u0435\u043a\u0430\u044e\u0449\u0438\u043c\u0438 \u043e\u0442\u0441\u044e\u0434\u0430 \u043f\u043b\u044e\u0441\u0430\u043c\u0438 \u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u043c\u0438. \u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 Fine-grained dependency tracking c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u044e\u0430\u043d\u0441\u0430\u043c\u0438 (<a href=\"http:\/\/orasql.org\/2015\/07\/05\/result_cache-run-time-dependency-tracking\/\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437<\/a>, <a href=\"http:\/\/orasql.org\/2015\/07\/05\/a-function-gets-called-twice-if-the-result_cache-is-used\/\" rel=\"noopener noreferrer nofollow\">\u0434\u0432\u0430<\/a> \u0438 <a href=\"http:\/\/orasql.org\/2012\/07\/30\/when-oracle-invalidates-result_cache-function-results-without-any-changes-in-objects-on-which-depends\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0440\u0438<\/a>), \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043e \u0437\u0430\u0449\u0435\u043b\u043a\u0430\u043c\u0438 (RC latches). \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>v$result_cache_objects<\/code> (type=dependency) \u0438 <code>v$result_cache_dependency<\/code>. \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 &#171;\u0433\u0440\u0430\u043d\u0443\u043b\u043e\u0439&#187; \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u0433\u043c\u0435\u043d\u0442 (\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u043b\u0438 \u0441\u0435\u043a\u0446\u0438\u0438), \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043b\u044e\u0431\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 select for update c \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c \u043f\u0440\u0438\u0432\u0435\u0434\u0443\u0442 \u043a \u0438\u043d\u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0440\u0435\u0434\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0436\u0435 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0437\u0443 &#171;\u043a\u043e\u043b\u043e\u043c&#187;.<\/p>\n<h3>\u0420\u0435\u0437\u044e\u043c\u0435 \u0440\u0435\u0437\u044e\u043c\u0435<\/h3>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c Result Cache \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u044f\u0436\u0435\u043b\u044b\u0439 \u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u043b\u0438 deterministic \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u0442\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0438 \u043a\u0430\u043a deterministic, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u043b\u0438\u0448\u043d\u0438\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u044f\u0436\u0435\u043b\u044b\u0445 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a RC, \u0430 \u043f\u0440\u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b. \u0412 \u0446\u0435\u043b\u043e\u043c \u0436\u0435, \u043d\u0430\u0434\u0435\u0435\u043c\u0441\u044f \u043d\u0430 \u0434\u043e\u043f\u0438\u043b\u0438\u0432\u0430\u043d\u0438\u0435 SQL Macro \u043b\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 5-10 \ud83d\ude42<\/p>\n<\/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\/541848\/\"> https:\/\/habr.com\/ru\/post\/541848\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/en\/post\/541152\/\" rel=\"noopener noreferrer nofollow\">Oracle: \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 deterministic \u0438 result_cache<\/a> \u043e\u0442 Steven Feuerstein, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u0434\u0435\u0442\u0430\u043b\u044f\u043c\u0438 \u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u044d\u0442\u0438 \u0442\u0435\u043c\u044b, \u043d\u043e \u0442\u0443\u0442 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0435 \u0440\u0435\u0437\u044e\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435.<\/p>\n<h3>1. \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0432 PL\/SQL \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043d\u0435 \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u044b \u0441\u0430\u043c\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u0438\u0445 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c\u0443<\/h3>\n<p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 &#171;\u0432\u0438\u0434\u044f\u0442&#187; \u0434\u0430\u043d\u043d\u044b\u0435 (\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u044b\/\u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u044b) \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u0430 \u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0445 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e. \u0418 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0434\u0430\u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432 WITH clause \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0422\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0437\u0430 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0440\u0442\u043e\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u044b <a href=\"http:\/\/orasql.org\/2019\/12\/30\/pl-sql-functions-and-statement-level-consistency\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442 <\/a>\u0438 <a href=\"http:\/\/orasql.org\/2013\/07\/03\/oracle-12c-inconsistency-of-inline-functions\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043b\u0438\u0431\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438, \u043b\u0438\u0431\u043e \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c SQL \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043d\u0435\u0435, \u043f\u0440\u0438\u043c\u0435\u0440: \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 f1_op \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 f1:<\/p>\n<pre><code class=\"sql\">CREATE OPERATOR f1_op    BINDING (INT)     RETURN INT    USING F1;<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 Oracle 21 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f SQL Macros: \u043e\u043d\u0438 \u043f\u043e\u043a\u0430 \u0432\u0435\u0441\u044c\u043c\u0430 \u0433\u043b\u044e\u0447\u043d\u044b, \u043d\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0447\u0442\u043e \u0434\u0430\u0441\u0442 \u043a\u0430\u043a \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0442\u0430\u043a \u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u0442 \u043e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>2. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0437-\u0437\u0430 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code>select * from (      select xf(t10.id) a      from t10       ) where a*a &gt;= 25; -- \u0442\u0430\u0431\u043b\u0438\u0446\u0430 t10: \/* SQL&gt; select id from t10;           ID ----------          1          2          3          4          5          6          7          8          9         10   10 rows selected. *\/<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u044b \u0434\u0443\u043c\u0430\u0435\u0442\u0435 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f xf?<\/p>\n<p>\u041e\u0442\u0432\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440: \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d merge \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442 \u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u043b\u0438 filter pushdown: \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043b\u0430\u043d\u043e\u0432:<\/p>\n<pre><code class=\"sql\">-------------------------------------------------- -- Plan 1: Plan hash value: 2919944937 -------------------------------------------------- | Id  | Operation         | Name | Rows  | Bytes | -------------------------------------------------- |   0 | SELECT STATEMENT  |      |     1 |     3 | |*  1 |  TABLE ACCESS FULL| T10  |     1 |     3 | -------------------------------------------------- Predicate Information (identified by operation id): ---------------------------------------------------    1 - filter(\"XF\"(\"T10\".\"ID\")*\"XF\"(\"T10\".\"ID\")&gt;=25)  -------------------------------------------------- -- Plan 2: Plan hash value: 2027387203 --------------------------------------------------- | Id  | Operation          | Name | Rows  | Bytes | --------------------------------------------------- |   0 | SELECT STATEMENT   |      |     1 |    13 | |   1 |  VIEW              |      |     1 |    13 | |*  2 |   TABLE ACCESS FULL| T10  |     1 |     3 | --------------------------------------------------- Predicate Information (identified by operation id): ---------------------------------------------------    2 - filter(\"XF\"(\"T10\".\"ID\")*\"XF\"(\"T10\".\"ID\")&gt;=25)  --------------------------------------------------- -- Plan 3: --------------------------------------------------- | Id  | Operation          | Name | Rows  | Bytes | --------------------------------------------------- |   0 | SELECT STATEMENT   |      |     1 |    13 | |*  1 |  VIEW              |      |     1 |    13 | |   2 |   TABLE ACCESS FULL| T10  |     1 |     3 | --------------------------------------------------- Predicate Information (identified by operation id): ---------------------------------------------------    3 - filter(\"A\"*\"A\"&gt;=25)  Column Projection Information  ------------------------------      1 - \"A\"[NUMBER,22]    2 - \"A\"[NUMBER,22]<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <a href=\"http:\/\/orasql.org\/2013\/06\/10\/too-many-function-executions\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2013\/06\/10\/too-many-function-executions\/<\/a><\/p>\n<h3>3. \u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 deterministic \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 SQL<\/h3>\n<h4>3.1 \u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 deterministic \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 hash-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 scalar subquery caching<\/h4>\n<p>\u0418 Scalar Subquery Caching(\u0434\u0430\u043b\u0435\u0435 SSC) \u0438 Deterministic Functions Caching \u0445\u044d\u0448\u0438\u0440\u0443\u044e\u0442 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b hash-\u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0438.<\/p>\n<h4>3.2 \u041a\u044d\u0448 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e fetch-call&#8217;a<\/h4>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 fetch size (arraysize \u0432 sql*plus) \u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c Fetch call \u043a\u044d\u0448 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0415\u0441\u0442\u044c \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: \u043a\u043e\u0433\u0434\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044d\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b-\u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b. \u0423 SSC \u0442\u0430\u043a\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0442. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0443 SSC \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u043e\u043d \u0445\u0440\u0430\u043d\u0438\u0442 \u043a\u044d\u0448 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 hash-\u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0438.<\/p>\n<h4>3.3 \u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u044d\u0448\u0430 \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0445\u044d\u0448-\u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 &#171;_query_execution_cache_max_size&#187;<\/h4>\n<p>\u041e\u0442 \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0438 SSC. <\/p>\n<h4>3.4 \u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b-\u0432\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a<\/h4>\n<p>\u042d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 &#171;_plsql_minimum_cache_hit_percent&#187;. \u0423 SSC \u0435\u0441\u0442\u044c \u0438 \u0442\u0443\u0442 \u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043b-\u0432\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a, \u0445\u043e\u0442\u044f \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f, \u0443\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u043d \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0442\u0443\u0442: <br \/> <a href=\"http:\/\/orasql.org\/2013\/02\/10\/deterministic-function-vs-scalar-subquery-caching-part-1\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2013\/02\/10\/deterministic-function-vs-scalar-subquery-caching-part-1\/<\/a><br \/> <a href=\"http:\/\/orasql.org\/2013\/02\/11\/deterministic-function-vs-scalar-subquery-caching-part-2\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2013\/02\/11\/deterministic-function-vs-scalar-subquery-caching-part-2\/<\/a><br \/> <a href=\"http:\/\/orasql.org\/2013\/02\/11\/deterministic-function-vs-scalar-subquery-caching-part-3\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2013\/02\/11\/deterministic-function-vs-scalar-subquery-caching-part-3\/<\/a><\/p>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e deterministic + result cache, operator + deterministic + result cache: <a href=\"http:\/\/orasql.org\/2014\/03\/31\/deterministic-functions-result_cache-and-operators\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2014\/03\/31\/deterministic-functions-result_cache-and-operators\/<\/a><\/p>\n<h3>4. \u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 deterministic \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 PL\/SQL<\/h3>\n<p>\u0412\u044b\u0437\u043e\u0432 deterministic \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043d\u0435\u0441\u0435\u043d \u0438\u0437 \u0442\u0435\u043b\u0430 \u0446\u0438\u043a\u043b\u0430 \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445:<\/p>\n<ol>\n<li>\n<p><code>PLSQL_OPTIMIZE_LEVEL<\/code> &gt;= 2<\/p>\n<\/li>\n<li>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043b\u0435 \u0446\u0438\u043a\u043b\u0430<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0435\u044f\u0432\u043d\u044b\u0445 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (implicit conversions)<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u043e \u043d\u0435-&#171;\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445&#187; \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (\u043a\u0440\u043e\u043c\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a to_date, to_char, nvl) \u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: <a href=\"http:\/\/orasql.org\/2013\/03\/13\/optimization-of-loops-in-plsql-part-1\/\" rel=\"noopener noreferrer nofollow\">http:\/\/orasql.org\/2013\/03\/13\/optimization-of-loops-in-plsql-part-1\/<\/a><\/p>\n<h3>5. Result cache<\/h3>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 SSC and Deterministic functions caching, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 CGA, Result cache &#8212; \u044d\u0442\u043e shared cache \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0435\u0441\u0441\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 (\u0432 shared pool), \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u044b\u0442\u0435\u043a\u0430\u044e\u0449\u0438\u043c\u0438 \u043e\u0442\u0441\u044e\u0434\u0430 \u043f\u043b\u044e\u0441\u0430\u043c\u0438 \u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u043c\u0438. \u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 Fine-grained dependency tracking c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u044e\u0430\u043d\u0441\u0430\u043c\u0438 (<a href=\"http:\/\/orasql.org\/2015\/07\/05\/result_cache-run-time-dependency-tracking\/\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437<\/a>, <a href=\"http:\/\/orasql.org\/2015\/07\/05\/a-function-gets-called-twice-if-the-result_cache-is-used\/\" rel=\"noopener noreferrer nofollow\">\u0434\u0432\u0430<\/a> \u0438 <a href=\"http:\/\/orasql.org\/2012\/07\/30\/when-oracle-invalidates-result_cache-function-results-without-any-changes-in-objects-on-which-depends\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0440\u0438<\/a>), \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043e \u0437\u0430\u0449\u0435\u043b\u043a\u0430\u043c\u0438 (RC latches). \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>v$result_cache_objects<\/code> (type=dependency) \u0438 <code>v$result_cache_dependency<\/code>. \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 &#171;\u0433\u0440\u0430\u043d\u0443\u043b\u043e\u0439&#187; \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u0433\u043c\u0435\u043d\u0442 (\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u043b\u0438 \u0441\u0435\u043a\u0446\u0438\u0438), \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043b\u044e\u0431\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 select for update c \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c \u043f\u0440\u0438\u0432\u0435\u0434\u0443\u0442 \u043a \u0438\u043d\u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0440\u0435\u0434\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0436\u0435 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0437\u0443 &#171;\u043a\u043e\u043b\u043e\u043c&#187;.<\/p>\n<h3>\u0420\u0435\u0437\u044e\u043c\u0435 \u0440\u0435\u0437\u044e\u043c\u0435<\/h3>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c Result Cache \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u044f\u0436\u0435\u043b\u044b\u0439 \u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u043b\u0438 deterministic \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u0442\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0438 \u043a\u0430\u043a deterministic, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u043b\u0438\u0448\u043d\u0438\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u044f\u0436\u0435\u043b\u044b\u0445 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a RC, \u0430 \u043f\u0440\u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b. \u0412 \u0446\u0435\u043b\u043e\u043c \u0436\u0435, \u043d\u0430\u0434\u0435\u0435\u043c\u0441\u044f \u043d\u0430 \u0434\u043e\u043f\u0438\u043b\u0438\u0432\u0430\u043d\u0438\u0435 SQL Macro \u043b\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 5-10 \ud83d\ude42<\/p>\n<\/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\/541848\/\"> https:\/\/habr.com\/ru\/post\/541848\/<\/a><br \/><\/br><\/br><\/br><\/p>\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-317788","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317788","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=317788"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317788\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=317788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=317788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=317788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}