explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t9Hf

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 999.510 ↑ 1.0 1 1

Limit (cost=68.51..68.51 rows=1 width=8) (actual time=999.507..999.510 rows=1 loops=1)

2. 98.411 999.506 ↑ 1,000.0 1 1

Sort (cost=68.51..71.01 rows=1,000 width=8) (actual time=999.506..999.506 rows=1 loops=1)

  • Sort Key: ""*SELECT* 1"".val
  • Sort Method: top-N heapsort Memory: 25kB
3. 597.256 901.095 ↓ 1,000.0 999,969 1

HashSetOp Except (cost=0.14..63.51 rows=1,000 width=8) (actual time=733.726..901.095 rows=999,969 loops=1)

4. 84.614 303.839 ↓ 908.3 999,985 1

Append (cost=0.14..60.76 rows=1,101 width=8) (actual time=0.017..303.839 rows=999,985 loops=1)

5. 123.249 219.152 ↓ 1,000.0 999,969 1

Subquery Scan on "*SELECT* 1" (cost=0.14..23.17 rows=1,000 width=8) (actual time=0.016..219.152 rows=999,969 loops=1)

6. 95.888 95.903 ↓ 1,000.0 999,969 1

ProjectSet (cost=0.14..13.17 rows=1,000 width=4) (actual time=0.015..95.903 rows=999,969 loops=1)

7. 0.015 0.015 ↑ 1.0 1 1

Index Scan using numberings_templates_numbering_id_pkey on numberings_templates (cost=0.14..8.16 rows=1 width=8) (actual time=0.011..0.015 rows=1 loops=1)

  • Index Cond: (numbering_id = 1)
8. 0.003 0.073 ↑ 6.3 16 1

Result (cost=0.14..32.08 rows=101 width=8) (actual time=0.032..0.073 rows=16 loops=1)

9. 0.002 0.070 ↑ 6.3 16 1

Append (cost=0.14..31.07 rows=101 width=4) (actual time=0.031..0.070 rows=16 loops=1)

10. 0.016 0.062 ↓ 13.0 13 1

Nested Loop (cost=0.14..20.89 rows=1 width=4) (actual time=0.031..0.062 rows=13 loops=1)

11. 0.020 0.020 ↓ 13.0 13 1

Seq Scan on invoices ei (cost=0.00..12.70 rows=1 width=278) (actual time=0.016..0.020 rows=13 loops=1)

  • Filter: ((NOT deleted) AND ((invoice_nr)::text <> ''::text) AND (numbering_id = 1))
12. 0.026 0.026 ↑ 1.0 1 13

Index Scan using numberings_templates_numbering_id_pkey on numberings_templates nt (cost=0.14..8.16 rows=1 width=1,036) (actual time=0.002..0.002 rows=1 loops=13)

  • Index Cond: (numbering_id = 1)
13. 0.004 0.006 ↑ 33.3 3 1

ProjectSet (cost=0.14..8.66 rows=100 width=4) (actual time=0.005..0.006 rows=3 loops=1)

14. 0.002 0.002 ↑ 1.0 1 1

Index Scan using numberings_templates_numbering_id_pkey on numberings_templates numberings_templates_1 (cost=0.14..8.16 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=1)

  • Index Cond: (numbering_id = 1)
Planning time : 0.268 ms
Execution time : 1,007.723 ms