# explain analyze SELECT "structured_nodes".* FROM "structured_nodes" INNER JOIN "structured_nodes" AS p0 ON p0."uuid" = "structured_nodes"."parent_uuid" INNER JOIN "structured_nodes" AS p1 ON p1."uuid" = "p0"."parent_uuid" INNER JOIN "structured_nodes" AS p2 ON p2."uuid" = "p1"."parent_uuid" INNER JOIN "structured_nodes" AS p3 ON p3."uuid" = "p2"."parent_uuid" INNER JOIN "structured_nodes" AS p4 ON p4."uuid" = "p3"."parent_uuid" INNER JOIN "structured_nodes" AS p5 ON p5."uuid" = "p4"."parent_uuid" INNER JOIN "structured_nodes" AS p6 ON p6."uuid" = "p5"."parent_uuid" INNER JOIN "structured_nodes" AS p7 ON p7."uuid" = "p6"."parent_uuid" INNER JOIN "structured_nodes" AS p8 ON p8."uuid" = "p7"."parent_uuid" INNER JOIN "structured_nodes" AS p9 ON p9."uuid" = "p8"."parent_uuid" INNER JOIN "structured_nodes" AS p10 ON p10."uuid" = "p9"."parent_uuid" INNER JOIN "structured_nodes" AS p11 ON p11."uuid" = "p10"."parent_uuid" INNER JOIN "structured_nodes" AS p12 ON p12."uuid" = "p11"."parent_uuid" INNER JOIN "structured_nodes" AS p13 ON p13."uuid" = "p12"."parent_uuid" INNER JOIN "structured_nodes" AS p14 ON p14."uuid" = "p13"."parent_uuid" INNER JOIN "structured_nodes" AS p15 ON p15."uuid" = "p14"."parent_uuid" INNER JOIN "structured_nodes" AS p16 ON p16."uuid" = "p15"."parent_uuid" INNER JOIN "structured_nodes" AS p17 ON p17."uuid" = "p16"."parent_uuid" INNER JOIN "structured_nodes" AS p18 ON p18."uuid" = "p17"."parent_uuid" INNER JOIN "structured_nodes" AS p19 ON p19."uuid" = "p18"."parent_uuid" INNER JOIN "structured_nodes" AS p20 ON p20."uuid" = "p19"."parent_uuid" INNER JOIN "structured_nodes" AS p21 ON p21."uuid" = "p20"."parent_uuid" INNER JOIN "structured_nodes" AS p22 ON p22."uuid" = "p21"."parent_uuid" INNER JOIN "structured_nodes" AS p23 ON p23."uuid" = "p22"."parent_uuid" INNER JOIN "structured_nodes" AS p24 ON p24."uuid" = "p23"."parent_uuid" INNER JOIN "structured_nodes" AS p25 ON p25."uuid" = "p24"."parent_uuid" INNER JOIN "structured_nodes" AS p26 ON p26."uuid" = "p25"."parent_uuid" INNER JOIN "structured_nodes" AS p27 ON p27."uuid" = "p26"."parent_uuid" INNER JOIN "structured_nodes" AS p28 ON p28."uuid" = "p27"."parent_uuid" INNER JOIN "structured_nodes" AS p29 ON p29."uuid" = "p28"."parent_uuid" INNER JOIN "structured_nodes" AS p30 ON p30."uuid" = "p29"."parent_uuid" INNER JOIN "structured_nodes" AS p31 ON p31."uuid" = "p30"."parent_uuid" INNER JOIN "structured_nodes" AS p32 ON p32."uuid" = "p31"."parent_uuid" INNER JOIN "structured_nodes" AS p33 ON p33."uuid" = "p32"."parent_uuid" INNER JOIN "structured_nodes" AS p34 ON p34."uuid" = "p33"."parent_uuid" INNER JOIN "structured_nodes" AS p35 ON p35."uuid" = "p34"."parent_uuid" INNER JOIN "structured_nodes" AS p36 ON p36."uuid" = "p35"."parent_uuid" INNER JOIN "structured_nodes" AS p37 ON p37."uuid" = "p36"."parent_uuid" INNER JOIN "structured_nodes" AS p38 ON p38."uuid" = "p37"."parent_uuid" INNER JOIN "structured_nodes" AS p39 ON p39."uuid" = "p38"."parent_uuid" INNER JOIN "structured_nodes" AS p40 ON p40."uuid" = "p39"."parent_uuid" INNER JOIN "structured_nodes" AS p41 ON p41."uuid" = "p40"."parent_uuid" INNER JOIN "structured_nodes" AS p42 ON p42."uuid" = "p41"."parent_uuid" INNER JOIN "structured_nodes" AS p43 ON p43."uuid" = "p42"."parent_uuid" INNER JOIN "structured_nodes" AS p44 ON p44."uuid" = "p43"."parent_uuid" INNER JOIN "structured_nodes" AS p45 ON p45."uuid" = "p44"."parent_uuid" INNER JOIN "structured_nodes" AS p46 ON p46."uuid" = "p45"."parent_uuid" INNER JOIN "structured_nodes" AS p47 ON p47."uuid" = "p46"."parent_uuid" INNER JOIN "structured_nodes" AS p48 ON p48."uuid" = "p47"."parent_uuid" WHERE "structured_nodes"."name" = 'nest-49' AND "p0"."name" = 'nest-48' AND "p1"."name" = 'nest-47' AND "p2"."name" = 'nest-46' AND "p3"."name" = 'nest-45' AND "p4"."name" = 'nest-44' AND "p5"."name" = 'nest-43' AND "p6"."name" = 'nest-42' AND "p7"."name" = 'nest-41' AND "p8"."name" = 'nest-40' AND "p9"."name" = 'nest-39' AND "p10"."name" = 'nest-38' AND "p11"."name" = 'nest-37' AND "p12"."name" = 'nest-36' AND "p13"."name" = 'nest-35' AND "p14"."name" = 'nest-34' AND "p15"."name" = 'nest-33' AND "p16"."name" = 'nest-32' AND "p17"."name" = 'nest-31' AND "p18"."name" = 'nest-30' AND "p19"."name" = 'nest-29' AND "p20"."name" = 'nest-28' AND "p21"."name" = 'nest-27' AND "p22"."name" = 'nest-26' AND "p23"."name" = 'nest-25' AND "p24"."name" = 'nest-24' AND "p25"."name" = 'nest-23' AND "p26"."name" = 'nest-22' AND "p27"."name" = 'nest-21' AND "p28"."name" = 'nest-20' AND "p29"."name" = 'nest-19' AND "p30"."name" = 'nest-18' AND "p31"."name" = 'nest-17' AND "p32"."name" = 'nest-16' AND "p33"."name" = 'nest-15' AND "p34"."name" = 'nest-14' AND "p35"."name" = 'nest-13' AND "p36"."name" = 'nest-12' AND "p37"."name" = 'nest-11' AND "p38"."name" = 'nest-10' AND "p39"."name" = 'nest-8' AND "p40"."name" = 'nest-7' AND "p41"."name" = 'nest-6' AND "p42"."name" = 'nest-5' AND "p43"."name" = 'nest-4' AND "p44"."name" = 'nest-3' AND "p45"."name" = 'nest-2' AND "p46"."name" = 'nest-1' AND "p47"."name" = 'deep-tree copy' AND "p48"."name" = 'Projects' AND "p48"."parent_uuid" IS NULL ORDER BY "structured_nodes"."uuid" ASC LIMIT 1; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=788.78..788.79 rows=1 width=109) (actual time=1.187..1.193 rows=1 loops=1) -> Sort (cost=788.78..788.79 rows=1 width=109) (actual time=1.187..1.187 rows=1 loops=1) Sort Key: nodes.uuid Sort Method: quicksort Memory: 25kB -> Nested Loop (cost=186.54..788.77 rows=1 width=109) (actual time=1.083..1.163 rows=1 loops=1) -> Nested Loop (cost=183.69..709.86 rows=1 width=145) (actual time=0.977..0.993 rows=1 loops=1) -> Nested Loop (cost=183.27..697.39 rows=1 width=145) (actual time=0.968..0.983 rows=1 loops=1) -> Nested Loop (cost=182.85..684.92 rows=1 width=145) (actual time=0.957..0.972 rows=1 loops=1) -> Nested Loop (cost=182.43..672.45 rows=1 width=145) (actual time=0.945..0.960 rows=1 loops=1) -> Nested Loop (cost=182.01..659.98 rows=1 width=145) (actual time=0.933..0.947 rows=1 loops=1) -> Nested Loop (cost=181.59..647.51 rows=1 width=145) (actual time=0.922..0.936 rows=1 loops=1) -> Nested Loop (cost=181.17..635.04 rows=1 width=145) (actual time=0.911..0.925 rows=1 loops=1) -> Nested Loop (cost=180.75..622.57 rows=1 width=145) (actual time=0.902..0.915 rows=1 loops=1) -> Nested Loop (cost=180.33..610.10 rows=1 width=145) (actual time=0.894..0.907 rows=1 loops=1) -> Nested Loop (cost=179.91..597.63 rows=1 width=145) (actual time=0.883..0.895 rows=1 loops=1) -> Nested Loop (cost=179.49..585.16 rows=1 width=145) (actual time=0.875..0.887 rows=1 loops=1) -> Nested Loop (cost=179.07..572.69 rows=1 width=145) (actual time=0.863..0.875 rows=1 loops=1) -> Nested Loop (cost=178.65..560.22 rows=1 width=145) (actual time=0.855..0.867 rows=1 loops=1) -> Nested Loop (cost=178.23..547.75 rows=1 width=145) (actual time=0.846..0.856 rows=1 loops=1) -> Nested Loop (cost=177.81..535.28 rows=1 width=145) (actual time=0.838..0.848 rows=1 loops=1) -> Nested Loop (cost=177.39..522.81 rows=1 width=145) (actual time=0.827..0.836 rows=1 loops=1) -> Nested Loop (cost=176.97..510.34 rows=1 width=145) (actual time=0.817..0.826 rows=1 loops=1) -> Nested Loop (cost=176.55..497.87 rows=1 width=145) (actual time=0.803..0.813 rows=1 loops=1) -> Nested Loop (cost=176.13..485.40 rows=1 width=145) (actual time=0.792..0.800 rows=1 loops=1) -> Nested Loop (cost=175.71..472.93 rows=1 width=145) (actual time=0.783..0.791 rows=1 loops=1) -> Nested Loop (cost=175.29..460.46 rows=1 width=145) (actual time=0.775..0.783 rows=1 loops=1) -> Nested Loop (cost=174.87..447.99 rows=1 width=145) (actual time=0.766..0.773 rows=1 loops=1) -> Nested Loop (cost=174.45..435.52 rows=1 width=145) (actual time=0.755..0.762 rows=1 loops=1) -> Nested Loop (cost=174.03..423.05 rows=1 width=145) (actual time=0.748..0.755 rows=1 loops=1) -> Nested Loop (cost=173.61..410.58 rows=1 width=145) (actual time=0.738..0.744 rows=1 loops=1) -> Nested Loop (cost=173.19..398.11 rows=1 width=145) (actual time=0.726..0.732 rows=1 loops=1) -> Nested Loop (cost=172.77..385.64 rows=1 width=145) (actual time=0.716..0.722 rows=1 loops=1) -> Nested Loop (cost=172.35..373.17 rows=1 width=145) (actual time=0.704..0.710 rows=1 loops=1) -> Nested Loop (cost=171.93..360.70 rows=1 width=145) (actual time=0.693..0.698 rows=1 loops=1) -> Nested Loop (cost=171.51..348.23 rows=1 width=145) (actual time=0.686..0.690 rows=1 loops=1) -> Nested Loop (cost=171.09..335.76 rows=1 width=145) (actual time=0.678..0.682 rows=1 loops=1) -> Nested Loop (cost=170.67..323.29 rows=1 width=145) (actual time=0.673..0.677 rows=1 loops=1) -> Nested Loop (cost=170.25..310.82 rows=1 width=145) (actual time=0.661..0.665 rows=1 loops=1) -> Nested Loop (cost=169.83..298.35 rows=1 width=145) (actual time=0.650..0.653 rows=1 loops=1) -> Nested Loop (cost=169.41..285.88 rows=1 width=145) (actual time=0.636..0.639 rows=1 loops=1) -> Nested Loop (cost=168.99..273.41 rows=1 width=145) (actual time=0.626..0.629 rows=1 loops=1) -> Nested Loop (cost=168.58..261.00 rows=1 width=73) (actual time=0.617..0.619 rows=1 loops=1) -> Nested Loop (cost=168.18..248.58 rows=1 width=73) (actual time=0.613..0.615 rows=1 loops=1) -> Nested Loop (cost=167.77..236.16 rows=1 width=73) (actual time=0.606..0.608 rows=1 loops=1) -> Nested Loop (cost=167.36..223.75 rows=1 width=73) (actual time=0.594..0.595 rows=1 loops=1) -> Nested Loop (cost=166.95..211.33 rows=1 width=73) (actual time=0.588..0.589 rows=1 loops=1) -> Nested Loop (cost=166.55..198.91 rows=1 width=73) (actual time=0.581..0.583 rows=1 loops=1) -> Bitmap Heap Scan on nodes nodes_7 (cost=166.14..174.08 rows=2 width=73) (actual time=0.564..0.565 rows=1 loops=1) Recheck Cond: ((name)::text = 'nest-42'::text) Filter: (is_latest AND is_directory AND (NOT is_network_node)) Heap Blocks: exact=2 -> BitmapAnd (cost=166.14..166.14 rows=2 width=0) (actual time=0.554..0.554 rows=0 loops=1) -> Bitmap Index Scan on index_nodes_on_name (cost=0.00..4.94 rows=69 width=0) (actual time=0.020..0.020 rows=3 loops=1) Index Cond: ((name)::text = 'nest-42'::text) -> Bitmap Index Scan on index_nodes_on_dir_latest_del (cost=0.00..160.95 rows=4853 width=0) (actual time=0.516..0.516 rows=5790 loops=1) Index Cond: ((is_directory = true) AND (is_latest = true)) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_6 (cost=0.41..12.41 rows=1 width=73) (actual time=0.015..0.015 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_7.uuid)::text) Filter: ((name)::text = 'nest-43'::text) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_5 (cost=0.41..12.41 rows=1 width=73) (actual time=0.007..0.007 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_6.uuid)::text) Filter: ((name)::text = 'nest-44'::text) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_4 (cost=0.41..12.41 rows=1 width=73) (actual time=0.006..0.006 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_5.uuid)::text) Filter: ((name)::text = 'nest-45'::text) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_3 (cost=0.41..12.41 rows=1 width=73) (actual time=0.011..0.012 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_4.uuid)::text) Filter: ((name)::text = 'nest-46'::text) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_2 (cost=0.41..12.41 rows=1 width=73) (actual time=0.005..0.005 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_3.uuid)::text) Filter: ((name)::text = 'nest-47'::text) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_1 (cost=0.41..12.41 rows=1 width=73) (actual time=0.003..0.003 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_2.uuid)::text) Filter: ((name)::text = 'nest-48'::text) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes (cost=0.41..12.41 rows=1 width=109) (actual time=0.009..0.010 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_1.uuid)::text) Filter: ((name)::text = 'nest-49'::text) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_8 (cost=0.42..12.46 rows=1 width=73) (actual time=0.009..0.009 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_7.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-41'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_9 (cost=0.42..12.46 rows=1 width=73) (actual time=0.012..0.012 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_8.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-40'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_10 (cost=0.42..12.46 rows=1 width=73) (actual time=0.011..0.012 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_9.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-39'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_11 (cost=0.42..12.46 rows=1 width=73) (actual time=0.012..0.012 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_10.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-38'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_12 (cost=0.42..12.46 rows=1 width=73) (actual time=0.005..0.005 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_11.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-37'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_13 (cost=0.42..12.46 rows=1 width=73) (actual time=0.006..0.006 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_12.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-36'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_14 (cost=0.42..12.46 rows=1 width=73) (actual time=0.007..0.008 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_13.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-35'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_15 (cost=0.42..12.46 rows=1 width=73) (actual time=0.010..0.010 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_14.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-34'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_16 (cost=0.42..12.46 rows=1 width=73) (actual time=0.007..0.007 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_15.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-33'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_17 (cost=0.42..12.46 rows=1 width=73) (actual time=0.009..0.010 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_16.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-32'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_18 (cost=0.42..12.46 rows=1 width=73) (actual time=0.010..0.010 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_17.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-31'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_19 (cost=0.42..12.46 rows=1 width=73) (actual time=0.009..0.011 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_18.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-30'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_20 (cost=0.42..12.46 rows=1 width=73) (actual time=0.006..0.006 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_19.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-29'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_21 (cost=0.42..12.46 rows=1 width=73) (actual time=0.009..0.009 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_20.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-28'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_22 (cost=0.42..12.46 rows=1 width=73) (actual time=0.008..0.009 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_21.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-27'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_23 (cost=0.42..12.46 rows=1 width=73) (actual time=0.007..0.007 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_22.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-26'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_24 (cost=0.42..12.46 rows=1 width=73) (actual time=0.008..0.008 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_23.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-25'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_25 (cost=0.42..12.46 rows=1 width=73) (actual time=0.010..0.010 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_24.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-24'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_26 (cost=0.42..12.46 rows=1 width=73) (actual time=0.012..0.012 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_25.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-23'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_27 (cost=0.42..12.46 rows=1 width=73) (actual time=0.009..0.009 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_26.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-22'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_28 (cost=0.42..12.46 rows=1 width=73) (actual time=0.009..0.009 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_27.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-21'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_29 (cost=0.42..12.46 rows=1 width=73) (actual time=0.007..0.007 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_28.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-20'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_30 (cost=0.42..12.46 rows=1 width=73) (actual time=0.008..0.008 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_29.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-19'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_31 (cost=0.42..12.46 rows=1 width=73) (actual time=0.007..0.007 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_30.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-18'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_32 (cost=0.42..12.46 rows=1 width=73) (actual time=0.010..0.010 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_31.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-17'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_33 (cost=0.42..12.46 rows=1 width=73) (actual time=0.004..0.004 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_32.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-16'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_34 (cost=0.42..12.46 rows=1 width=73) (actual time=0.009..0.010 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_33.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-15'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_35 (cost=0.42..12.46 rows=1 width=73) (actual time=0.007..0.007 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_34.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-14'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_36 (cost=0.42..12.46 rows=1 width=73) (actual time=0.007..0.007 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_35.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-13'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_37 (cost=0.42..12.46 rows=1 width=73) (actual time=0.010..0.010 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_36.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-12'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_38 (cost=0.42..12.46 rows=1 width=73) (actual time=0.010..0.010 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_37.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-11'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_39 (cost=0.42..12.46 rows=1 width=73) (actual time=0.011..0.012 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_38.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-10'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_40 (cost=0.42..12.46 rows=1 width=73) (actual time=0.010..0.010 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_39.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-8'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_41 (cost=0.42..12.46 rows=1 width=73) (actual time=0.009..0.009 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_40.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-7'::text)) -> Index Scan using index_nodes_on_uuid_and_created_at on nodes nodes_42 (cost=0.42..12.46 rows=1 width=73) (actual time=0.008..0.009 rows=1 loops=1) Index Cond: ((uuid)::text = (nodes_41.parent_uuid)::text) Filter: (is_latest AND is_directory AND (NOT is_network_node) AND ((name)::text = 'nest-6'::text)) -> Nested Loop (cost=2.85..78.91 rows=1 width=37) (actual time=0.105..0.169 rows=1 loops=1) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_49 (cost=0.41..8.39 rows=1 width=37) (actual time=0.005..0.005 rows=1 loops=1) Index Cond: (parent_uuid IS NULL) Filter: ((name)::text = 'Projects'::text) -> Nested Loop (cost=2.44..70.51 rows=1 width=73) (actual time=0.100..0.164 rows=1 loops=1) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_48 (cost=0.41..12.41 rows=1 width=73) (actual time=0.064..0.126 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_49.uuid)::text) Filter: ((name)::text = 'deep-tree copy'::text) Rows Removed by Filter: 139 -> Nested Loop (cost=2.04..58.09 rows=1 width=73) (actual time=0.033..0.035 rows=1 loops=1) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_47 (cost=0.41..12.41 rows=1 width=73) (actual time=0.004..0.005 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_48.uuid)::text) Filter: ((name)::text = 'nest-1'::text) -> Nested Loop (cost=1.63..45.68 rows=1 width=73) (actual time=0.028..0.029 rows=1 loops=1) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_46 (cost=0.41..12.41 rows=1 width=73) (actual time=0.006..0.006 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_47.uuid)::text) Filter: ((name)::text = 'nest-2'::text) -> Nested Loop (cost=1.22..33.26 rows=1 width=73) (actual time=0.020..0.021 rows=1 loops=1) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_45 (cost=0.41..12.41 rows=1 width=73) (actual time=0.007..0.007 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_46.uuid)::text) Filter: ((name)::text = 'nest-3'::text) -> Nested Loop (cost=0.81..20.85 rows=1 width=73) (actual time=0.012..0.013 rows=1 loops=1) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_44 (cost=0.41..12.41 rows=1 width=73) (actual time=0.006..0.006 rows=1 loops=1) Index Cond: ((parent_uuid)::text = (nodes_45.uuid)::text) Filter: ((name)::text = 'nest-4'::text) -> Index Scan using index_nodes_parent_uuid_on_structured_nodes on nodes nodes_43 (cost=0.41..8.43 rows=1 width=73) (actual time=0.004..0.005 rows=1 loops=1) Index Cond: (((parent_uuid)::text = (nodes_44.uuid)::text) AND ((uuid)::text = (nodes_42.parent_uuid)::text)) Filter: ((name)::text = 'nest-5'::text) Planning time: 383.282 ms Execution time: 2.996 ms (212 rows)