explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ns1b

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 303.465 ↑ 1.0 2 1

Limit (cost=0.15..0.21 rows=2 width=16) (actual time=101.270..303.465 rows=2 loops=1)

2.          

CTE foo

3. 0.003 303.430 ↑ 1.5 2 1

Append (cost=0.00..0.08 rows=3 width=8) (actual time=101.250..303.430 rows=2 loops=1)

4. 101.250 101.250 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=8) (actual time=101.249..101.250 rows=1 loops=1)

5. 202.177 202.177 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=8) (actual time=202.176..202.177 rows=1 loops=1)

6. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=8) (never executed)

7.          

Initplan (for Limit)

8. 101.258 101.258 ↑ 3.0 1 1

CTE Scan on foo foo_1 (cost=0.00..0.06 rows=3 width=0) (actual time=101.258..101.258 rows=1 loops=1)

9. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.01..0.12 rows=3 width=0) (never executed)

10.          

CTE lol

11. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=4) (never executed)

12. 0.000 0.000 ↓ 0.0 0

CTE Scan on lol (cost=0.00..0.02 rows=1 width=0) (never executed)

13. 0.000 0.000 ↓ 0.0 0

CTE Scan on foo foo_2 (cost=0.00..0.06 rows=3 width=0) (never executed)

14. 101.263 303.459 ↑ 4.5 2 1

Result (cost=0.00..0.27 rows=9 width=16) (actual time=101.268..303.459 rows=2 loops=1)

  • One-Time Filter: ($1 OR $3)
15. 0.007 202.196 ↑ 4.5 2 1

Nested Loop (cost=0.00..0.27 rows=9 width=16) (actual time=0.006..202.196 rows=2 loops=1)

16. 0.002 0.002 ↑ 3.0 1 1

CTE Scan on foo (cost=0.00..0.06 rows=3 width=8) (actual time=0.001..0.002 rows=1 loops=1)

17. 202.187 202.187 ↑ 1.5 2 1

CTE Scan on foo b (cost=0.00..0.06 rows=3 width=8) (actual time=0.000..202.187 rows=2 loops=1)

Planning time : 0.232 ms
Execution time : 303.576 ms