explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zQId

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 9.613 ↓ 0.0 0 1

Sort (cost=2,157.68..2,157.86 rows=70 width=71) (actual time=9.613..9.613 rows=0 loops=1)

  • Sort Key: pe.nome
  • Sort Method: quicksort Memory: 25kB
2. 0.000 9.605 ↓ 0.0 0 1

Nested Loop (cost=785.11..2,155.54 rows=70 width=71) (actual time=9.605..9.605 rows=0 loops=1)

3. 0.000 9.605 ↓ 0.0 0 1

Nested Loop (cost=784.83..2,009.99 rows=70 width=52) (actual time=9.605..9.605 rows=0 loops=1)

4. 0.721 9.605 ↓ 0.0 0 1

Hash Join (cost=784.54..1,601.04 rows=70 width=28) (actual time=9.605..9.605 rows=0 loops=1)

  • Hash Cond: (us.id_servidor = se.id_servidor)
5. 5.277 7.265 ↓ 1.8 19,010 1

Seq Scan on usuario us (cost=475.50..1,251.41 rows=10,636 width=20) (actual time=4.118..7.265 rows=19,010 loops=1)

  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 2263
6.          

SubPlan (forSeq Scan)

7. 1.988 1.988 ↑ 1.2 15,219 1

Seq Scan on permissao (cost=0.00..430.09 rows=18,164 width=4) (actual time=0.005..1.988 rows=15,219 loops=1)

  • Filter: (autorizada IS TRUE)
  • Rows Removed by Filter: 34
8. 0.286 1.619 ↓ 4.5 1,999 1

Hash (cost=303.46..303.46 rows=446 width=16) (actual time=1.619..1.619 rows=1,999 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 110kB
9. 1.333 1.333 ↓ 4.5 1,999 1

Seq Scan on servidor se (cost=0.00..303.46 rows=446 width=16) (actual time=0.006..1.333 rows=1,999 loops=1)

  • Filter: ((data_desligamento IS NULL) AND (id_ativo = ANY ('{1,11}'::integer[])))
  • Rows Removed by Filter: 7078
10. 0.000 0.000 ↓ 0.0 0

Index Scan using fornecedor_pkey on pessoa pe (cost=0.29..5.83 rows=1 width=32) (never executed)

  • Index Cond: (id_pessoa = se.id_pessoa)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using cargo_pkey on cargo ca (cost=0.29..2.07 rows=1 width=27) (never executed)

  • Index Cond: (id = se.id_cargo)
Planning time : 0.346 ms
Execution time : 9.684 ms