add remove split language chart show hidden hide
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
version
PostgreSQL 12.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1), 64-bit
1 rows affected
n m
3 5
unnest
1
2
3
3
2
1
1
2
3
3
2
1
1
2
3
3
2
1
1
2
3
3
2
1
1
2
3
3
2
1
QUERY PLAN
ProjectSet (cost=107.84..177.84 rows=10000 width=4) (actual time=0.040..0.046 rows=30 loops=1)
  Output: unnest(array_cat($1, $3))
  Buffers: shared hit=3
  InitPlan 2 (returns $1)
    -> ProjectSet (cost=32.60..37.62 rows=1000 width=4) (actual time=0.007..0.008 rows=3 loops=1)
          Output: generate_series(1, $0)
          Buffers: shared hit=1
          InitPlan 1 (returns $0)
            -> Seq Scan on public.param (cost=0.00..32.60 rows=2260 width=4) (actual time=0.004..0.005 rows=1 loops=1)
                  Output: param.n
                  Buffers: shared hit=1
          -> Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=1)
  InitPlan 4 (returns $3)
    -> ProjectSet (cost=32.60..37.62 rows=1000 width=4) (actual time=0.010..0.011 rows=3 loops=1)
          Output: generate_series($2, 1, '-1'::integer)
          Buffers: shared hit=1
          InitPlan 3 (returns $2)
            -> Seq Scan on public.param param_1 (cost=0.00..32.60 rows=2260 width=4) (actual time=0.004..0.005 rows=1 loops=1)
                  Output: param_1.n
                  Buffers: shared hit=1
          -> Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=1)
  InitPlan 5 (returns $4)
    -> Seq Scan on public.param param_2 (cost=0.00..32.60 rows=2260 width=4) (actual time=0.007..0.007 rows=1 loops=1)
          Output: param_2.m
          Buffers: shared hit=1
  -> Function Scan on pg_catalog.generate_series (cost=0.00..10.00 rows=1000 width=0) (actual time=0.017..0.018 rows=5 loops=1)
        Output: generate_series.generate_series
        Function Call: generate_series(1, $4)
        Buffers: shared hit=1
Planning Time: 0.110 ms
Execution Time: 0.092 ms