"QUERY PLAN" "Nested Loop (cost=17903.41..17903.71 rows=1 width=48) (actual time=757.989..796.971 rows=15 loops=1)" " CTE recipeslanguages" " -> Unique (cost=17903.26..17903.27 rows=1 width=16) (actual time=729.286..731.696 rows=8045 loops=1)" " -> Sort (cost=17903.26..17903.26 rows=1 width=16) (actual time=729.285..730.214 rows=8045 loops=1)" " Sort Key: trt.idrecipe, trt.idlanguage, (row_number() OVER (?))" " Sort Method: quicksort Memory: 632kB" " -> WindowAgg (cost=17903.22..17903.25 rows=1 width=16) (actual time=723.604..727.768 rows=8045 loops=1)" " -> Subquery Scan on trt (cost=17903.22..17903.23 rows=1 width=8) (actual time=723.593..725.597 rows=8045 loops=1)" " -> Sort (cost=17903.22..17903.22 rows=1 width=524) (actual time=723.590..724.665 rows=8045 loops=1)" " Sort Key: rt.name" " Sort Method: quicksort Memory: 1003kB" " -> Nested Loop (cost=17855.71..17903.21 rows=1 width=524) (actual time=405.679..696.010 rows=8045 loops=1)" " -> GroupAggregate (cost=17855.42..17894.88 rows=1 width=136) (actual time=405.656..678.323 rows=8045 loops=1)" " Group Key: rt_1.idrecipe, rt_1.idlanguage" " Filter: (lower(((array_agg(DISTINCT ingredienttranslate.name))::character varying)::text) ~~ '%перец%'::text)" " Rows Removed by Filter: 10031" " -> Sort (cost=17855.42..17864.47 rows=3620 width=524) (actual time=404.985..439.057 rows=354798 loops=1)" " Sort Key: rt_1.idrecipe" " Sort Method: external merge Disk: 13648kB" " -> Hash Left Join (cost=2321.02..17641.44 rows=3620 width=524) (actual time=31.140..326.775 rows=354798 loops=1)" " Hash Cond: ((rt_1.idlanguage = measuretranslate.idlanguage) AND (rtdi.idmeasure = measuretranslate.idmeasure))" " -> Hash Left Join (cost=2313.70..17606.61 rows=3620 width=528) (actual time=31.097..266.546 rows=328510 loops=1)" " Hash Cond: ((rt_1.idlanguage = ingredienttranslate.idlanguage) AND (rtdi.idingredient = ingredienttranslate.idingredient))" " -> Hash Join (cost=2142.71..17297.89 rows=3620 width=16) (actual time=30.038..194.060 rows=328510 loops=1)" " Hash Cond: (rtdi.idrecipetranslatedescription = rtd.""ID"")" " -> Seq Scan on ""RecipeTranslateDescriptionIngredient"" rtdi (cost=0.00..12410.80 rows=722180 width=12) (actual time=0.010..52.493 rows=722180 loops=1)" " -> Hash (cost=2137.11..2137.11 rows=448 width=12) (actual time=29.996..29.999 rows=40186 loops=1)" " Buckets: 65536 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2239kB" " -> Hash Join (cost=263.69..2137.11 rows=448 width=12) (actual time=6.859..24.976 rows=40186 loops=1)" " Hash Cond: (rtd.""IdRecipeTranslate"" = rt_1.id)" " -> Seq Scan on ""RecipeTranslateDescription"" rtd (cost=0.00..1638.77 rows=89377 width=8) (actual time=0.006..5.454 rows=89377 loops=1)" " -> Hash (cost=261.84..261.84 rows=148 width=12) (actual time=6.839..6.839 rows=18111 loops=1)" " Buckets: 32768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1035kB" " -> Bitmap Heap Scan on ""RecipeTranslate"" rt_1 (cost=5.43..261.84 rows=148 width=12) (actual time=0.783..3.872 rows=18111 loops=1)" " Recheck Cond: (idlanguage = 1)" " Heap Blocks: exact=306" " -> Bitmap Index Scan on rt_idlanguage_idrecipe_index (cost=0.00..5.40 rows=148 width=0) (actual time=0.751..0.751 rows=18111 loops=1)" " Index Cond: (idlanguage = 1)" " -> Hash (cost=169.32..169.32 rows=111 width=524) (actual time=1.044..1.044 rows=3041 loops=1)" " Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 254kB" " -> Bitmap Heap Scan on ""IngredientTranslate"" ingredienttranslate (cost=5.15..169.32 rows=111 width=524) (actual time=0.104..0.620 rows=3041 loops=1)" " Recheck Cond: (idlanguage = 1)" " Heap Blocks: exact=176" " -> Bitmap Index Scan on it_idlanguage_index (cost=0.00..5.12 rows=111 width=0) (actual time=0.082..0.082 rows=3041 loops=1)" " Index Cond: (idlanguage = 1)" " -> Hash (cost=7.29..7.29 rows=2 width=8) (actual time=0.032..0.033 rows=36 loops=1)" " Buckets: 1024 Batches: 1 Memory Usage: 10kB" " -> Bitmap Heap Scan on ""MeasureTranslate"" measuretranslate (cost=4.16..7.29 rows=2 width=8) (actual time=0.017..0.027 rows=36 loops=1)" " Recheck Cond: (idlanguage = 1)" " Heap Blocks: exact=3" " -> Bitmap Index Scan on mt_idlanguage_index (cost=0.00..4.16 rows=2 width=0) (actual time=0.013..0.013 rows=36 loops=1)" " Index Cond: (idlanguage = 1)" " -> Index Scan using rt_idlanguage_idrecipe_index on ""RecipeTranslate"" rt (cost=0.29..8.31 rows=1 width=524) (actual time=0.002..0.002 rows=1 loops=8045)" " Index Cond: ((idlanguage = 1) AND (idrecipe = rt_1.idrecipe))" " InitPlan 2 (returns $2)" " -> Aggregate (cost=0.02..0.03 rows=1 width=32) (actual time=1.610..1.610 rows=1 loops=1)" " -> CTE Scan on recipeslanguages rl_2 (cost=0.00..0.02 rows=1 width=4) (actual time=0.002..0.667 rows=8045 loops=1)" " -> Limit (cost=0.06..0.06 rows=1 width=12) (actual time=738.741..738.753 rows=15 loops=1)" " -> Sort (cost=0.06..0.06 rows=1 width=12) (actual time=738.739..738.745 rows=15 loops=1)" " Sort Key: (min(rl.num_pos))" " Sort Method: top-N heapsort Memory: 26kB" " -> HashAggregate (cost=0.02..0.03 rows=1 width=12) (actual time=735.817..737.591 rows=8045 loops=1)" " Group Key: rl.idrecipe" " Batches: 1 Memory Usage: 1193kB" " -> CTE Scan on recipeslanguages rl (cost=0.00..0.02 rows=1 width=12) (actual time=729.288..733.030 rows=8045 loops=1)" " -> Aggregate (cost=0.05..0.06 rows=1 width=8) (actual time=1.189..1.189 rows=1 loops=15)" " -> HashAggregate (cost=0.02..0.03 rows=1 width=4) (actual time=0.182..0.900 rows=8045 loops=15)" " Group Key: rl_1.idrecipe" " Batches: 1 Memory Usage: 937kB" " -> CTE Scan on recipeslanguages rl_1 (cost=0.00..0.02 rows=1 width=4) (actual time=0.002..0.615 rows=8045 loops=1)" "Planning Time: 1.342 ms" "Execution Time: 798.482 ms"