| Sort (cost=8443.03..8640.66 rows=79050 width=12) (actual time=0.081..0.084 rows=30 loops=1) |
| Output: n.n, c.i, c.cnt |
| Sort Key: n.n, c.cnt |
| Sort Method: quicksort Memory: 26kB |
| Buffers: shared hit=4 |
| CTE cte |
| -> Recursive Union (cost=0.00..981.50 rows=31 width=8) (actual time=0.002..0.036 rows=6 loops=1) |
| Buffers: shared hit=3 |
| -> Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1) |
| Output: 1, 1 |
| -> WorkTable Scan on cte (cost=97.80..98.09 rows=3 width=8) (actual time=0.005..0.005 rows=1 loops=6) |
| Output: CASE WHEN (cte.cnt < $1) THEN (cte.i + 1) WHEN (cte.cnt = $2) THEN cte.cnt ELSE (cte.i - 1) END, (cte.cnt + 1) |
| Filter: (cte.cnt < (2 * $3)) |
| Rows Removed by Filter: 0 |
| Buffers: shared hit=3 |
| InitPlan 1 (returns $1) |
| -> Seq Scan on public.param (cost=0.00..32.60 rows=2260 width=4) (actual time=0.003..0.003 rows=1 loops=1) |
| Output: param.n |
| Buffers: shared hit=1 |
| InitPlan 2 (returns $2) |
| -> Seq Scan on public.param param_1 (cost=0.00..32.60 rows=2260 width=4) (actual time=0.003..0.004 rows=1 loops=1) |
| Output: param_1.n |
| Buffers: shared hit=1 |
| InitPlan 3 (returns $3) |
| -> Seq Scan on public.param param_2 (cost=0.00..32.60 rows=2260 width=4) (actual time=0.004..0.004 rows=1 loops=1) |
| Output: param_2.n |
| Buffers: shared hit=1 |
| -> Nested Loop (cost=0.00..1030.62 rows=79050 width=12) (actual time=0.020..0.068 rows=30 loops=1) |
| Output: n.n, c.i, c.cnt |
| Buffers: shared hit=4 |
| -> CTE Scan on cte c (cost=0.00..0.62 rows=31 width=8) (actual time=0.003..0.042 rows=6 loops=1) |
| Output: c.i, c.cnt |
| Buffers: shared hit=3 |
| -> Materialize (cost=0.00..48.25 rows=2550 width=4) (actual time=0.003..0.003 rows=5 loops=6) |
| Output: n.n |
| Buffers: shared hit=1 |
| -> Seq Scan on public.numbers n (cost=0.00..35.50 rows=2550 width=4) (actual time=0.006..0.006 rows=5 loops=1) |
| Output: n.n |
| Buffers: shared hit=1 |
| Planning Time: 0.153 ms |
| Execution Time: 0.134 ms |