explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gDIh

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 0.033 ↑ 537,633.0 1 1

Merge Join (cost=37,080.59..93,383.92 rows=537,633 width=136) (actual time=0.032..0.033 rows=1 loops=1)

  • Merge Cond: ((((pns1.value -> 'type'::text)) = ((pns2.value -> 'type'::text))) AND (((pns1.value -> 'number'::text)) = ((pns2.value -> 'number'::text))))
  • Join Filter: (p1.id > p2.id)
  • Rows Removed by Join Filter: 3
2. 0.005 0.020 ↑ 63,500.0 2 1

Sort (cost=18,540.29..18,857.79 rows=127,000 width=68) (actual time=0.020..0.020 rows=2 loops=1)

  • Sort Key: ((pns1.value -> 'type'::text)), ((pns1.value -> 'number'::text))
  • Sort Method: quicksort Memory: 25kB
3. 0.004 0.015 ↑ 63,500.0 2 1

Nested Loop (cost=0.01..2,562.70 rows=127,000 width=68) (actual time=0.012..0.015 rows=2 loops=1)

4. 0.005 0.005 ↑ 423.3 3 1

Seq Scan on people p1 (cost=0.00..22.70 rows=1,270 width=36) (actual time=0.005..0.005 rows=3 loops=1)

5. 0.006 0.006 ↑ 100.0 1 3

Function Scan on jsonb_array_elements pns1 (cost=0.01..1.00 rows=100 width=32) (actual time=0.002..0.002 rows=1 loops=3)

6. 0.001 0.008 ↑ 42,333.3 3 1

Materialize (cost=18,540.29..19,175.29 rows=127,000 width=68) (actual time=0.008..0.008 rows=3 loops=1)

7. 0.002 0.007 ↑ 63,500.0 2 1

Sort (cost=18,540.29..18,857.79 rows=127,000 width=68) (actual time=0.007..0.007 rows=2 loops=1)

  • Sort Key: ((pns2.value -> 'type'::text)), ((pns2.value -> 'number'::text))
  • Sort Method: quicksort Memory: 25kB
8. 0.001 0.005 ↑ 63,500.0 2 1

Nested Loop (cost=0.01..2,562.70 rows=127,000 width=68) (actual time=0.003..0.005 rows=2 loops=1)

9. 0.001 0.001 ↑ 423.3 3 1

Seq Scan on people p2 (cost=0.00..22.70 rows=1,270 width=36) (actual time=0.001..0.001 rows=3 loops=1)

10. 0.003 0.003 ↑ 100.0 1 3

Function Scan on jsonb_array_elements pns2 (cost=0.01..1.00 rows=100 width=32) (actual time=0.001..0.001 rows=1 loops=3)

Planning time : 0.112 ms
Execution time : 0.054 ms