via function [ { "Plan": { "Node Type": "Subquery Scan", "Parallel Aware": false, "Alias": "agreement_totals", "Startup Cost": 307.35, "Total Cost": 720.23, "Plan Rows": 5, "Plan Width": 776, "Actual Startup Time": 9.102, "Actual Total Time": 9.138, "Actual Rows": 2, "Actual Loops": 1, "Output": ["agreement_totals.agreement_id", "agreement_totals.order_id", "agreement_totals.consumed_period", "agreement_totals.nconf", "agreement_totals.nitem", "agreement_totals.item_id", "agreement_totals.item_order", "agreement_totals.item_name", "agreement_totals.item_qty", "agreement_totals.measure", "agreement_totals.item_price", "agreement_totals.item_cost", "agreement_totals.item_suma", "agreement_totals.conf_cost", "agreement_totals.consumed", "agreement_totals.conf_suma", "agreement_totals.conf_nds", "agreement_totals.order_suma", "agreement_totals.order_nds", "agreement_totals.total_suma", "agreement_totals.total_nds", "agreement_totals.package_id", "agreement_totals.package_1c_id", "agreement_totals.package", "agreement_totals.o", "agreement_totals.c", "agreement_totals.p", "agreement_totals.ic"], "Filter": "((agreement_totals.o).period_id = 10)", "Rows Removed by Filter": 1, "Shared Hit Blocks": 118, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "WindowAgg", "Parent Relationship": "Subquery", "Parallel Aware": false, "Startup Cost": 307.35, "Total Cost": 707.73, "Plan Rows": 1000, "Plan Width": 760, "Actual Startup Time": 9.099, "Actual Total Time": 9.133, "Actual Rows": 3, "Actual Loops": 1, "Output": ["gconf.agreement_id", "gconf.order_id", "gconf.consumed_period", "gconf.nconf", "gconf.nitem", "(gconf.c).id", "COALESCE((gconf.c).sort_order, pd.sort_order)", "COALESCE(st.display, (st.name)::text, (rt.display)::text, (rt.name)::text)", "COALESCE(gconf.item_qty, ((gconf.c).amount / (rt.unit)::double precision))", "COALESCE((gconf.p).label, (rt.label)::text)", "gconf.item_price", "gconf.item_cost", "gconf.item_suma", "gconf.conf_cost", "gconf.consumed", "gconf.conf_suma", "(((gconf.conf_suma / '6'::numeric))::numeric(10,2))", "(sum(gconf.conf_suma) FILTER (WHERE (gconf.nitem = 1)) OVER (?))", "(((sum(gconf.conf_suma) FILTER (WHERE (gconf.nitem = 1)) OVER (?)) / '6'::numeric))::numeric(10,2)", "sum(gconf.conf_suma) FILTER (WHERE (gconf.nitem = 1)) OVER (?)", "sum((((sum(gconf.conf_suma) FILTER (WHERE (gconf.nitem = 1)) OVER (?)) / '6'::numeric))::numeric(10,2)) FILTER (WHERE ((gconf.nitem = 1) AND (gconf.nconf = 1))) OVER (?)", "pkg.id", "pkg.link_1c_id", "COALESCE(pkg.display, pkg.name)", "gconf.o", "gconf.c", "gconf.p", "gconf.ic"], "Shared Hit Blocks": 118, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Hash Join", "Parent Relationship": "Outer", "Parallel Aware": false, "Join Type": "Left", "Startup Cost": 307.35, "Total Cost": 662.73, "Plan Rows": 1000, "Plan Width": 863, "Actual Startup Time": 9.015, "Actual Total Time": 9.088, "Actual Rows": 3, "Actual Loops": 1, "Output": ["gconf.agreement_id", "gconf.order_id", "gconf.consumed_period", "gconf.nconf", "gconf.nitem", "gconf.c", "pd.sort_order", "st.display", "st.name", "rt.display", "rt.name", "gconf.item_qty", "rt.unit", "gconf.p", "rt.label", "gconf.item_price", "gconf.item_cost", "gconf.item_suma", "gconf.conf_cost", "gconf.consumed", "gconf.conf_suma", "(((gconf.conf_suma / '6'::numeric))::numeric(10,2))", "(sum(gconf.conf_suma) FILTER (WHERE (gconf.nitem = 1)) OVER (?))", "pkg.id", "pkg.link_1c_id", "pkg.display", "pkg.name", "gconf.o", "gconf.ic"], "Inner Unique": false, "Hash Cond": "((gconf.o).package_id = pd.package_id)", "Join Filter": "((NOT (pd.resource_type_id IS DISTINCT FROM (gconf.c).resource_type_id)) AND (NOT (pd.service_type_id IS DISTINCT FROM (gconf.c).service_type_id)))", "Rows Removed by Join Filter": 26, "Shared Hit Blocks": 118, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Hash Join", "Parent Relationship": "Outer", "Parallel Aware": false, "Join Type": "Left", "Startup Cost": 250.15, "Total Cost": 394.14, "Plan Rows": 1000, "Plan Width": 859, "Actual Startup Time": 7.914, "Actual Total Time": 7.973, "Actual Rows": 3, "Actual Loops": 1, "Output": ["gconf.agreement_id", "gconf.order_id", "gconf.consumed_period", "gconf.nconf", "gconf.nitem", "gconf.c", "gconf.item_qty", "gconf.p", "gconf.item_price", "gconf.item_cost", "gconf.item_suma", "gconf.conf_cost", "gconf.consumed", "gconf.conf_suma", "(((gconf.conf_suma / '6'::numeric))::numeric(10,2))", "(sum(gconf.conf_suma) FILTER (WHERE (gconf.nitem = 1)) OVER (?))", "gconf.o", "gconf.ic", "rt.display", "rt.name", "rt.unit", "rt.label", "st.display", "st.name", "pkg.id", "pkg.link_1c_id", "pkg.display", "pkg.name"], "Inner Unique": true, "Hash Cond": "((gconf.o).package_id = pkg.id)", "Shared Hit Blocks": 104, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Hash Join", "Parent Relationship": "Outer", "Parallel Aware": false, "Join Type": "Left", "Startup Cost": 234.75, "Total Cost": 376.08, "Plan Rows": 1000, "Plan Width": 705, "Actual Startup Time": 7.681, "Actual Total Time": 7.734, "Actual Rows": 3, "Actual Loops": 1, "Output": ["gconf.agreement_id", "gconf.order_id", "gconf.consumed_period", "gconf.nconf", "gconf.nitem", "gconf.c", "gconf.item_qty", "gconf.p", "gconf.item_price", "gconf.item_cost", "gconf.item_suma", "gconf.conf_cost", "gconf.consumed", "gconf.conf_suma", "(((gconf.conf_suma / '6'::numeric))::numeric(10,2))", "(sum(gconf.conf_suma) FILTER (WHERE (gconf.nitem = 1)) OVER (?))", "gconf.o", "gconf.ic", "rt.display", "rt.name", "rt.unit", "rt.label", "st.display", "st.name"], "Inner Unique": true, "Hash Cond": "((gconf.c).service_type_id = st.id)", "Shared Hit Blocks": 96, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Hash Join", "Parent Relationship": "Outer", "Parallel Aware": false, "Join Type": "Left", "Startup Cost": 227.79, "Total Cost": 366.44, "Plan Rows": 1000, "Plan Width": 620, "Actual Startup Time": 7.556, "Actual Total Time": 7.601, "Actual Rows": 3, "Actual Loops": 1, "Output": ["gconf.agreement_id", "gconf.order_id", "gconf.consumed_period", "gconf.nconf", "gconf.nitem", "gconf.c", "gconf.item_qty", "gconf.p", "gconf.item_price", "gconf.item_cost", "gconf.item_suma", "gconf.conf_cost", "gconf.consumed", "gconf.conf_suma", "(((gconf.conf_suma / '6'::numeric))::numeric(10,2))", "(sum(gconf.conf_suma) FILTER (WHERE (gconf.nitem = 1)) OVER (?))", "gconf.o", "gconf.ic", "rt.display", "rt.name", "rt.unit", "rt.label"], "Inner Unique": false, "Hash Cond": "((gconf.c).resource_type_id = rt.id)", "Shared Hit Blocks": 93, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "WindowAgg", "Parent Relationship": "Outer", "Parallel Aware": false, "Startup Cost": 220.34, "Total Cost": 335.34, "Plan Rows": 1000, "Plan Width": 548, "Actual Startup Time": 7.411, "Actual Total Time": 7.452, "Actual Rows": 3, "Actual Loops": 1, "Output": ["gconf.agreement_id", "gconf.order_id", "gconf.item_qty", "gconf.item_price", "gconf.item_cost", "gconf.item_suma", "gconf.o", "gconf.c", "gconf.p", "gconf.ic", "gconf.consumed_period", "gconf.nconf", "gconf.nitem", "gconf.conf_cost", "gconf.consumed", "gconf.conf_suma", "((gconf.conf_suma / '6'::numeric))::numeric(10,2)", "sum(gconf.conf_suma) FILTER (WHERE (gconf.nitem = 1)) OVER (?)"], "Shared Hit Blocks": 90, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Subquery Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Alias": "gconf", "Startup Cost": 220.34, "Total Cost": 310.34, "Plan Rows": 1000, "Plan Width": 500, "Actual Startup Time": 7.380, "Actual Total Time": 7.418, "Actual Rows": 3, "Actual Loops": 1, "Output": ["gconf.agreement_id", "gconf.order_id", "gconf.item_qty", "gconf.item_price", "gconf.item_cost", "gconf.item_suma", "gconf.o", "gconf.c", "gconf.p", "gconf.ic", "gconf.consumed_period", "gconf.nconf", "gconf.nitem", "gconf.conf_cost", "gconf.consumed", "gconf.conf_suma"], "Shared Hit Blocks": 90, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "WindowAgg", "Parent Relationship": "Subquery", "Parallel Aware": false, "Startup Cost": 220.34, "Total Cost": 300.34, "Plan Rows": 1000, "Plan Width": 504, "Actual Startup Time": 7.378, "Actual Total Time": 7.414, "Actual Rows": 3, "Actual Loops": 1, "Output": ["o.agreement_id", "o.id", "cis.item_qty", "cis.item_price", "cis.item_cost", "cis.item_suma", "o.*", "od.*", "sp.*", "ic.*", "ic.consumed_period", "dense_rank() OVER (?)", "(row_number() OVER (?))", "((sum(cis.item_cost) OVER (?)))::numeric(10,2)", "(max(ic.consumed) OVER (?))", "((sum(cis.item_suma) OVER (?)))::numeric(10,2)", "od.sort_order"], "Shared Hit Blocks": 90, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "WindowAgg", "Parent Relationship": "Outer", "Parallel Aware": false, "Startup Cost": 220.34, "Total Cost": 270.34, "Plan Rows": 1000, "Plan Width": 488, "Actual Startup Time": 7.347, "Actual Total Time": 7.372, "Actual Rows": 3, "Actual Loops": 1, "Output": ["o.agreement_id", "o.id", "ic.consumed_period", "od.sort_order", "cis.item_qty", "cis.item_price", "cis.item_cost", "cis.item_suma", "o.*", "od.*", "sp.*", "ic.*", "ic.consumed", "(row_number() OVER (?))", "sum(cis.item_cost) OVER (?)", "max(ic.consumed) OVER (?)", "sum(cis.item_suma) OVER (?)"], "Shared Hit Blocks": 90, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "WindowAgg", "Parent Relationship": "Outer", "Parallel Aware": false, "Startup Cost": 220.34, "Total Cost": 245.34, "Plan Rows": 1000, "Plan Width": 464, "Actual Startup Time": 7.330, "Actual Total Time": 7.353, "Actual Rows": 3, "Actual Loops": 1, "Output": ["o.agreement_id", "o.id", "ic.consumed_period", "od.sort_order", "cis.item_qty", "cis.item_price", "cis.item_cost", "cis.item_suma", "o.*", "od.*", "sp.*", "ic.*", "ic.consumed", "row_number() OVER (?)"], "Shared Hit Blocks": 90, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Sort", "Parent Relationship": "Outer", "Parallel Aware": false, "Startup Cost": 220.34, "Total Cost": 222.84, "Plan Rows": 1000, "Plan Width": 456, "Actual Startup Time": 7.319, "Actual Total Time": 7.338, "Actual Rows": 3, "Actual Loops": 1, "Output": ["o.agreement_id", "o.id", "ic.consumed_period", "od.sort_order", "cis.item_qty", "cis.item_price", "cis.item_cost", "cis.item_suma", "o.*", "od.*", "sp.*", "ic.*", "ic.consumed"], "Sort Key": ["o.id", "ic.consumed_period", "od.sort_order"], "Sort Method": "quicksort", "Sort Space Used": 27, "Sort Space Type": "Memory", "Shared Hit Blocks": 90, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Nested Loop", "Parent Relationship": "Outer", "Parallel Aware": false, "Join Type": "Left", "Startup Cost": 59.92, "Total Cost": 170.51, "Plan Rows": 1000, "Plan Width": 456, "Actual Startup Time": 2.862, "Actual Total Time": 7.318, "Actual Rows": 3, "Actual Loops": 1, "Output": ["o.agreement_id", "o.id", "ic.consumed_period", "od.sort_order", "cis.item_qty", "cis.item_price", "cis.item_cost", "cis.item_suma", "o.*", "od.*", "sp.*", "ic.*", "ic.consumed"], "Inner Unique": false, "Shared Hit Blocks": 90, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Nested Loop", "Parent Relationship": "Outer", "Parallel Aware": false, "Join Type": "Left", "Startup Cost": 59.67, "Total Cost": 150.26, "Plan Rows": 1, "Plan Width": 424, "Actual Startup Time": 2.771, "Actual Total Time": 7.104, "Actual Rows": 3, "Actual Loops": 1, "Output": ["o.agreement_id", "o.id", "o.*", "od.*", "od.sort_order", "sp.*", "ic.*", "ic.consumed_period", "ic.consumed"], "Inner Unique": false, "Shared Hit Blocks": 90, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Nested Loop", "Parent Relationship": "Outer", "Parallel Aware": false, "Join Type": "Left", "Startup Cost": 57.12, "Total Cost": 139.12, "Plan Rows": 1, "Plan Width": 394, "Actual Startup Time": 2.058, "Actual Total Time": 5.716, "Actual Rows": 3, "Actual Loops": 1, "Output": ["o.agreement_id", "o.id", "o.*", "o.app_period", "split_period.split_period", "od.*", "od.sort_order", "od.app_period", "sp.*"], "Inner Unique": false, "Join Filter": "(od.service_type_id = sp.service_type_id)", "Rows Removed by Join Filter": 192, "Shared Hit Blocks": 78, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Nested Loop", "Parent Relationship": "Outer", "Parallel Aware": false, "Join Type": "Left", "Startup Cost": 56.36, "Total Cost": 125.80, "Plan Rows": 1, "Plan Width": 374, "Actual Startup Time": 0.517, "Actual Total Time": 1.463, "Actual Rows": 3, "Actual Loops": 1, "Output": ["o.agreement_id", "o.id", "o.*", "o.service_level_id", "o.app_period", "o.period_id", "split_period.split_period", "od.*", "od.sort_order", "od.app_period", "od.service_type_id"], "Inner Unique": false, "Join Filter": "((od.app_period * o.app_period) && split_period.split_period)", "Rows Removed by Join Filter": 0, "Shared Hit Blocks": 63, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Nested Loop", "Parent Relationship": "Outer", "Parallel Aware": false, "Join Type": "Inner", "Startup Cost": 52.00, "Total Cost": 83.14, "Plan Rows": 1, "Plan Width": 235, "Actual Startup Time": 0.462, "Actual Total Time": 1.308, "Actual Rows": 2, "Actual Loops": 1, "Output": ["o.agreement_id", "o.id", "o.*", "o.service_level_id", "o.app_period", "o.period_id", "split_period.split_period"], "Inner Unique": false, "Shared Hit Blocks": 56, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Bitmap Heap Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Relation Name": "order_bt", "Schema": "public", "Alias": "o", "Startup Cost": 4.35, "Total Cost": 35.17, "Plan Rows": 1, "Plan Width": 203, "Actual Startup Time": 0.263, "Actual Total Time": 0.391, "Actual Rows": 5, "Actual Loops": 1, "Output": ["o.agreement_id", "o.id", "o.*", "o.service_level_id", "o.app_period", "o.period_id"], "Recheck Cond": "(o.agreement_id = 161)", "Rows Removed by Index Recheck": 0, "Filter": "(o.sys_period @> sys_time())", "Rows Removed by Filter": 18, "Exact Heap Blocks": 18, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 20, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Index Name": "order_idx_agreement_id", "Startup Cost": 0.00, "Total Cost": 4.35, "Plan Rows": 8, "Plan Width": 0, "Actual Startup Time": 0.022, "Actual Total Time": 0.022, "Actual Rows": 23, "Actual Loops": 1, "Index Cond": "(o.agreement_id = 161)", "Shared Hit Blocks": 2, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, { "Node Type": "Subquery Scan", "Parent Relationship": "Inner", "Parallel Aware": false, "Alias": "split_period", "Startup Cost": 47.65, "Total Cost": 47.96, "Plan Rows": 1, "Plan Width": 32, "Actual Startup Time": 0.176, "Actual Total Time": 0.181, "Actual Rows": 0, "Actual Loops": 5, "Output": ["split_period.split_period"], "Filter": "((o.app_period * '[\"2020-07-01 00:00:00+03\",\"2020-08-01 00:00:00+03\")'::tstzrange) && split_period.split_period)", "Rows Removed by Filter": 1, "Shared Hit Blocks": 36, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Subquery Scan", "Parent Relationship": "Subquery", "Parallel Aware": false, "Alias": "ranges", "Startup Cost": 47.65, "Total Cost": 47.87, "Plan Rows": 6, "Plan Width": 32, "Actual Startup Time": 0.172, "Actual Total Time": 0.177, "Actual Rows": 1, "Actual Loops": 5, "Output": ["tstzrange(ranges.start, COALESCE(ranges.finish, '2020-08-01 00:00:00+03'::timestamp with time zone), CASE WHEN (ranges.finish IS NULL) THEN '[]'::text ELSE '[)'::text END)"], "Filter": "(ranges.finish IS NOT NULL)", "Rows Removed by Filter": 1, "Shared Hit Blocks": 36, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Aggregate", "Strategy": "Hashed", "Partial Mode": "Simple", "Parent Relationship": "InitPlan", "Subplan Name": "CTE periods", "Parallel Aware": false, "Startup Cost": 47.24, "Total Cost": 47.27, "Plan Rows": 3, "Plan Width": 32, "Actual Startup Time": 0.139, "Actual Total Time": 0.140, "Actual Rows": 1, "Actual Loops": 5, "Output": ["((o_1.app_period * '[\"2020-07-01 00:00:00+03\",\"2020-08-01 00:00:00+03\")'::tstzrange))"], "Group Key": ["((o_1.app_period * '[\"2020-07-01 00:00:00+03\",\"2020-08-01 00:00:00+03\")'::tstzrange))"], "Planned Partitions": 0, "HashAgg Batches": 1, "Peak Memory Usage": 24, "Disk Usage": 0, "Shared Hit Blocks": 36, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Append", "Parent Relationship": "Outer", "Parallel Aware": false, "Startup Cost": 0.53, "Total Cost": 47.23, "Plan Rows": 3, "Plan Width": 32, "Actual Startup Time": 0.063, "Actual Total Time": 0.131, "Actual Rows": 2, "Actual Loops": 5, "Shared Hit Blocks": 36, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Subplans Removed": 0, "Plans": [ { "Node Type": "Index Only Scan", "Parent Relationship": "Member", "Parallel Aware": false, "Scan Direction": "NoMovement", "Index Name": "order_id_sys_period_app_period_excl", "Relation Name": "order_bt", "Schema": "public", "Alias": "o_1", "Startup Cost": 0.53, "Total Cost": 4.55, "Plan Rows": 1, "Plan Width": 32, "Actual Startup Time": 0.047, "Actual Total Time": 0.048, "Actual Rows": 1, "Actual Loops": 5, "Output": ["(o_1.app_period * '[\"2020-07-01 00:00:00+03\",\"2020-08-01 00:00:00+03\")'::tstzrange)"], "Index Cond": "((o_1.id = $0) AND (o_1.sys_period @> sys_time()) AND (o_1.app_period && '[\"2020-07-01 00:00:00+03\",\"2020-08-01 00:00:00+03\")'::tstzrange))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 0, "Shared Hit Blocks": 19, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, { "Node Type": "Bitmap Heap Scan", "Parent Relationship": "Member", "Parallel Aware": false, "Relation Name": "order_detail_bt", "Schema": "public", "Alias": "od_1", "Startup Cost": 4.36, "Total Cost": 42.64, "Plan Rows": 2, "Plan Width": 32, "Actual Startup Time": 0.050, "Actual Total Time": 0.061, "Actual Rows": 1, "Actual Loops": 5, "Output": ["(od_1.app_period * '[\"2020-07-01 00:00:00+03\",\"2020-08-01 00:00:00+03\")'::tstzrange)"], "Recheck Cond": "(od_1.order_id = $0)", "Rows Removed by Index Recheck": 0, "Filter": "((od_1.app_period && '[\"2020-07-01 00:00:00+03\",\"2020-08-01 00:00:00+03\")'::tstzrange) AND (od_1.sys_period @> sys_time()))", "Rows Removed by Filter": 1, "Exact Heap Blocks": 7, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 17, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Index Name": "order_detail_idx_order_id", "Startup Cost": 0.00, "Total Cost": 4.36, "Plan Rows": 10, "Plan Width": 0, "Actual Startup Time": 0.011, "Actual Total Time": 0.011, "Actual Rows": 3, "Actual Loops": 5, "Index Cond": "(od_1.order_id = $0)", "Shared Hit Blocks": 10, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] } ] } ] }, { "Node Type": "WindowAgg", "Parent Relationship": "Subquery", "Parallel Aware": false, "Startup Cost": 0.38, "Total Cost": 0.53, "Plan Rows": 6, "Plan Width": 16, "Actual Startup Time": 0.169, "Actual Total Time": 0.173, "Actual Rows": 2, "Actual Loops": 5, "Output": ["(lower(periods.app_period))", "lead((lower(periods.app_period))) OVER (?)"], "Shared Hit Blocks": 36, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Sort", "Parent Relationship": "Outer", "Parallel Aware": false, "Startup Cost": 0.38, "Total Cost": 0.39, "Plan Rows": 6, "Plan Width": 8, "Actual Startup Time": 0.159, "Actual Total Time": 0.160, "Actual Rows": 2, "Actual Loops": 5, "Output": ["(lower(periods.app_period))"], "Sort Key": ["(lower(periods.app_period))"], "Sort Method": "quicksort", "Sort Space Used": 25, "Sort Space Type": "Memory", "Shared Hit Blocks": 36, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Aggregate", "Strategy": "Hashed", "Partial Mode": "Simple", "Parent Relationship": "Outer", "Parallel Aware": false, "Startup Cost": 0.24, "Total Cost": 0.30, "Plan Rows": 6, "Plan Width": 8, "Actual Startup Time": 0.151, "Actual Total Time": 0.152, "Actual Rows": 2, "Actual Loops": 5, "Output": ["(lower(periods.app_period))"], "Group Key": ["(lower(periods.app_period))"], "Planned Partitions": 0, "HashAgg Batches": 1, "Peak Memory Usage": 24, "Disk Usage": 0, "Shared Hit Blocks": 36, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Append", "Parent Relationship": "Outer", "Parallel Aware": false, "Startup Cost": 0.00, "Total Cost": 0.23, "Plan Rows": 6, "Plan Width": 8, "Actual Startup Time": 0.145, "Actual Total Time": 0.148, "Actual Rows": 2, "Actual Loops": 5, "Shared Hit Blocks": 36, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Subplans Removed": 0, "Plans": [ { "Node Type": "CTE Scan", "Parent Relationship": "Member", "Parallel Aware": false, "CTE Name": "periods", "Alias": "periods", "Startup Cost": 0.00, "Total Cost": 0.07, "Plan Rows": 3, "Plan Width": 8, "Actual Startup Time": 0.143, "Actual Total Time": 0.144, "Actual Rows": 1, "Actual Loops": 5, "Output": ["lower(periods.app_period)"], "Shared Hit Blocks": 36, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, { "Node Type": "CTE Scan", "Parent Relationship": "Member", "Parallel Aware": false, "CTE Name": "periods", "Alias": "periods_1", "Startup Cost": 0.00, "Total Cost": 0.07, "Plan Rows": 3, "Plan Width": 8, "Actual Startup Time": 0.001, "Actual Total Time": 0.001, "Actual Rows": 1, "Actual Loops": 5, "Output": ["upper(periods_1.app_period)"], "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] } ] } ] } ] } ] } ] } ] }, { "Node Type": "Bitmap Heap Scan", "Parent Relationship": "Inner", "Parallel Aware": false, "Relation Name": "order_detail_bt", "Schema": "public", "Alias": "od", "Startup Cost": 4.36, "Total Cost": 42.61, "Plan Rows": 3, "Plan Width": 143, "Actual Startup Time": 0.049, "Actual Total Time": 0.066, "Actual Rows": 2, "Actual Loops": 2, "Output": ["od.*", "od.sort_order", "od.app_period", "od.order_id", "od.service_type_id"], "Recheck Cond": "(od.order_id = o.id)", "Rows Removed by Index Recheck": 0, "Filter": "(od.sys_period @> sys_time())", "Rows Removed by Filter": 2, "Exact Heap Blocks": 3, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 7, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Index Name": "order_detail_idx_order_id", "Startup Cost": 0.00, "Total Cost": 4.36, "Plan Rows": 10, "Plan Width": 0, "Actual Startup Time": 0.009, "Actual Total Time": 0.009, "Actual Rows": 3, "Actual Loops": 2, "Index Cond": "(od.order_id = o.id)", "Shared Hit Blocks": 4, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] } ] }, { "Node Type": "Function Scan", "Parent Relationship": "Inner", "Parallel Aware": false, "Function Name": "service_level_price", "Schema": "public", "Alias": "sp", "Startup Cost": 0.76, "Total Cost": 13.26, "Plan Rows": 5, "Plan Width": 40, "Actual Startup Time": 1.354, "Actual Total Time": 1.404, "Actual Rows": 65, "Actual Loops": 3, "Output": ["sp.*", "sp.service_type_id", "sp.period_id"], "Function Call": "service_level_price(o.service_level_id, CASE WHEN (app_time() IS NOT NULL) THEN tstzrange(app_time(), NULL::timestamp with time zone) ELSE (NULLIF(current_setting('my.app_period'::text, true), ''::text))::tstzrange END)", "Filter": "(o.period_id = sp.period_id)", "Rows Removed by Filter": 46, "Shared Hit Blocks": 15, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, { "Node Type": "Subquery Scan", "Parent Relationship": "Inner", "Parallel Aware": false, "Alias": "ic", "Startup Cost": 2.55, "Total Cost": 11.12, "Plan Rows": 1, "Plan Width": 104, "Actual Startup Time": 0.453, "Actual Total Time": 0.458, "Actual Rows": 1, "Actual Loops": 3, "Output": ["ic.*", "ic.consumed_period", "ic.consumed"], "Shared Hit Blocks": 12, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Result", "Parent Relationship": "Subquery", "Parallel Aware": false, "Startup Cost": 2.55, "Total Cost": 11.11, "Plan Rows": 1, "Plan Width": 72, "Actual Startup Time": 0.448, "Actual Total Time": 0.452, "Actual Rows": 1, "Actual Loops": 3, "Output": ["ROW(cr.id, cr.rate, cr.docdate, cr.from_currency_id, cr.to_currency_id, cr.app_period)::currency_rate", "interval_length(((od.app_period * o.app_period) * split_period.split_period), $3, '2020-08-01 00:00:00+03'::timestamp with time zone, $4)", "COALESCE(((od.app_period * o.app_period) * split_period.split_period), ((od.app_period * o.app_period) * split_period.split_period))"], "One-Time Filter": "(NOT isempty(((od.app_period * o.app_period) * split_period.split_period)))", "Shared Hit Blocks": 12, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Seq Scan", "Parent Relationship": "InitPlan", "Subplan Name": "InitPlan 2 (returns $3)", "Parallel Aware": false, "Relation Name": "period", "Schema": "public", "Alias": "period", "Startup Cost": 0.00, "Total Cost": 1.07, "Plan Rows": 1, "Plan Width": 16, "Actual Startup Time": 0.008, "Actual Total Time": 0.009, "Actual Rows": 1, "Actual Loops": 3, "Output": ["period.\"interval\""], "Filter": "(period.id = ($2).period_id)", "Rows Removed by Filter": 5, "Shared Hit Blocks": 3, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, { "Node Type": "Seq Scan", "Parent Relationship": "InitPlan", "Subplan Name": "InitPlan 3 (returns $4)", "Parallel Aware": false, "Relation Name": "period", "Schema": "public", "Alias": "period_1", "Startup Cost": 0.00, "Total Cost": 1.07, "Plan Rows": 1, "Plan Width": 16, "Actual Startup Time": 0.004, "Actual Total Time": 0.005, "Actual Rows": 1, "Actual Loops": 3, "Output": ["period_1.trunc_interval"], "Filter": "(period_1.id = ($2).period_id)", "Rows Removed by Filter": 5, "Shared Hit Blocks": 3, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, { "Node Type": "Nested Loop", "Parent Relationship": "Outer", "Parallel Aware": false, "Join Type": "Left", "Startup Cost": 0.40, "Total Cost": 8.70, "Plan Rows": 1, "Plan Width": 45, "Actual Startup Time": 0.089, "Actual Total Time": 0.092, "Actual Rows": 1, "Actual Loops": 3, "Output": ["cr.id", "cr.rate", "cr.docdate", "cr.from_currency_id", "cr.to_currency_id", "cr.app_period"], "Inner Unique": false, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Result", "Parent Relationship": "Outer", "Parallel Aware": false, "Startup Cost": 0.00, "Total Cost": 0.01, "Plan Rows": 1, "Plan Width": 0, "Actual Startup Time": 0.000, "Actual Total Time": 0.000, "Actual Rows": 1, "Actual Loops": 3, "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, { "Node Type": "Index Scan", "Parent Relationship": "Inner", "Parallel Aware": false, "Scan Direction": "NoMovement", "Index Name": "currency_rate_bt_id_sys_period_app_period_excl", "Relation Name": "currency_rate_bt", "Schema": "public", "Alias": "cr", "Startup Cost": 0.40, "Total Cost": 8.67, "Plan Rows": 1, "Plan Width": 45, "Actual Startup Time": 0.056, "Actual Total Time": 0.058, "Actual Rows": 1, "Actual Loops": 3, "Output": ["cr.id", "cr.rate", "cr.docdate", "cr.from_currency_id", "cr.to_currency_id", "cr.sid", "cr.app_period", "cr.sys_period"], "Index Cond": "((cr.sys_period @> sys_time()) AND (cr.app_period @> lower(((od.app_period * o.app_period) * split_period.split_period))))", "Rows Removed by Index Recheck": 0, "Filter": "((cr.from_currency_id = (sp.*).currency_id) AND (cr.to_currency_id = app_currency()))", "Rows Removed by Filter": 3, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] } ] } ] } ] }, { "Node Type": "Function Scan", "Parent Relationship": "Inner", "Parallel Aware": false, "Function Name": "calc_item_suma", "Schema": "public", "Alias": "cis", "Startup Cost": 0.25, "Total Cost": 10.25, "Plan Rows": 1000, "Plan Width": 32, "Actual Startup Time": 0.065, "Actual Total Time": 0.066, "Actual Rows": 1, "Actual Loops": 3, "Output": ["cis.item_qty", "cis.item_price", "cis.item_cost", "cis.item_suma"], "Function Call": "calc_item_suma(o.*, od.*, sp.*, ic.*)", "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] } ] } ] } ] } ] } ] } ] }, { "Node Type": "Hash", "Parent Relationship": "Inner", "Parallel Aware": false, "Startup Cost": 4.98, "Total Cost": 4.98, "Plan Rows": 198, "Plan Width": 76, "Actual Startup Time": 0.130, "Actual Total Time": 0.131, "Actual Rows": 198, "Actual Loops": 1, "Output": ["rt.display", "rt.name", "rt.unit", "rt.label", "rt.id"], "Hash Buckets": 1024, "Original Hash Buckets": 1024, "Hash Batches": 1, "Original Hash Batches": 1, "Peak Memory Usage": 24, "Shared Hit Blocks": 3, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Seq Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Relation Name": "resource_type", "Schema": "public", "Alias": "rt", "Startup Cost": 0.00, "Total Cost": 4.98, "Plan Rows": 198, "Plan Width": 76, "Actual Startup Time": 0.014, "Actual Total Time": 0.072, "Actual Rows": 198, "Actual Loops": 1, "Output": ["rt.display", "rt.name", "rt.unit", "rt.label", "rt.id"], "Shared Hit Blocks": 3, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] } ] }, { "Node Type": "Hash", "Parent Relationship": "Inner", "Parallel Aware": false, "Startup Cost": 4.76, "Total Cost": 4.76, "Plan Rows": 176, "Plan Width": 89, "Actual Startup Time": 0.114, "Actual Total Time": 0.115, "Actual Rows": 176, "Actual Loops": 1, "Output": ["st.display", "st.name", "st.id"], "Hash Buckets": 1024, "Original Hash Buckets": 1024, "Hash Batches": 1, "Original Hash Batches": 1, "Peak Memory Usage": 30, "Shared Hit Blocks": 3, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Seq Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Relation Name": "service_type", "Schema": "public", "Alias": "st", "Startup Cost": 0.00, "Total Cost": 4.76, "Plan Rows": 176, "Plan Width": 89, "Actual Startup Time": 0.013, "Actual Total Time": 0.059, "Actual Rows": 176, "Actual Loops": 1, "Output": ["st.display", "st.name", "st.id"], "Shared Hit Blocks": 3, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] } ] }, { "Node Type": "Hash", "Parent Relationship": "Inner", "Parallel Aware": false, "Startup Cost": 11.29, "Total Cost": 11.29, "Plan Rows": 329, "Plan Width": 154, "Actual Startup Time": 0.221, "Actual Total Time": 0.221, "Actual Rows": 329, "Actual Loops": 1, "Output": ["pkg.id", "pkg.link_1c_id", "pkg.display", "pkg.name"], "Hash Buckets": 1024, "Original Hash Buckets": 1024, "Hash Batches": 1, "Original Hash Batches": 1, "Peak Memory Usage": 68, "Shared Hit Blocks": 8, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Seq Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Relation Name": "package", "Schema": "public", "Alias": "pkg", "Startup Cost": 0.00, "Total Cost": 11.29, "Plan Rows": 329, "Plan Width": 154, "Actual Startup Time": 0.012, "Actual Total Time": 0.117, "Actual Rows": 329, "Actual Loops": 1, "Output": ["pkg.id", "pkg.link_1c_id", "pkg.display", "pkg.name"], "Shared Hit Blocks": 8, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] } ] }, { "Node Type": "Hash", "Parent Relationship": "Inner", "Parallel Aware": false, "Startup Cost": 33.20, "Total Cost": 33.20, "Plan Rows": 1920, "Plan Width": 16, "Actual Startup Time": 1.081, "Actual Total Time": 1.082, "Actual Rows": 1920, "Actual Loops": 1, "Output": ["pd.sort_order", "pd.package_id", "pd.resource_type_id", "pd.service_type_id"], "Hash Buckets": 2048, "Original Hash Buckets": 2048, "Hash Batches": 1, "Original Hash Batches": 1, "Peak Memory Usage": 101, "Shared Hit Blocks": 14, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Seq Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Relation Name": "package_detail", "Schema": "public", "Alias": "pd", "Startup Cost": 0.00, "Total Cost": 33.20, "Plan Rows": 1920, "Plan Width": 16, "Actual Startup Time": 0.010, "Actual Total Time": 0.605, "Actual Rows": 1920, "Actual Loops": 1, "Output": ["pd.sort_order", "pd.package_id", "pd.resource_type_id", "pd.service_type_id"], "Shared Hit Blocks": 14, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] } ] } ] } ] }, "Planning": { "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 6.516, "Triggers": [ ], "Execution Time": 9.690 } ]